Raised This Month: $51 Target: $400
 12% 

[ANY?] Unique Chat


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Mitchell
~lick~
Join Date: Mar 2010
Plugin ID:
5795
Plugin Version:
1.0.0
Plugin Category:
Server Management
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Prevents players from spamming chat messages that might not be unique.
    Old 08-30-2017 , 22:22   [ANY?] Unique Chat
    Reply With Quote #1

    Unique Chat




    This plugin is for servers that have a hard time handling chat-bind spams, with this a player can only say the same thing ever X seconds.
    By default the player can only say the same thing once every 120 seconds, or until their cache loads up at 60 chat messages.
    Originally designed for my TF2 murder server, where muting/gaging players because they pressed a chat bind would impact gameplay.

    ConVars

    sm_uniquechat_display - Display a chat message, 0 - Off, 1 - Telling the message is redundant, 2 - Displays the time before they can say it again.
    sm_uniquechat_time - The maximum amount of time to store a chat message, 0 to disable time checking.
    sm_uniquechat_max - The maximum amount of chat messages to store in the cache.
    sm_uniquechat_ignoreflag - If the user has this flag then they are ignored from any checks. -1 - Ignore every one (Disables this plugin), 0 - Ignores no one.


    Download ZIP
    GitHub Link

    Last edited by Mitchell; 08-31-2017 at 10:06.
    Mitchell is offline
    sneaK
    SourceMod Moderator
    Join Date: Feb 2015
    Location: USA
    Old 09-05-2017 , 20:30   Re: [ANY?] Unique Chat
    Reply With Quote #2

    Niceeee, I like it. Any way to not show the spam message if someone is using a chat trigger?
    __________________
    sneaK is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 09-05-2017 , 21:31   Re: [ANY?] Unique Chat
    Reply With Quote #3

    Quote:
    Originally Posted by sneaK View Post
    Niceeee, I like it. Any way to not show the spam message if someone is using a chat trigger?
    Yeah I was wondering this also, is there any way to determine if the command is a chat hooked command? I wouldn't want to just exclude all messages starting with "!", unless i hide that message completely.
    Mitchell is offline
    xF . Tick Tock Man
    Member
    Join Date: Feb 2015
    Old 09-08-2017 , 18:48   Re: [ANY?] Unique Chat
    Reply With Quote #4

    This is awesome.

    Only improvement I can see would be to add a cvar controlling the cooldown on unique chat messages - it's default is 120 seconds, which is actually pretty long for a chat cycle.

    Having the ability to customize that interval would be spiffy.

    Last edited by xF . Tick Tock Man; 09-08-2017 at 18:48.
    xF . Tick Tock Man is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 09-08-2017 , 19:41   Re: [ANY?] Unique Chat
    Reply With Quote #5

    You mean the convar "sm_uniquechat_time" ?
    Mitchell is offline
    Peace-Maker
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 09-08-2017 , 20:41   Re: [ANY?] Unique Chat
    Reply With Quote #6

    Quote:
    Originally Posted by Mitchell View Post
    Yeah I was wondering this also, is there any way to determine if the command is a chat hooked command? I wouldn't want to just exclude all messages starting with "!", unless i hide that message completely.
    https://sm.alliedmods.net/new-api/console/IsChatTrigger
    __________________
    Peace-Maker is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 09-12-2017 , 14:34   Re: [ANY?] Unique Chat
    Reply With Quote #7

    I plan on changing how this works instead of having one ConVar define the time, I'm going to make it so certain words can be added to a config and defined an expiration time. The convar will be used for any words that do not exist in the config. This will prevent "motd" etc having a cooldown of 120 seconds etc. I still have yet to mess with the IsChatTrigger().

    Last edited by Mitchell; 09-12-2017 at 14:37.
    Mitchell is offline
    Reply



    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 10:58.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode