MCPcopy Create free account
hub / github.com/ddnet/ddnet / Get

Method Get

src/engine/shared/netban.cpp:197–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195
196template<class T, int HashCount>
197typename CNetBan::CBan<T> *CNetBan::CBanPool<T, HashCount>::Get(int Index) const
198{
199 if(Index < 0 || Index >= Num())
200 return nullptr;
201
202 for(CNetBan::CBan<T> *pBan = m_pFirstUsed; pBan; pBan = pBan->m_pNext, --Index)
203 {
204 if(Index == 0)
205 return pBan;
206 }
207
208 return nullptr;
209}
210
211template<class T>
212int CNetBan::Ban(T *pBanPool, const typename T::CDataType *pData, int Seconds, const char *pReason, bool VerbatimReason)

Callers 6

LoadPathsFromFileMethod · 0.45
UnbanByIndexMethod · 0.45
ExecuteFileMethod · 0.45
DoSnapshotMethod · 0.45
ProcessClientPacketMethod · 0.45
ReadAnnouncementsFileMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected