Yea but, "The convar that is there currently is only for editing the amount of time the player is kept from using chat." I was referring to the tct_spamduration.
In your source, it says "If messages sent exceeds tct_spamcount within this time frame, it blocks them."
It seems like you were going to add tct_spamcount as a convar, which is what I want to edit, but it isn't implemented.
Is there a way I can change the "initial spam detector" to something weaker? I don't want it where tct_spamdurtion is the only configurable setting where it only changes the amount of time someone is on chat cooldown after he is detected.
Can you tell me how to change the "count of 3" in the sp file at least? Or maybe a snippet so I can just fix the sp and compile?
Quote:
Originally Posted by Headline
Moved to unapproved due to it not being supported
Quote:
Originally Posted by Jillchang
lol yea, guess I'm chopped liver.
That may have been a cvar from an even older version which is long gone...I'm not sure. This plugin was originally coded when I first started coding, and the public version was abandoned near the end of 2014 when I branched it off into other areas. You can copy the same idea and extend it to a fourth or 5th check. However, it was not a great way of doing it, since it was stacking message counts and so, as you noted, if tct_spamduration wasnt set just perfect (e.g. 2), the messages would stack and be counted as spam. Here is a snippet you could replace the system with that was backwards convert from new syntax to old and uses the public version's function names:
public Action:Command_Say(client, const String:command[], argc) { //LOOK INSIDE THIS FUNCTION FOR THIS: /*if(g_iSpamCoolDown[client]) { PrintToChat(client, "\x03You are sending messages too fast!"); return Plugin_Handled; } else if(g_iChatTime2[client]) { g_iSpamCoolDown[client] = 1; CreateTimer(g_fSpamDuration, TimerCallback_Spam3, client, TIMER_FLAG_NO_MAPCHANGE); } else if(g_iChatTime1[client]) { g_iChatTime2[client] = 1; CreateTimer(g_fSpamDuration, TimerCallback_Spam2, client, TIMER_FLAG_NO_MAPCHANGE); } else { g_iChatTime1[client] = 1; CreateTimer(g_fSpamDuration, TimerCallback_Spam1, client, TIMER_FLAG_NO_MAPCHANGE); }*/ }
public Action:Command_SayTeam(client, const String:command[], argc) { //LOOK INSIDE THIS FUNCTION FOR THIS: /*if(g_iSpamCoolDown[client]) { PrintToChat(client, "\x03You are sending messages too fast!"); return Plugin_Handled; } else if(g_iChatTime2[client]) { g_iSpamCoolDown[client] = 1; CreateTimer(g_fSpamDuration, TimerCallback_Spam3, client, TIMER_FLAG_NO_MAPCHANGE); } else if(g_iChatTime1[client]) { g_iChatTime2[client] = 1; CreateTimer(g_fSpamDuration, TimerCallback_Spam2, client, TIMER_FLAG_NO_MAPCHANGE); } else { g_iChatTime1[client] = 1; CreateTimer(g_fSpamDuration, TimerCallback_Spam1, client, TIMER_FLAG_NO_MAPCHANGE); }*/ }
/* public Action:TimerCallback_Spam3(Handle:Timer, any:client) { g_iSpamCoolDown[client] = 0; }
public Action:TimerCallback_Spam2(Handle:Timer, any:client) { g_iChatTime2[client] = 0; }
public Action:TimerCallback_Spam1(Handle:Timer, any:client) { g_iChatTime1[client] = 0; } */
Add the following:
Spoiler
PHP Code:
//chat spam blocker new ga_iChatMsgCnt[MAXPLAYERS + 1] = {0, ...}; new Handle:g_cSpamMsgCnt = INVALID_HANDLE;
public OnPluginStart() { // ADD THIS INSIDE THIS FUNCTION g_cSpamMsgCnt = AutoExecConfig_CreateConVar("tct_spam_count_short", "3", "Number of messages within the time interval set by tct_spamduration for it to be considered spam.", _, true, 2.0); }
public OnClientConnected(client) { // ADD THIS INSIDE THIS FUNCTION ga_iChatMsgCnt[client] = 0; }
public Action:Command_Say(client, const String:command[], argc) { // ADD THIS IN PLACE OF THE CONTENT THAT WAS REMOVED if(CheckForSpam(client)) { return Plugin_Handled; } }
public Action:Command_SayTeam(client, const String:command[], argc) { // ADD THIS IN PLACE OF THE CONTENT THAT WAS REMOVED if(CheckForSpam(client)) { return Plugin_Handled; } }
bool:CheckForSpam(client) // ADD THIS FUNCTION { if(!IsValidClient(client)) { return false; }
public Action:TimerCB_ReduceMsgCnt(Handle:hTimer, any:iUserID) // ADD THIS FUNCTION { new client = GetClientOfUserId(iUserID); if(IsValidClient(client)) { ga_iChatMsgCnt[client]--; } }
public Action:TimerCB_MsgsTooFast(Handle:hTimer, any:iUserID) // ADD THIS FUNCTION { new client = GetClientOfUserId(iUserID); if(IsValidClient(client)) { PrintToChat(client, "\x03You are sending messages too fast!"); } }
Here is an edit of this plugin version with the above done.
Is there an alternative to this plugin? I am looking for something simple to just change the colors of an administrators name according to the flag they have. I found this plugin active on another server that seems to work fine on but if it's no longer supported I don't see why it would.
Is there an alternative to this plugin? I am looking for something simple to just change the colors of an administrators name according to the flag they have. I found this plugin active on another server that seems to work fine on but if it's no longer supported I don't see why it would.
Because other server operators/owners who may know how to make plugins could fix it for their own server and not release it, that's why.
Is there an alternative to this plugin? I am looking for something simple to just change the colors of an administrators name according to the flag they have. I found this plugin active on another server that seems to work fine on but if it's no longer supported I don't see why it would.
This version is no longer supported, but should still work for CS:S/TF2 only (i.e. Source 2009 Games). The current version isn't public, but supports CS:S/TF2/CS:GO/Insurgency, and comes with web panels, full support and a lot of other changes (PM me for details regarding that). So, you may have seen that on other servers, or if CS:S/TF2, it could be this version.
Alternately, you may have seen servers running Simple Chat Colors or Custom Chat Colors (both require Simple Chat Processor to run), and i think there is versions for CS:GO floating in the comments of their threads.
Quote:
Originally Posted by 404UserNotFound
Because other server operators/owners who may know how to make plugins could fix it for their own server and not release it, that's why.
This version is no longer supported, but should still work for CS:S/TF2 only (i.e. Source 2009 Games). The current version isn't public, but supports CS:S/TF2/CS:GO/Insurgency, and comes with web panels, full support and a lot of other changes (PM me for details regarding that). So, you may have seen that on other servers, or if CS:S/TF2, it could be this version.
Alternately, you may have seen servers running Simple Chat Colors or Custom Chat Colors (both require Simple Chat Processor to run), and i think there is versions for CS:GO floating in the comments of their threads.
^ Or that.
I sent you PM regarding the version that is not public...
Not sure what I'm doing wrong here but this plug-in only seems to work for admins regardless of my cfg?
All fields in !settings are greyed out / unselectable and typing !settag [Yourtaghere] gives an "no access" chat response unless you're admin.
Here is my cfg and plug-ins list:
Spoiler
Code:
// This file was auto-generated by SourceMod (v1.8.0.5995)
// ConVars for plugin "togschattags.smx"
// If "", everyone can change their tags, otherwise, only players with this flag can access plugin features.
// -
// Default: "a"
tct_accessflag ""
// Only players with this flag can restrict/remove tags of players.
// -
// Default: "g"
tct_adminflag "z"
// Enable plugin (0 = Disabled, 1 = Enabled).
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
tct_enable "1"
// Enable chat logger.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
tct_log "0"
// Enable admin see-all (admins with set flag see even hidden chat).
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
tct_seeall "0"
// Flag required for admin see-all (if enabled).
// -
// Default: "z"
tct_seeallflag "z"
// Number of seconds used for the spam protection (0 = disabled). If messages sent exceeds tct_spamcount within this time frame, it blocks them.
// -
// Default: "5"
// Minimum: "0.000000"
tct_spamduration "5"
// Convert chat triggers to lowercase if theyre uppercase.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
tct_triggercase "1"
// Only players with this flag can unload the entire plugin until map change.
// -
// Default: "h"
tct_unloadflag "z"
Spoiler
Code:
sm plugins list
[SM] Listing 52 plugins:
01 "Admin File Reader" (1.8.0.5995) by AlliedModders LLC
02 "Admin Help" (1.8.0.5995) by AlliedModders LLC
03 "Admin List" (1.2) by Fredd
04 "Admins Manager" (1.2.1) by FrozDark (HLModders.ru LLC)
05 "Admin Menu" (1.8.0.5995) by AlliedModders LLC
06 "Advanced admin commands" (0.16) by 3sigma
07 "Advertisements" (2.0.2) by Tsunami
08 "AFK Manager" (4.1.2) by Rothgar
09 "Anti-Flood" (1.8.0.5995) by AlliedModders LLC
10 "Anti-TK" (1.1.3) by Rothgar
11 "Basic Ban Commands" (1.8.0.5995) by AlliedModders LLC
12 "Basic Chat" (1.8.0.5995) by AlliedModders LLC
13 "Basic Comm Control" (1.8.0.5995) by AlliedModders LLC
14 "Basic Commands" (1.8.0.5995) by AlliedModders LLC
15 "Basic Info Triggers" (1.8.0.5995) by AlliedModders LLC
16 "Basic Votes" (1.8.0.5995) by AlliedModders LLC
17 "Bot Clan Tag" (1.0.1) by Smacked
18 "Bot Names" (1.0) by Rakeri
19 "Bot Ping" (1.0.1) by Knagg0
20 "Chat Welcome Message" (1.0) by Harper
21 "Client Preferences" (1.8.0.5995) by AlliedModders LLC
22 "Enter server sound" (1.6) by Kemsan
23 "Files Management Interface" (1.0.2) by RedSword / Bob Le Ponge
24 "Fun Commands" (1.8.0.5995) by AlliedModders LLC
25 "Fun Votes" (1.8.0.5995) by AlliedModders LLC
26 "Damage report" (1.1.13) by Hell on Earth
27 "macrodox" (1.9) by aspi
28 "MapChooser" (1.8.0.5995) by AlliedModders LLC
29 "Nextmap" (1.8.0.5995) by AlliedModders LLC
30 "Map Nominations" (1.8.0.5995) by AlliedModders LLC
31 "Player Commands" (1.8.0.5995) by AlliedModders LLC
32 "RankMe" (2.8.3) by lok1
33 "Reserved Slots" (1.8.0.5995) by AlliedModders LLC
34 "Rock The Vote" (1.8.0.5995) by AlliedModders LLC
35 "Round End Sound" (2.3.9) by FrozDark
36 "Simple Chat Processor (Redux)" (2.1.0) by Simple Plugins, Mini
37 "SourceMod Anti-Cheat" (0.8.5.2) by SMAC Development Team
38 "SMAC Aimbot Detector" (0.8.5.2) by SMAC Development Team
39 "SMAC AutoTrigger Detector" (0.8.5.2) by SMAC Development Team
40 "SMAC Client Protection" (0.8.5.2) by SMAC Development Team
41 "SMAC Command Monitor" (0.8.5.2) by SMAC Development Team
42 "SMAC CS:S Anti-Flash" (0.8.5.2) by SMAC Development Team
43 "SMAC CS:S Anti-Smoke" (0.8.5.2) by SMAC Development Team
44 "SMAC CS:S Exploit Fixes" (0.8.5.2) by SMAC Development Team
45 "SMAC ConVar Checker" (0.8.5.2) by SMAC Development Team
46 "SMAC Rcon Locker" (0.8.5.2) by SMAC Development Team
47 "SMAC Anti-Speedhack" (0.8.5.2) by SMAC Development Team
48 "SMAC Spinhack Detector" (0.8.5.2) by SMAC Development Team
49 "SMAC Anti-Wallhack" (0.8.5.2) by SMAC Development Team
50 "Sound Commands" (1.8.0.5995) by AlliedModders LLC
51 "TOGs Chat Tags" (2.2) by That One Guy
52 "Web Shortcuts" (1.0.1) by James "sslice" Gray
(no error logs)
__________________
Server and web developer in -=Hell on Earth=- multi gaming community.
PM me or add me on STEAM for assistance with web development (MyBB, wordpress, PhPBB etc.)
Not sure what I'm doing wrong here but this plug-in only seems to work for admins regardless of my cfg?
All fields in !settings are greyed out / unselectable and typing !settag [Yourtaghere] gives an "no access" chat response unless you're admin.
Here is my cfg and plug-ins list:
Spoiler
Code:
// This file was auto-generated by SourceMod (v1.8.0.5995)
// ConVars for plugin "togschattags.smx"
// If "", everyone can change their tags, otherwise, only players with this flag can access plugin features.
// -
// Default: "a"
tct_accessflag ""
// Only players with this flag can restrict/remove tags of players.
// -
// Default: "g"
tct_adminflag "z"
// Enable plugin (0 = Disabled, 1 = Enabled).
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
tct_enable "1"
// Enable chat logger.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
tct_log "0"
// Enable admin see-all (admins with set flag see even hidden chat).
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
tct_seeall "0"
// Flag required for admin see-all (if enabled).
// -
// Default: "z"
tct_seeallflag "z"
// Number of seconds used for the spam protection (0 = disabled). If messages sent exceeds tct_spamcount within this time frame, it blocks them.
// -
// Default: "5"
// Minimum: "0.000000"
tct_spamduration "5"
// Convert chat triggers to lowercase if theyre uppercase.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
tct_triggercase "1"
// Only players with this flag can unload the entire plugin until map change.
// -
// Default: "h"
tct_unloadflag "z"
(no error logs)
The public version of this never supported a blank/public flag, or "none" flag or sets of flag combos. Replace the HasFlags function (lines 445-472) with this:
I've attached a revised version for you. Here is how the flags work with the above replacement:
Spoiler
The TOG Flag System: Access can be set to be a single flag, a set of required flags, or even sets of sets (separated by a semicolon, ;).
e.g. Setting the flag as "a" requires players to have the "a" flag to be considered a match.
e.g. "at" requires players to have both the "a" AND "t" flags to be considered a match.
e.g. "a;t" requires players to have either the "a" OR "t" flags to be considered a match.
e.g. "at;b" requires players to have EITHER: (both the "a" AND "t" flags), OR the "b" flag. If either of the two conditions apply, they are considered a match.
A few more inputs: "none" restricts access for all. "public" and empty quotes ("") make the access available to all.