Got_KickCmd: Do not kick players with the server node from the server (this shut down the server previously !?)

This commit is contained in:
toaster 2023-04-13 21:18:05 +01:00
parent 15b0141700
commit 9e30ffcdb7

View file

@ -3189,16 +3189,6 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
pnum = READUINT8(*p);
msg = READUINT8(*p);
if (pnum == serverplayer && IsPlayerAdmin(playernum))
{
CONS_Printf(M_GetText("Server is being shut down remotely. Goodbye!\n"));
if (server)
COM_BufAddText("quit\n");
return;
}
if (msg == KICK_MSG_CUSTOM_BAN || msg == KICK_MSG_CUSTOM_KICK)
{
READSTRINGN(*p, reason, MAX_REASONLENGTH+1);
@ -3264,6 +3254,12 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
}
}
if (playernode[pnum] == servernode)
{
CONS_Printf(M_GetText("Ignoring kick attempt from %s on node %d (it's the server)\n"), player_names[playernum], servernode);
return;
}
//CONS_Printf("\x82%s ", player_names[pnum]);
// Save bans here. Used to be split between here and the actual command, depending on