r5sdk/r5dev/public/include/bansystem.h
Amos 8079e0ed4c Heavy cleanup for CHostState methods and signatures
* Add Cbuf_AddText and Cbuf_Execute signatures.
* Remove additional VGui stuff from dedicated statemachine.
* Move signatures to their respective headers.
* De-inline 'CHostState::FrameUpdate()'
* Ported al new patters to GAMEDLL_S1, CEngine still recreation needs extra work
2022-02-19 02:31:16 +01:00

30 lines
814 B
C++

#pragma once
#include "public/include/json.hpp"
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;