Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
964 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef CMDLIST_H
  8. #define CMDLIST_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "server.h"
  13. #include "netadr.h"
  14. #include "maps.h"
  15. #include "rcon.h"
  16. #include "utlvector.h"
  17. #include "Iresponse.h"
  18. class CSocket;
  19. class IResponse;
  20. class CCMDList: public IResponse
  21. {
  22. public:
  23. CCMDList(IResponse *target,serveritem_t &server, const char *rconPassword);
  24. ~CCMDList();
  25. serveritem_t &GetServer();
  26. void RunFrame();
  27. bool QueryCommand(char *cmd);
  28. bool GotCommands();
  29. void SetPassword(const char *newPass);
  30. virtual void ServerResponded();
  31. virtual void ServerFailedToRespond();
  32. private:
  33. serveritem_t m_Server;
  34. CUtlVector<char *> m_CMDList;
  35. IResponse *m_pResponseTarget;
  36. CRcon *m_pRcon;
  37. bool m_bGotCommands;
  38. char m_szRconPassword[100];
  39. };
  40. #endif // CMDLIST_H