mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-03-01 17:01:24 +00:00
PT_SAY: Review fixup
This commit is contained in:
parent
5854969fa9
commit
08ffc79b5c
2 changed files with 2 additions and 7 deletions
|
|
@ -4991,14 +4991,13 @@ static void PT_Say(int node)
|
|||
stop_spamming[say.source] = 4;
|
||||
|
||||
serverplayer_t *stats = SV_GetStatsByPlayerIndex(say.source);
|
||||
int remainingGames = cv_gamestochat.value - stats->finishedrounds;
|
||||
|
||||
if (remainingGames > 0 && !(IsPlayerAdmin(say.source)))
|
||||
if (stats->finishedrounds < (uint32_t)cv_gamestochat.value && !(IsPlayerAdmin(say.source)))
|
||||
{
|
||||
CONS_Debug(DBG_NETPLAY,"Received SAY cmd from Player %d (%s), but they aren't permitted to chat yet.\n", say.source+1, player_names[say.source]);
|
||||
|
||||
char rejectmsg[256];
|
||||
strlcpy(rejectmsg, va("Please finish in %d more games to use chat.", remainingGames), 256);
|
||||
strlcpy(rejectmsg, va("Please finish in %d more games to use chat.", cv_gamestochat.value - stats->finishedrounds), 256);
|
||||
if (IsPlayerGuest(say.source))
|
||||
strlcpy(rejectmsg, va("GUESTs can't chat on this server. Rejoin with a profile to track your playtime."), 256);
|
||||
SendServerNotice(say.source, rejectmsg);
|
||||
|
|
|
|||
|
|
@ -628,7 +628,6 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
|
|||
char *msg;
|
||||
boolean action = false;
|
||||
char *ptr;
|
||||
INT32 spam_eatmsg = 0;
|
||||
|
||||
CONS_Debug(DBG_NETPLAY,"Received SAY cmd from Player %d (%s)\n", playernum+1, player_names[playernum]);
|
||||
|
||||
|
|
@ -658,9 +657,6 @@ static void Got_Saycmd(UINT8 **p, INT32 playernum)
|
|||
}
|
||||
}
|
||||
|
||||
if (spam_eatmsg)
|
||||
return;
|
||||
|
||||
// If it's a CSAY, just CECHO and be done with it.
|
||||
if (flags & HU_CSAY)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue