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

Method Reset

server/src/netban.cpp:203–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201
202template<class T, int HashCount>
203void CNetBan::CBanPool<T, HashCount>::Reset()
204{
205 mem_zero(m_paaHashList, sizeof(m_paaHashList));
206 mem_zero(m_aBans, sizeof(m_aBans));
207 m_pFirstUsed = 0;
208 m_CountUsed = 0;
209
210 for(int i = 1; i < MAX_BANS-1; ++i)
211 {
212 m_aBans[i].m_pNext = &m_aBans[i+1];
213 m_aBans[i].m_pPrev = &m_aBans[i-1];
214 }
215
216 m_aBans[0].m_pNext = &m_aBans[1];
217 m_aBans[MAX_BANS-1].m_pPrev = &m_aBans[MAX_BANS-2];
218 m_pFirstFree = &m_aBans[0];
219}
220
221template<class T, int HashCount>
222typename CNetBan::CBan<T> *CNetBan::CBanPool<T, HashCount>::Get(int Index) const

Callers 3

InitMethod · 0.45
UnbanAllMethod · 0.45
OpenMethod · 0.45

Calls 1

mem_zeroFunction · 0.85

Tested by

no test coverage detected