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.

67 lines
1.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================
  7. #ifndef BANLIST_H
  8. #define BANLIST_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "ban.h"
  13. #include "netadr.h"
  14. #include "utlvector.h"
  15. #include "playermsghandler.h"
  16. #include "Iresponse.h"
  17. class CSocket;
  18. class IResponse;
  19. class CBanList: public IResponse
  20. {
  21. public:
  22. CBanList(IResponse *target,serveritem_t &server, const char *rconPassword);
  23. ~CBanList();
  24. // send an rcon command to a server
  25. void SendQuery();
  26. void Refresh();
  27. bool IsRefreshing();
  28. serveritem_t &GetServer();
  29. void RunFrame();
  30. CUtlVector<Bans_t> *GetBanList();
  31. bool NewBanList();
  32. void ServerResponded();
  33. // called when a server response has timed out
  34. void ServerFailedToRespond();
  35. void SetPassword(const char *newPass);
  36. private:
  37. serveritem_t m_Server;
  38. CUtlVector<Bans_t> m_BanList;
  39. IResponse *m_pResponseTarget;
  40. CRcon *m_pRcon;
  41. bool m_bIsRefreshing;
  42. bool m_bGotIPs;
  43. bool m_bNewBanList;
  44. bool m_bRconFailed;
  45. char m_szRconPassword[100];
  46. };
  47. #endif // BANLIST_H