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

33 lines
622 B
C++
Raw Normal View History

2017-01-20 08:36:52 -05:00
#pragma once
2017-01-19 16:23:59 -05:00
namespace Components
{
class Bans : public Component
{
public:
typedef std::pair<SteamID, Game::netIP_t> Entry;
Bans();
~Bans();
2018-12-17 08:29:18 -05:00
static void BanClientNum(int num, const std::string& reason);
2018-10-13 11:37:37 -04:00
static void UnbanClient(SteamID id);
static void UnbanClient(Game::netIP_t ip);
2017-01-19 16:23:59 -05: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;
};
2018-10-13 11:37:37 -04:00
static std::recursive_mutex AccessMutex;
2017-01-19 16:23:59 -05:00
static void LoadBans(BanList* list);
2018-10-13 11:37:37 -04:00
static void SaveBans(BanList* list);
2017-01-19 16:23:59 -05:00
};
}