PDA

View Full Version : Hide Chat Triggers


ferret
07-26-2007, 08:01
Nice and simple.

Create a list of triggers you don't want to display, and this plugin will (should) block them from being seen in chat. For example, statsme, rank, place, nextmap, ff, etc.

The plugin works off the first word of the chat message, so triggers with arguments like "trigger blah1 blah2" should also be blocked by just specifying "trigger"

The list is addons/sourcemod/configs/chattriggers.txt

INS should also be supported, but not tested.

As of time of posting, I haven't tested this yet. It's pretty straight forward though.

tcviper
07-26-2007, 08:03
Exactly what i needed, thank you! :)

Extreme_One
07-26-2007, 15:17
Ferret you are a star! Another one crossed off of my wishlist :)

imported_Anth0ny
07-27-2007, 03:10
thanks, nice plugin! =)

Extreme_One
07-28-2007, 06:11
Hmm can't get this to work.

The plugin is loaded:
11:09:54 [SM] Listing 12 plugins:
01 "Admin File Reader" (1.0.0.1166) by AlliedModders LLC
02 "Admin Help" (1.0.0.1166) by AlliedModders LLC
03 "Aimbot Detection" (0.0.1.0) by devicenull
04 "Anti-Flood" (1.0.0.1166) by AlliedModders LLC
05 "Basic Commands" (1.0.0.1166) by AlliedModders LLC
06 "Cvar Hider" (1.0.0.0) by AlliedModders LLC
07 "Healthkit On Death" (1.3.0) by Knagg0
08 "Reserved Slots" (1.0.0.1166) by AlliedModders LLC
09 "Spec for Cash" (1.0.1.0) by Shane A. ^BuGs^ Froebel
10 "Weapon Logging" (1.2) by Tobi17
11 "Hide Chat Triggers" (1.0.0.0) by AlliedModders LLC
12 "HLstatsX Plugin" (1.2) by Tobi17

addons/sourcemod/configs/chattriggers.txt :

"!funsounds"

Only added one command to test it out and it's not blocked from being displayed.

I tried removing the quotes and that failed.

I tried to remove the ! too to see if that was a reason but the chat command is still being displayed.

bobbobagan
07-30-2007, 07:02
I dont get it...

Would my chattriggers.txt look like this:

trigger motd
trigger blep
trigger mlep
trigger glep

tcviper
07-30-2007, 10:50
No you just add a word per line like:

rank
top10
top15
statsme

Extreme_One
08-04-2007, 10:17
This will not block any chat which is prefixed with an exclamation mark.


Example:
!radiooff
!musicoff
!testetc.. etc..

Otherwise it works perfectly ;)

I would file a bug report (http://bugs.alliedmods.net/) for this issue but this plugin isn't listed. (http://bugs.alliedmods.net/index.php?project=10&switch=1&do=index)

ferret
08-06-2007, 11:34
! is used by sourcemod as a built in command trigger. That may be the issue. I'll try to look at this shortly.

MoggieX
08-31-2007, 08:24
Could this get rid of the 'fire in the hole' messages in CS:Source?

st0kata
09-30-2007, 16:50
too bad there isn't such plugin for cs1.6 :/
ot: nice idea and will definitely use it for my css serv :)

FatGamer.net
10-28-2007, 20:37
dude....this plugin is excellent. It needs to be a base plugin.

ThatGuy
12-01-2007, 03:51
Could it also exclude admins commands when you use them?


For Example: when do you do sm_rcon sv_cheats 1

Could you disable the message popping up displaying that sv_cheats has been turned off/on ?

ferret
12-03-2007, 10:04
ThatGuy: No, I can't stop that. You'd have to change the sm_rcon command. It's in the basecommands.sp file, you can simply put // in front of the function that sends the message. Then recompile.

Manni
12-03-2007, 11:13
Hello nice script.

But i wan't to block only my admin spawn commands like !box1 or !tree1
and this don't work? So that people don't see the commands because they always retype it in the chat to try if they can spawn it too. (but they can't :D )

Can it be fixed?

ferret
12-03-2007, 11:29
Do you have "!box1" in your file? You'd need the ! too.

Bloodlvst
12-03-2007, 11:31
ThatGuy: No, I can't stop that. You'd have to change the sm_rcon command. It's in the basecommands.sp file, you can simply put // in front of the function that sends the message. Then recompile.

Thanks ferret! I've been wondering how to do that, just never concerned me enough to bother. Always thought it was a built-in function of CSS.

Manni
12-03-2007, 12:25
here for example:

test123 <- blocked fine
miamivice <- blocked fine
!box1 <- don't block

(hl2dm server, linux)

Bloodlvst
12-03-2007, 12:56
here for example:

test123 <- blocked fine
miamivice <- blocked fine
!box1 <- don't block

(hl2dm server, linux)

That's probably because ! is a public command.

If you can use !box1, then by theory /box1 should work (silently) as well, provided it's a SourceMod plugin.

What kind of plugin is it ifor?

Manni
12-04-2007, 18:46
Hm?

Will it be fixed, sometime if you have time for it ferret?
or is this impossible, cause this !commands are a forced free to air command?

ThatGuy
12-04-2007, 19:44
ThatGuy: No, I can't stop that. You'd have to change the sm_rcon command. It's in the basecommands.sp file, you can simply put // in front of the function that sends the message. Then recompile.


I tried ding this but it still doesn't work, it still says

Server cvar 'sv_cheats' changed to 1

because it's a server command I guess, not from a plugin.

:( any other way?

ferret
12-05-2007, 08:29
There's a flag on cvars called NOTIFY. You have to remove it from the cvar to stop that message.

Manni
12-07-2007, 03:19
Hm?

Will it be fixed, sometime if you have time for it ferret?
or is this impossible, cause this !commands are a forced free to air command?

Help? Possible or not?

Extreme_One
12-07-2007, 03:57
I use some custom commands which aren't SM commands (in an ES script) but use a ! prefix and these are always displayed even though they're set up to be blocked by this plugin.
Would be nice if I could block them without needing to change the prefix

Manni
12-07-2007, 10:17
I can't (and won't) change the !commands. Thats the problem.
Hmmm :/

ferret
12-10-2007, 15:45
http://forums.alliedmods.net/showthread.php?t=64199

HSFighter
02-28-2008, 18:23
Could this get rid of the 'fire in the hole' messages in CS:Source?

I search exactly the same solution to disable the chatmessage 'fire in the hole' !!!
Anyone Idas to Block this message??

DarthNinja
11-03-2009, 04:02
I search exactly the same solution to disable the chatmessage 'fire in the hole' !!!
Anyone Idas to Block this message??


http://forums.alliedmods.net/showthread.php?p=685905

J. Armin
01-28-2011, 22:28
Any chance of this being updated? I would like to use this to block the !medic chat trigger in Day of Defeat: Source.

imvunoob
05-02-2011, 02:00
Nice and simple.

Create a list of triggers you don't want to display, and this plugin will (should) block them from being seen in chat. For example, statsme, rank, place, nextmap, ff, etc.

The plugin works off the first word of the chat message, so triggers with arguments like "trigger blah1 blah2" should also be blocked by just specifying "trigger"

The list is addons/sourcemod/configs/chattriggers.txt

INS should also be supported, but not tested.

As of time of posting, I haven't tested this yet. It's pretty straight forward though.


hi ferret, pardon me as i'm still can't get it work. already download your plugin 'hidechattriggers.smx', how to apply it to imvu chat?

thanks you.

loranger
01-17-2012, 00:16
btw when u use "!" in sourcemod, it print the cmd in chat but when u use "/" its a silent trigger

vodka00
01-23-2013, 16:33
Wonderful plugin, it is very useful. But I am having troubles blocking commands with '!' in front of them.

vodka00
09-15-2013, 16:27
Does anyone else have problems with hiding the default sourcemod triggers? Like currentmap and timeleft? If I block them then they don't show up in chat but also don't go through and show the information they are supposed to show.

It works fine with other triggers like votekick and rtv.

Eragon
02-27-2014, 01:48
Added it but it blocks the output..
Added : FF to the txt file..
It blocks FF and [SM] Friendly Fire is enabled.
Dont know if thats a mistake or not but i dont want it when i cant see sm output.

s.m.a.c head
02-27-2014, 03:17
Wonderful plugin, it is very useful. But I am having troubles blocking commands with '!' in front of them.

just use "/" its a silent trigger rather than "!" which is public

The Nameless One
05-24-2014, 12:49
You need to put trigger before the name...
ex. trigger !funsounds

Hmm can't get this to work.

The plugin is loaded:
11:09:54 [SM] Listing 12 plugins:
01 "Admin File Reader" (1.0.0.1166) by AlliedModders LLC
02 "Admin Help" (1.0.0.1166) by AlliedModders LLC
03 "Aimbot Detection" (0.0.1.0) by devicenull
04 "Anti-Flood" (1.0.0.1166) by AlliedModders LLC
05 "Basic Commands" (1.0.0.1166) by AlliedModders LLC
06 "Cvar Hider" (1.0.0.0) by AlliedModders LLC
07 "Healthkit On Death" (1.3.0) by Knagg0
08 "Reserved Slots" (1.0.0.1166) by AlliedModders LLC
09 "Spec for Cash" (1.0.1.0) by Shane A. ^BuGs^ Froebel
10 "Weapon Logging" (1.2) by Tobi17
11 "Hide Chat Triggers" (1.0.0.0) by AlliedModders LLC
12 "HLstatsX Plugin" (1.2) by Tobi17

addons/sourcemod/configs/chattriggers.txt :

"!funsounds"

Only added one command to test it out and it's not blocked from being displayed.

I tried removing the quotes and that failed.

I tried to remove the ! too to see if that was a reason but the chat command is still being displayed.

ClassicGuzzi
05-24-2014, 20:53
it's easier to change the trigger character.
Go to /tf/addons/sourcemod/configs/core.cfg
And make the '!' your silent trigger
/**
* String to use as the public chat trigger. Set an empty string to disable.
*/
"PublicChatTrigger" "!"

/**
* String to use as the silent chat trigger. Set an empty string to disable.
*/
"SilentChatTrigger" "/"

FishDude
11-14-2014, 14:58
If !-commands are not blocked by this (any) plugin, is very little benefit.
And what, is even theoretically impossible to block "!"-commands echo?

MaltSNS
01-31-2015, 01:59
/**
* hidechattriggers.sp
* Lets you specify a list of chat messages to not display
* This file is part of SourceMod, Copyright (C) 2004-2007 AlliedModders LLC
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Version: $Id$
*/

#pragma semicolon 1

#include <sourcemod>

public Plugin:myinfo =
{
name = "Hide Chat Triggers",
author = "AlliedModders LLC",
description = "Block chat commands from displaying",
version = "1.0.0.0",
url = "http://www.sourcemod.net/"
};

/* Handles to convars used by plugin */
new Handle:g_TriggerList = INVALID_HANDLE;
new bool:g_INS = false;

public OnPluginStart()
{
g_TriggerList = CreateArray(64);

RegConsoleCmd("say", Command_Say);
RegConsoleCmd("say_team", Command_Say);

decl String:modname[64];
GetGameFolderName(modname, sizeof(modname));

if (strcmp(modname, "ins") == 0)
{
g_INS = true;
RegConsoleCmd("say2", Command_Say);
}

}

stock bool:IsValidCvarChar(c)
{
return (c == '_' || IsCharAlpha(c) || IsCharNumeric(c) || c == '!');
}

public OnConfigsExecuted()
{
decl String:path[PLATFORM_MAX_PATH];

BuildPath(Path_SM, path, sizeof(path), "configs/chattriggers.txt");

new Handle:file = OpenFile(path, "rt");

if (file == INVALID_HANDLE)
{
LogError("[SM] Could not open file: %s", path);
return;
}

decl String:buffer[255];
while (!IsEndOfFile(file) && ReadFileLine(file, buffer, sizeof(buffer)))
{
TrimString(buffer);
if (buffer[0] == '\0' || !IsValidCvarChar(buffer[0]))
{
continue;
}

PushArrayString(g_TriggerList, buffer);
}

CloseHandle(file);
}

public Action:Command_Say(client, args)
{
decl String:text[192];
GetCmdArgString(text, sizeof(text));

new startidx;
if (text[strlen(text)-1] == '"')
{
text[strlen(text)-1] = '\0';
startidx = 1;
}

if (g_INS)
{
startidx += 4;
}

decl String:trigger[192];
BreakString(text[startidx], trigger, sizeof(trigger));

decl String:hidden[64];
new count = GetArraySize(g_TriggerList);
for (new i = 0; i < count; i++)
{
GetArrayString(g_TriggerList, i, hidden, sizeof(hidden));
if (strcmp(trigger, hidden, false) == 0)
{
return Plugin_Handled;
}
}

return Plugin_Continue;
}

Should fix the ! commands still showing in chat problem. Just slightly changing a line in the IsValidCvarChar function seems to have done the trick. Pretty sure commands like currentmap and timeleft can't be hidden using the current method for hiding chat messages.

Psyk0tik
10-27-2017, 12:47
Does this still work?

I have chat triggers that use + in front of them. Would I need to edit anything for the plugin to recognize the + sign?

axelnieves2012
01-25-2019, 20:19
Not working...
My TXT file:

[SM]


Not working when I try to block that annoying messages from sourcemod.
I have a plugin that changes a lot of cvars according to game difficulty, and that chat messages from sourcemod are very annoying.
[SM] Console: Cvar "l4d_ig_random_supply" cambiada a "0".

JoinedSenses
01-26-2019, 11:22
This plugin hides chat triggers, not chat messages. If someone types commands such as !help, they will normally show - this plugin will hide those messages.

Dmitry Sorokin
05-16-2019, 08:29
Hi! Does this work for commands like sm plugins list?

DarkDeviL
05-16-2019, 13:10
Hi! Does this work for commands like sm plugins list?

Such kind of stuff won't be supported on AlliedModders.