mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Update comments. Proper type for 'user_creds::m_nUserID'. Proper type for 'CClient::SetUserID'. Added 'CClient::SetHandle'.
30 lines
704 B
C++
30 lines
704 B
C++
#pragma once
|
|
|
|
class CBanSystem
|
|
{
|
|
public:
|
|
CBanSystem(void);
|
|
void operator[](std::pair<string, uint64_t> pair);
|
|
|
|
void Load(void);
|
|
void Save(void) const;
|
|
|
|
void AddEntry(string svIpAddress, uint64_t nOriginID);
|
|
void DeleteEntry(string svIpAddress, uint64_t nOriginID);
|
|
|
|
void AddConnectionRefuse(string svError, uint64_t nOriginID);
|
|
void DeleteConnectionRefuse(uint64_t nOriginID);
|
|
|
|
void BanListCheck(void);
|
|
|
|
bool IsBanned(string svIpAddress, uint64_t nOriginID) const;
|
|
bool IsRefuseListValid(void) const;
|
|
bool IsBanListValid(void) const;
|
|
|
|
private:
|
|
vector<std::pair<string, uint64_t>> m_vRefuseList = {};
|
|
vector<std::pair<string, uint64_t>> m_vBanList = {};
|
|
};
|
|
|
|
extern CBanSystem* g_pBanSystem;
|