mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Fix bans by remote admins corrupting banlist
This commit is contained in:
parent
c5bf6d07ed
commit
4d589300f4
1 changed files with 10 additions and 10 deletions
|
@ -415,16 +415,6 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
|||
|
||||
//CONS_Printf("\x82%s ", player_names[pnum]);
|
||||
|
||||
// If a verified admin banned someone, the server needs to know about it.
|
||||
// If the playernum isn't zero (the server) then the server needs to record the ban.
|
||||
if (server && playernum && (msg == KICK_MSG_BANNED || msg == KICK_MSG_CUSTOM_BAN))
|
||||
{
|
||||
if (I_Ban && !I_Ban(playernode[(INT32)pnum]))
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Too many bans! Geez, that's a lot of people you're excluding...\n"));
|
||||
else
|
||||
Ban_Add(reason);
|
||||
}
|
||||
|
||||
switch (msg)
|
||||
{
|
||||
case KICK_MSG_GO_AWAY:
|
||||
|
@ -500,6 +490,16 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
|||
break;
|
||||
}
|
||||
|
||||
// If a verified admin banned someone, the server needs to know about it.
|
||||
// If the playernum isn't zero (the server) then the server needs to record the ban.
|
||||
if (server && playernum && (msg == KICK_MSG_BANNED || msg == KICK_MSG_CUSTOM_BAN))
|
||||
{
|
||||
if (I_Ban && !I_Ban(playernode[(INT32)pnum]))
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Too many bans! Geez, that's a lot of people you're excluding...\n"));
|
||||
else
|
||||
Ban_Add(msg == KICK_MSG_CUSTOM_BAN ? reason : NULL);
|
||||
}
|
||||
|
||||
if (pnum == consoleplayer)
|
||||
{
|
||||
LUA_HookBool(false, HOOK(GameQuit));
|
||||
|
|
Loading…
Reference in a new issue