mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-23 12:22:42 +00:00
Don't allow duplicate bans. (overlapping bans are however still OK).
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@3491 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
051e8ff18c
commit
a16e0c84e6
1 changed files with 11 additions and 0 deletions
|
@ -890,6 +890,17 @@ void SV_FilterIP_f (void)
|
|||
return;
|
||||
}
|
||||
|
||||
nb = svs.bannedips;
|
||||
while (nb)
|
||||
{
|
||||
if (NET_CompareAdr(nb->adr, banadr) && NET_CompareAdr(nb->adrmask, banmask))
|
||||
{
|
||||
Con_Printf("%s is already banned\n", Cmd_Argv(1));
|
||||
break;
|
||||
}
|
||||
nb = nb->next;
|
||||
}
|
||||
|
||||
// loop through clients and kick the ones that match
|
||||
for (i = 0, cl = svs.clients; i < sv.allocated_client_slots; i++, cl++)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue