mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 05:00:46 +00:00
Merge branch 'public_next'
This commit is contained in:
commit
c4e7bef01a
3 changed files with 16 additions and 7 deletions
|
@ -2533,7 +2533,7 @@ static void Command_Ban(void)
|
||||||
return;
|
return;
|
||||||
else
|
else
|
||||||
WRITEUINT8(p, pn);
|
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"));
|
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);
|
WRITEUINT8(p, KICK_MSG_GO_AWAY);
|
||||||
|
@ -2541,7 +2541,8 @@ static void Command_Ban(void)
|
||||||
}
|
}
|
||||||
else
|
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)
|
if (COM_Argc() == 2)
|
||||||
{
|
{
|
||||||
|
@ -2698,12 +2699,14 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
||||||
|
|
||||||
// If a verified admin banned someone, the server needs to know about it.
|
// 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 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]))
|
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"));
|
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)
|
switch (msg)
|
||||||
|
|
|
@ -2134,7 +2134,7 @@ static void Command_Teamchange_f(void)
|
||||||
return;
|
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"));
|
CONS_Alert(CONS_NOTICE, M_GetText("The server is not allowing team changes at the moment.\n"));
|
||||||
return;
|
return;
|
||||||
|
@ -2231,7 +2231,7 @@ static void Command_Teamchange2_f(void)
|
||||||
return;
|
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"));
|
CONS_Alert(CONS_NOTICE, M_GetText("The server is not allowing team changes at the moment.\n"));
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -4450,6 +4450,7 @@ static void M_ChangeLevel(INT32 choice)
|
||||||
static void M_ConfirmSpectate(INT32 choice)
|
static void M_ConfirmSpectate(INT32 choice)
|
||||||
{
|
{
|
||||||
(void)choice;
|
(void)choice;
|
||||||
|
// We allow switching to spectator even if team changing is not allowed
|
||||||
M_ClearMenus(true);
|
M_ClearMenus(true);
|
||||||
COM_ImmedExecute("changeteam spectator");
|
COM_ImmedExecute("changeteam spectator");
|
||||||
}
|
}
|
||||||
|
@ -4457,6 +4458,11 @@ static void M_ConfirmSpectate(INT32 choice)
|
||||||
static void M_ConfirmEnterGame(INT32 choice)
|
static void M_ConfirmEnterGame(INT32 choice)
|
||||||
{
|
{
|
||||||
(void)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);
|
M_ClearMenus(true);
|
||||||
COM_ImmedExecute("changeteam playing");
|
COM_ImmedExecute("changeteam playing");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue