[Master] Add ban/unban functions

new-script-api
Koncord 7 years ago
parent 26324c2578
commit fc8232f943

@ -234,3 +234,15 @@ MasterServer::ServerMap *MasterServer::GetServers()
{
return &servers;
}
void MasterServer::ban(const std::string &addr)
{
banned.push_back(addr);
}
void MasterServer::unban(const std::string &addr)
{
auto it = find(banned.begin(), banned.end(), addr);
if (it != banned.end())
banned.erase(it);
}

@ -31,6 +31,9 @@ public:
ServerMap* GetServers();
void ban(const std::string &addr);
void unban(const std::string &addr);
private:
void Thread();

Loading…
Cancel
Save