mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-01-28 04:00:41 +00:00
Minor code cleanup, CHAT
This commit is contained in:
parent
a66a2021ba
commit
7e9411f320
1 changed files with 119 additions and 119 deletions
|
@ -585,7 +585,7 @@ static void Command_CSay_f(void)
|
|||
|
||||
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.
|
||||
* \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.
|
||||
|
||||
//if (stop_spamming_you_cunt[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 && 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]);
|
||||
stop_spamming_you_cunt[playernum] = 4;
|
||||
stop_spamming[playernum] = 4;
|
||||
spam_eatmsg = 1;
|
||||
}
|
||||
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.
|
||||
|
||||
|
@ -1995,7 +1995,7 @@ void HU_Drawer(void)
|
|||
if (!OLDCHAT)
|
||||
HU_DrawChat();
|
||||
else
|
||||
HU_DrawChat_Old(); // why the fuck.........................
|
||||
HU_DrawChat_Old();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2012,8 +2012,8 @@ void HU_Drawer(void)
|
|||
// handle spam while we're at it:
|
||||
for(; (i<MAXPLAYERS); i++)
|
||||
{
|
||||
if (stop_spamming_you_cunt[i] > 0)
|
||||
stop_spamming_you_cunt[i]--;
|
||||
if (stop_spamming[i] > 0)
|
||||
stop_spamming[i]--;
|
||||
}
|
||||
|
||||
// handle chat timers
|
||||
|
|
Loading…
Reference in a new issue