mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
29 lines
778 B
C++
29 lines
778 B
C++
#pragma once
|
|
|
|
class CBanSystem
|
|
{
|
|
public:
|
|
CBanSystem(void);
|
|
void operator[](std::pair<std::string, std::int64_t> pair);
|
|
void Load(void);
|
|
void Save(void) const;
|
|
|
|
void AddEntry(std::string svIpAddress, std::int64_t nOriginID);
|
|
void DeleteEntry(std::string svIpAddress, std::int64_t nOriginID);
|
|
|
|
void AddConnectionRefuse(std::string svError, std::int64_t nOriginID);
|
|
void DeleteConnectionRefuse(std::int64_t nUserID);
|
|
|
|
bool IsBanned(std::string svIpAddress, std::int64_t nOriginID) const;
|
|
bool IsRefuseListValid(void) const;
|
|
bool IsBanListValid(void) const;
|
|
|
|
void BanListCheck(void);
|
|
|
|
private:
|
|
std::vector<std::pair<std::string, std::int64_t>> vsvrefuseList = {};
|
|
std::vector<std::pair<std::string, std::int64_t>> vsvBanList = {};
|
|
};
|
|
|
|
extern CBanSystem* g_pBanSystem;
|