MCPcopy Create free account
hub / github.com/cppla/ServerStatus / Unban

Method Unban

server/src/netban.cpp:325–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

323
324template<class T>
325int CNetBan::Unban(T *pBanPool, const typename T::CDataType *pData)
326{
327 CNetHash NetHash(pData);
328 CBan<typename T::CDataType> *pBan = pBanPool->Find(pData, &NetHash);
329 if(pBan)
330 {
331 char aBuf[256];
332 MakeBanInfo(pBan, aBuf, sizeof(aBuf), MSGTYPE_BANREM);
333 pBanPool->Remove(pBan);
334 dbg_msg("net_ban", aBuf);
335 return 0;
336 }
337 else
338 dbg_msg("net_ban", "unban failed (invalid entry)");
339 return -1;
340}
341
342void CNetBan::Init()
343{

Callers

nothing calls this directly

Calls 3

dbg_msgFunction · 0.85
FindMethod · 0.80
RemoveMethod · 0.80

Tested by

no test coverage detected