mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Add comments to 'SV_CheckForBan'
Some stuff was unclear and took a minute to understand again, these comments fixes this problem.
This commit is contained in:
parent
efe119a5f2
commit
f5151a74cf
@ -95,10 +95,15 @@ void SV_CheckForBan(const BannedVec_t* pBannedVec /*= nullptr*/)
|
||||
const char* szIPAddr = pNetChan->GetAddress(true);
|
||||
const uint64_t nNucleusID = pClient->GetNucleusID();
|
||||
|
||||
// If no banned list was provided, build one with all clients
|
||||
// on the server. This will be used for bulk checking so live
|
||||
// bans could be performed, as this function is called periodically.
|
||||
if (!pBannedVec)
|
||||
bannedVec.push_back(std::make_pair(string(szIPAddr), nNucleusID));
|
||||
else
|
||||
{
|
||||
// Check if current client is within provided banned list, and
|
||||
// prune if so...
|
||||
for (auto& it : *pBannedVec)
|
||||
{
|
||||
if (it.second == pClient->GetNucleusID())
|
||||
|
Loading…
x
Reference in New Issue
Block a user