Replace all instances of XD_KICK with a SendKick function
This commit is contained in:
1 parent
d2838c2780
commit
c6cc7d3d29
7 files changed
+51
-199
No files matched your search
+1
-5
@@ -1493,11 +1493,7 @@ static void Got_NetVar(UINT8 **p, INT32 playernum)
|
||||
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
+24
-73
@@ -488,11 +488,7 @@ static void ExtraDataTicker(void)
|
||||
{
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[3];
|
||||
|
||||
buf[0] = (UINT8)i;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(i, KICK_MSG_CON_FAIL);
|
||||
DEBFILE(va("player %d kicked [gametic=%u] reason as follows:\n", i, gametic));
|
||||
}
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Got unknown net command [%s]=%d (max %d)\n"), sizeu1(curpos - bufferstart), *curpos, bufferstart[0]);
|
||||
@@ -544,6 +540,15 @@ ticcmd_t *D_LocalTiccmd(UINT8 ss)
|
||||
return &localcmds[ss][0];
|
||||
}
|
||||
|
||||
void SendKick(UINT8 playernum, UINT8 msg)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = playernum;
|
||||
buf[1] = msg;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------
|
||||
// end of extra data function
|
||||
// -----------------------------------------------------------------
|
||||
@@ -1117,10 +1122,7 @@ static void SV_SendResynch(INT32 node)
|
||||
|
||||
if (resynch_score[node] > (unsigned)cv_resynchattempts.value*250)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
buf[0] = (UINT8)nodetoplayer[node];
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(nodetoplayer[node], KICK_MSG_CON_FAIL);
|
||||
resynch_score[node] = 0;
|
||||
}
|
||||
}
|
||||
@@ -4432,11 +4434,7 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal add player command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -4520,11 +4518,7 @@ static void Got_RemovePlayer(UINT8 **p, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal remove player command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -4631,14 +4625,10 @@ void CL_AddSplitscreenPlayer(void)
|
||||
|
||||
void CL_RemoveSplitscreenPlayer(UINT8 p)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
if (cl_mode != CL_CONNECTED)
|
||||
return;
|
||||
|
||||
buf[0] = p;
|
||||
buf[1] = KICK_MSG_PLAYER_QUIT;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(p, KICK_MSG_PLAYER_QUIT);
|
||||
}
|
||||
|
||||
// is there a game running
|
||||
@@ -5263,13 +5253,8 @@ static boolean CheckForSpeedHacks(UINT8 p)
|
||||
|| netcmds[maketic%TICQUEUE][p].sidemove > MAXPLMOVE || netcmds[maketic%TICQUEUE][p].sidemove < -MAXPLMOVE
|
||||
|| netcmds[maketic%TICQUEUE][p].driftturn > KART_FULLTURN || netcmds[maketic%TICQUEUE][p].driftturn < -KART_FULLTURN)
|
||||
{
|
||||
char buf[2];
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal movement value received from node %d\n"), playernode[p]);
|
||||
//D_Clearticcmd(k);
|
||||
|
||||
buf[0] = (char)p;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(p, KICK_MSG_CON_FAIL);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -5482,11 +5467,7 @@ static void HandlePacketFromPlayer(SINT8 node)
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 buf[3];
|
||||
|
||||
buf[0] = (UINT8)netconsole;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(netconsole, KICK_MSG_CON_FAIL);
|
||||
DEBFILE(va("player %d kicked (synch failure) [%u] %d!=%d\n",
|
||||
netconsole, realstart, consistancy[realstart%TICQUEUE],
|
||||
SHORT(netbuffer->u.clientpak.consistancy)));
|
||||
@@ -5517,11 +5498,7 @@ static void HandlePacketFromPlayer(SINT8 node)
|
||||
}
|
||||
else
|
||||
{
|
||||
UINT8 buf[3];
|
||||
|
||||
buf[0] = (UINT8)netconsole;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(netconsole, KICK_MSG_CON_FAIL);
|
||||
DEBFILE(va("player %d kicked (synch failure) [%u] %d!=%d\n",
|
||||
netconsole, realstart, consistancy[realstart%TICQUEUE],
|
||||
SHORT(netbuffer->u.clientpak.consistancy)));
|
||||
@@ -5632,13 +5609,7 @@ static void HandlePacketFromPlayer(SINT8 node)
|
||||
nodewaiting[node] = 0;
|
||||
if (netconsole != -1 && playeringame[netconsole])
|
||||
{
|
||||
UINT8 buf[2];
|
||||
buf[0] = (UINT8)netconsole;
|
||||
if (netbuffer->packettype == PT_NODETIMEOUT)
|
||||
buf[1] = KICK_MSG_TIMEOUT;
|
||||
else
|
||||
buf[1] = KICK_MSG_PLAYER_QUIT;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(netconsole, (netbuffer->packettype == PT_NODETIMEOUT) ? KICK_MSG_TIMEOUT : KICK_MSG_PLAYER_QUIT);
|
||||
}
|
||||
Net_CloseConnection(node);
|
||||
nodeingame[node] = false;
|
||||
@@ -5652,10 +5623,7 @@ static void HandlePacketFromPlayer(SINT8 node)
|
||||
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
buf[0] = (UINT8)node;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(node, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -5677,10 +5645,7 @@ static void HandlePacketFromPlayer(SINT8 node)
|
||||
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
buf[0] = (UINT8)node;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(node, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -5744,10 +5709,7 @@ static void HandlePacketFromPlayer(SINT8 node)
|
||||
|
||||
if (server)
|
||||
{
|
||||
char buf[2];
|
||||
buf[0] = (char)node;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(node, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -5763,10 +5725,7 @@ static void HandlePacketFromPlayer(SINT8 node)
|
||||
|
||||
if (server)
|
||||
{
|
||||
char buf[2];
|
||||
buf[0] = (char)node;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(node, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -5794,10 +5753,7 @@ static void HandlePacketFromPlayer(SINT8 node)
|
||||
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
buf[0] = (UINT8)node;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(node, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -6594,8 +6550,6 @@ static inline void PingUpdate(void)
|
||||
UINT8 minimumkicklevel = (nonlaggers > 0) ? PINGKICK_LIMIT : PINGKICK_TICQUEUE;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
char buf[2];
|
||||
|
||||
if (!playeringame[i] || pingkick[i] < minimumkicklevel)
|
||||
continue;
|
||||
|
||||
@@ -6607,10 +6561,7 @@ static inline void PingUpdate(void)
|
||||
}
|
||||
|
||||
pingtimeout[i] = 0;
|
||||
|
||||
buf[0] = (char)i;
|
||||
buf[1] = KICK_MSG_PING_HIGH;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(i, KICK_MSG_PING_HIGH);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -616,6 +616,7 @@ void D_ClientServerInit(void);
|
||||
void RegisterNetXCmd(netxcmd_t id, void (*cmd_f)(UINT8 **p, INT32 playernum));
|
||||
void SendNetXCmdForPlayer(UINT8 playerid, netxcmd_t id, const void *param, size_t nparam);
|
||||
#define SendNetXCmd(id, param, nparam) SendNetXCmdForPlayer(0, id, param, nparam) // Shortcut for P1
|
||||
void SendKick(UINT8 playernum, UINT8 msg);
|
||||
|
||||
// Create any new ticcmds and broadcast to other players.
|
||||
void NetKeepAlive(void);
|
||||
|
||||
+20
-101
@@ -1432,11 +1432,7 @@ static void SetPlayerName(INT32 playernum, char *newname)
|
||||
CONS_Printf(M_GetText("Player %d sent a bad name change\n"), playernum+1);
|
||||
if (server && netgame)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2030,12 +2026,8 @@ static void Got_NameAndColor(UINT8 **cp, INT32 playernum)
|
||||
|
||||
if (kick)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal color change received from %s (team: %d), color: %d)\n"), player_names[playernum], p->ctfteam, p->skincolor);
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -2916,11 +2908,7 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal map change received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -3035,11 +3023,7 @@ static void Got_Pause(UINT8 **cp, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal pause command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -3153,11 +3137,7 @@ static void Got_Respawn(UINT8 **cp, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal respawn command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -3227,11 +3207,7 @@ static void Got_Clearscores(UINT8 **cp, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal clear scores command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -3750,11 +3726,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3765,11 +3737,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -3803,11 +3771,7 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
}
|
||||
return;
|
||||
@@ -3856,12 +3820,8 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
|
||||
|
||||
if (server && ((NetPacket.packet.newteam < 0 || NetPacket.packet.newteam > 3) || error))
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal team change received from player %s\n"), player_names[playernum]);
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
|
||||
//Safety first!
|
||||
@@ -4230,11 +4190,7 @@ static void Got_Verification(UINT8 **cp, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal verification received from %s (serverplayer is %s)\n"), player_names[playernum], player_names[serverplayer]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -4286,11 +4242,7 @@ static void Got_Removal(UINT8 **cp, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal demotion received from %s (serverplayer is %s)\n"), player_names[playernum], player_names[serverplayer]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -4366,11 +4318,7 @@ static void Got_MotD_f(UINT8 **cp, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal motd change received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
|
||||
Z_Free(mymotd);
|
||||
@@ -4429,11 +4377,7 @@ static void Got_RunSOCcmd(UINT8 **cp, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal runsoc command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -4742,13 +4686,8 @@ static void Got_RequestAddfilecmd(UINT8 **cp, INT32 playernum)
|
||||
|
||||
if ((playernum != serverplayer && !IsPlayerAdmin(playernum)) || kick)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal addfile command received from %s\n"), player_names[playernum]);
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -4797,11 +4736,7 @@ static void Got_Addfilecmd(UINT8 **cp, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal addfile command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -5611,11 +5546,7 @@ static void Got_ExitLevelcmd(UINT8 **cp, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal exitlevel command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -5633,11 +5564,7 @@ static void Got_SetupVotecmd(UINT8 **cp, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal vote setup received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -5698,11 +5625,7 @@ static void Got_PickVotecmd(UINT8 **cp, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal vote setup received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -6338,11 +6261,7 @@ void Got_DiscordInfo(UINT8 **p, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal Discord info command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
+3
-10
@@ -914,12 +914,9 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
|
||||
player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = (UINT8)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -934,11 +931,7 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal say command received from %s containing invalid characters\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
char buf[2];
|
||||
|
||||
buf[0] = (char)playernum;
|
||||
buf[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -94,11 +94,7 @@ deny:
|
||||
CONS_Alert(CONS_WARNING, M_GetText("Illegal lua command received from %s\n"), player_names[playernum]);
|
||||
if (server)
|
||||
{
|
||||
UINT8 bufn[2];
|
||||
|
||||
bufn[0] = (UINT8)playernum;
|
||||
bufn[1] = KICK_MSG_CON_FAIL;
|
||||
SendNetXCmd(XD_KICK, &bufn, 2);
|
||||
SendKick(playernum, KICK_MSG_CON_FAIL);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-5
@@ -4736,11 +4736,7 @@ void P_PlayerThink(player_t *player)
|
||||
&& !P_IsLocalPlayer(player)) // P_IsMachineLocalPlayer for DRRR
|
||||
{
|
||||
// Send kick
|
||||
UINT8 buf[2];
|
||||
|
||||
buf[0] = n;
|
||||
buf[1] = KICK_MSG_GRIEF;
|
||||
SendNetXCmd(XD_KICK, &buf, 2);
|
||||
SendKick(n, KICK_MSG_GRIEF);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user