mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 04:11:18 +00:00
Make sure I_Ban and Ban_Add are only used by the server
Also make sure the server actually uses Ban_Add if an admin banned someone
This commit is contained in:
parent
8a421a05d9
commit
7424df8180
1 changed files with 5 additions and 4 deletions
|
@ -2531,7 +2531,7 @@ static void Command_Ban(void)
|
|||
return;
|
||||
else
|
||||
WRITEUINT8(p, pn);
|
||||
if (I_Ban && !I_Ban(node))
|
||||
if (server && I_Ban && !I_Ban(node)) // only the server is allowed to do this right now
|
||||
{
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Too many bans! Geez, that's a lot of people you're excluding...\n"));
|
||||
WRITEUINT8(p, KICK_MSG_GO_AWAY);
|
||||
|
@ -2539,7 +2539,8 @@ static void Command_Ban(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
Ban_Add(COM_Argv(2));
|
||||
if (server) // only the server is allowed to do this right now
|
||||
Ban_Add(COM_Argv(2));
|
||||
|
||||
if (COM_Argc() == 2)
|
||||
{
|
||||
|
@ -2699,9 +2700,9 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
|||
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)
|
||||
|
|
Loading…
Reference in a new issue