mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2014
Posts: 54
O
Orobas Offline OP
Babel fish
OP Offline
Babel fish
O
Joined: Oct 2014
Posts: 54
Looking for an automated tempshun script based on a user tripping spamfilter x times in x hours
I've made a bit of a start with notes of what i would like to do but need script edited and finished please.
Note - The below script is not a working script and is there purely as an illustrative idea as to what i am looking for

Code:
;event for trigger
on *:@spam: {
inc %spam.counter. $+ $nick 1
;to add.. add $nick to notify
/notify $nick spammer
;to add.. timer in the counter section for 1 hour
;timer will be a failsafe and will reset the spamcounter if the required trips havent been counted
;in that time period. This guards against ping timeouts from my irc client.
if (%spam.counter. [ $+ [ $nick ] ] == 3) { tempshun $nick multiple_trips_of_spamfilter }
.msg #tempshun $nick has been auto tempshunned.
}
;clear once nick has gone offline and remove from notify

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
https://forums.mirc.com/ubbthreads.php/topics/264511/Simple_One_Man_Spam_Prevention#Post264511

Looks like this other thread can be modified. The repeat counter only flags when they say something X times in a row, while the flood counter flags when they say anything X times in Y minutes.

So you could modify it so that you would call the flood counter alias only when they did what ever qualifies as spam, in which case it's counting spam incidents within the time frame. Using a hashtable avoids having a rats nest of variables to keep track of people and their messages, allowing each individual message to automagically expire by itself, avoiding a lot of calculation each time they spam.

By resetting when they go offline, does this mean they can cheat by simply doing "/hop" to temporarily exit the channel and restart the timer, or just quit then come back? If you really want that, the :PART: and :QUIT: events could be trapped to forget all their infractions.

Joined: Oct 2014
Posts: 54
O
Orobas Offline OP
Babel fish
OP Offline
Babel fish
O
Joined: Oct 2014
Posts: 54
Hi Maroon,

I made a few errors in what i was looking for sorry which your reply prompted me to double check about..

Essentially.. script is to look at snotice spam notices. if a user triggers a filter.. it is to start counting on that user. If the user trips the filter more than 3 times in an hour, the script is to then fully shun the user for a day (*!*@hostmask)
If the user does not trip the filter more than 3 times in an hour.. the script resets against that user.

my apologies once again for the error on my original posting

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
If you look at that thread, it has settings for the 'flood' alias to set the number of incidents and the timeframe. So if you change the max.messages variable to be 2, then it takes action against the 3rd. The %timeframe would be 3600 for the number of seconds. This has each infraction be a hashtable item which exists for 3600 seconds, so instead of resetting the counter back to zero, it's a sliding counter which counts the number of incidents which have not yet expired.

Instead of calling the flood alias for each time they speak, you would call it only when they've done something which matches the unspecified spam filter, and it counts only those items. You can test it out by having the actions be an echo message instead of actually doing something.


Link Copied to Clipboard