Posted in 6 years and 4 months ago

Add gag query to BaseChat

By default, sending a message to the authorities via chat, which is set to the "@" tag, sends it without checking if the sender has found an active gag penalty. This issue can cause the player to still annoy the authorities from the authorized chat, even though the player has received a gag penalty.

First step

Put it on top line

#include <basecomm>

Second step

Add this instead of "if (IsClientInGame(i) && (from == i || Ch..." in void "SendChatToAdmins" (Line: 363 in version 1.8.0.6015)

if (!BaseComm_IsClientGagged(i))
  {
    CPrintToChat(i, "[SM] %s%N: %s", fromAdmin ? "(Admin) " : "(Player) ", from, message);
  }

Last step

Compile the file.

Tags:
PHP
Published on 14 Aug, 2017
Last edit on 15 Dec, 2023