Minor code cleanup, CHAT
This commit is contained in:
parent
a66a2021ba
commit
7e9411f320
|
@ -585,7 +585,7 @@ static void Command_CSay_f(void)
|
||||||
|
|
||||||
DoSayCommand(0, 1, HU_CSAY);
|
DoSayCommand(0, 1, HU_CSAY);
|
||||||
}
|
}
|
||||||
static tic_t stop_spamming_you_cunt[MAXPLAYERS];
|
static tic_t stop_spamming[MAXPLAYERS];
|
||||||
|
|
||||||
/** Receives a message, processing an ::XD_SAY command.
|
/** Receives a message, processing an ::XD_SAY command.
|
||||||
* \sa DoSayCommand
|
* \sa DoSayCommand
|
||||||
|
@ -648,15 +648,15 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
|
||||||
|
|
||||||
// before we do anything, let's verify the guy isn't spamming, get this easier on us.
|
// before we do anything, let's verify the guy isn't spamming, get this easier on us.
|
||||||
|
|
||||||
//if (stop_spamming_you_cunt[playernum] != 0 && cv_chatspamprotection.value && !(flags & HU_CSAY))
|
//if (stop_spamming[playernum] != 0 && cv_chatspamprotection.value && !(flags & HU_CSAY))
|
||||||
if (stop_spamming_you_cunt[playernum] != 0 && consoleplayer != playernum && cv_chatspamprotection.value && !(flags & HU_CSAY))
|
if (stop_spamming[playernum] != 0 && consoleplayer != playernum && cv_chatspamprotection.value && !(flags & HU_CSAY))
|
||||||
{
|
{
|
||||||
CONS_Debug(DBG_NETPLAY,"Received SAY cmd too quickly from Player %d (%s), assuming as spam and blocking message.\n", playernum+1, player_names[playernum]);
|
CONS_Debug(DBG_NETPLAY,"Received SAY cmd too quickly from Player %d (%s), assuming as spam and blocking message.\n", playernum+1, player_names[playernum]);
|
||||||
stop_spamming_you_cunt[playernum] = 4;
|
stop_spamming[playernum] = 4;
|
||||||
spam_eatmsg = 1;
|
spam_eatmsg = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
stop_spamming_you_cunt[playernum] = 4; // you can hold off for 4 tics, can you?
|
stop_spamming[playernum] = 4; // you can hold off for 4 tics, can you?
|
||||||
|
|
||||||
// run the lua hook even if we were supposed to eat the msg, netgame consistency goes first.
|
// run the lua hook even if we were supposed to eat the msg, netgame consistency goes first.
|
||||||
|
|
||||||
|
@ -1995,7 +1995,7 @@ void HU_Drawer(void)
|
||||||
if (!OLDCHAT)
|
if (!OLDCHAT)
|
||||||
HU_DrawChat();
|
HU_DrawChat();
|
||||||
else
|
else
|
||||||
HU_DrawChat_Old(); // why the fuck.........................
|
HU_DrawChat_Old();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2012,8 +2012,8 @@ void HU_Drawer(void)
|
||||||
// handle spam while we're at it:
|
// handle spam while we're at it:
|
||||||
for(; (i<MAXPLAYERS); i++)
|
for(; (i<MAXPLAYERS); i++)
|
||||||
{
|
{
|
||||||
if (stop_spamming_you_cunt[i] > 0)
|
if (stop_spamming[i] > 0)
|
||||||
stop_spamming_you_cunt[i]--;
|
stop_spamming[i]--;
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle chat timers
|
// handle chat timers
|
||||||
|
|
Loading…
Reference in a new issue