mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-14 13:51:31 +00:00
Merge branch 'next' into public_next
This commit is contained in:
commit
b364c0186b
3 changed files with 16 additions and 7 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,6 +2539,7 @@ static void Command_Ban(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (server) // only the server is allowed to do this right now
|
||||
Ban_Add(COM_Argv(2));
|
||||
|
||||
if (COM_Argc() == 2)
|
||||
|
@ -2696,12 +2697,14 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
|||
|
||||
// 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)
|
||||
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"));
|
||||
}
|
||||
#ifndef NONET
|
||||
else
|
||||
Ban_Add(reason);
|
||||
#endif
|
||||
}
|
||||
|
||||
switch (msg)
|
||||
|
|
|
@ -2116,7 +2116,7 @@ static void Command_Teamchange_f(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!cv_allowteamchange.value && !NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
|
||||
if (!cv_allowteamchange.value && NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
|
||||
{
|
||||
CONS_Alert(CONS_NOTICE, M_GetText("The server is not allowing team changes at the moment.\n"));
|
||||
return;
|
||||
|
@ -2213,7 +2213,7 @@ static void Command_Teamchange2_f(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (!cv_allowteamchange.value && !NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
|
||||
if (!cv_allowteamchange.value && NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
|
||||
{
|
||||
CONS_Alert(CONS_NOTICE, M_GetText("The server is not allowing team changes at the moment.\n"));
|
||||
return;
|
||||
|
|
|
@ -3849,6 +3849,7 @@ static void M_ChangeLevel(INT32 choice)
|
|||
static void M_ConfirmSpectate(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
// We allow switching to spectator even if team changing is not allowed
|
||||
M_ClearMenus(true);
|
||||
COM_ImmedExecute("changeteam spectator");
|
||||
}
|
||||
|
@ -3856,6 +3857,11 @@ static void M_ConfirmSpectate(INT32 choice)
|
|||
static void M_ConfirmEnterGame(INT32 choice)
|
||||
{
|
||||
(void)choice;
|
||||
if (!cv_allowteamchange.value)
|
||||
{
|
||||
M_StartMessage(M_GetText("The server is not allowing\nteam changes at this time.\nPress a key.\n"), NULL, MM_NOTHING);
|
||||
return;
|
||||
}
|
||||
M_ClearMenus(true);
|
||||
COM_ImmedExecute("changeteam playing");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue