Raised This Month: $ Target: $400
 0% 

Hide Repeated Messages


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   General Purpose       
B3n
Member
Join Date: Jul 2006
Old 07-13-2009 , 14:33   Hide Repeated Messages
Reply With Quote #1

Hide Repeated Messages v0.1

Simple plugin to hide repeated messages. I created it to lower the chat noise on my server. It's an easy way to hide repeated spam messages, and say commands such as "/rank".

It compares each message against the last 9 messages, and doesn't show it if it's the same as any of them. If you want it to compare with more/less messages change NUMOFMESSAGES and recompile.

This is my first plugin, please let me know how I can improve the code.
Attached Files
File Type: sma Get Plugin or Get Source (ben_spam.sma - 853 views - 707 Bytes)

Last edited by B3n; 07-13-2009 at 15:36.
B3n is offline
algoasi
Member
Join Date: Nov 2008
Location: Pluton
Old 07-13-2009 , 14:40   Re: Hide Repeated Messages
Reply With Quote #2


good contribution thanks B3n
algoasi is offline
Send a message via MSN to algoasi
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 07-13-2009 , 14:53   Re: Hide Repeated Messages
Reply With Quote #3

cool
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-13-2009 , 15:02   Re: Hide Repeated Messages
Reply With Quote #4

Nice idea, you could just check last specific players messages.
Any reason you don't use equal or equali natives ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 07-13-2009 , 15:05   Re: Hide Repeated Messages
Reply With Quote #5

Exolent's Anti-Spam does this.
__________________
joaquimandrade is offline
B3n
Member
Join Date: Jul 2006
Old 07-13-2009 , 15:35   Re: Hide Repeated Messages
Reply With Quote #6

Thanks.

Quote:
Originally Posted by ConnorMcLeod View Post
Nice idea, you could just check last specific players messages.
Any reason you don't use equal or equali natives ?
I prefer it to check against messages from all players, it's simpler and blocks more noise.

I didn't know about equal/equali: I'm new to this. :p I've updated the code.

Quote:
Originally Posted by joaquimandrade View Post
Exolent's Anti-Spam does this.
That blocks the text and displays a "Stop spamming messages!" warning. If I use a Kreedz plugin on my server and people type ".checkpoint" or ".gocheck" a lot then it will stop them from being able to do it. Or I think you can set it to not block them, but then you have all the noise again. Maybe they're too similar, I don't know.
B3n is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-13-2009 , 15:38   Re: Hide Repeated Messages
Reply With Quote #7

Quote:
Originally Posted by B3n View Post
That blocks the text and displays a "Stop spamming messages!" warning. If I use a Kreedz plugin on my server and people type ".checkpoint" or ".gocheck" a lot then it will stop them from being able to do it. Or I think you can set it to not block them, but then you have all the noise again. Maybe they're too similar, I don't know.
Quote:
Originally Posted by Exolent[jNr] View Post
Adding Non-Admin Chat Commands:

Attached to this post, there is a file called antispam.ini.
Open that file and there are instructions on how to use it.
When you are finished, place it in your server's addons/amxmodx/configs folder.
antispam.ini
Code:
; Say commands for Anti-Chat Spam by Exolent
;
; This file is used for chat commands that aren't admin commands
; Such as /rank, /me, timeleft, etc.
;
; Examples of admin commands are /slay
; Do not add these to this file. They will automatically be detected.
;
; Format:
; "command" "flag"
;
; Flags:
; 0 - Used in normal chat only
; 1 - Used in normal and team chat

; The following are for the default map choosing plugin from AMX Mod X
; To enable them, remove the ";" in front of the line
;"nextmap" 0
;"currentmap" 0
;"ff" 0

; The following are for the CStrike addon:
; To enable them, remove the ";" in front of the line
;"/hp" 1
;"/statsme" 1
;"/rankstats" 1
;"/me" 1
;"/score" 1
;"/rank" 1
;"/report" 1
;"/top15" 1
;"/stats" 1
;"/switch" 1
Yours is still different than mine, because yours checks the recently used chat messages, rather than only allowing each message to be sent once.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
joaquimandrade
Veteran Member
Join Date: Dec 2008
Location: Portugal
Old 07-13-2009 , 15:41   Re: Hide Repeated Messages
Reply With Quote #8

They do the same in the end (alleviate the chat from repeated messages). But his handle the says individually (per client). So, they have a little difference but, I think his method is better and makes this one redundant, sorry. Anyway, my opinion doesn't matter.

Check it out.

http://forums.alliedmods.net/showthread.php?t=90414
__________________
joaquimandrade is offline
KadiR
Unnecessary Member
Join Date: Aug 2008
Location: Zürich / Switzerland
Old 07-13-2009 , 16:18   Re: Hide Repeated Messages
Reply With Quote #9

or this...

http://forums.alliedmods.net/showthread.php?p=766616
KadiR is offline
crazyeffect
Veteran Member
Join Date: Jul 2008
Location: Belgium
Old 07-14-2009 , 15:47   Re: Hide Repeated Messages
Reply With Quote #10

Working perfect on CZ
__________________
crazyeffect is offline
Send a message via MSN to crazyeffect
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 02:42.


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