iw4x-client/src/Components/Modules/Bans.hpp

32 lines
599 B
C++
Raw Normal View History

2016-08-15 10:40:30 -04:00
namespace Components
{
class Bans : public Component
{
public:
2016-08-15 19:54:52 -04:00
typedef std::pair<SteamID, Game::netIP_t> Entry;
2016-08-15 10:40:30 -04:00
Bans();
~Bans();
2016-09-16 05:04:28 -04:00
#if defined(DEBUG) || defined(FORCE_UNIT_TESTS)
const char* getName() { return "Bans"; };
2016-08-15 10:40:30 -04:00
#endif
static void BanClientNum(int num, std::string reason);
2016-08-15 19:54:52 -04:00
static bool IsBanned(Entry entry);
static void InsertBan(Entry entry);
private:
class BanList
{
public:
std::vector<SteamID> idList;
std::vector<Game::netIP_t> ipList;
2016-08-15 19:54:52 -04:00
};
static std::mutex AccessMutex;
2016-08-18 07:26:05 -04:00
static void LoadBans(BanList* list);
2016-08-15 10:40:30 -04:00
};
}