mIRC Home    About    Download    Register    News    Help

Topic Options
#262854 - 14/04/18 12:54 AM I need a script for repeat text
Tano Offline
Ameglian cow

Registered: 12/04/18
Posts: 21
I need a script for repeat text for mirc script with text and action to be banned or
stoped the same user who make repeat flood with same IP?Hostmask to be blocked banned inchannel to Hostmask , user make flood in this way,

example 1:

Guest34354: Hello Everybody Gangsta Is Back
Guest34354: Hello Everybody Gangsta Is Back
Guest34354: Hello Everybody Gangsta Is Back

example 2:

Guest34354: Hello Everybody Gangsta Is Back
Guest34354: Hello Everybody Gangsta Is Back s
Guest34354: Hello Everybody Gangsta Is Back sd
Guest34354: Hello Everybody Gangsta Is Back sdf
Guest34354: Hello Everybody Gangsta Is Back sdfg
Guest34354: Hello Everybody Gangsta Is Back sdfgh


what i need is tthe script to match the same repeat word in text flood from the same user with same IP/HOST in channel, when they make 2 line repeat to be baned from me to put how letters he is using 25 40 the time of flood 2 line for 1sec
guys any idea suggestion ? ty in advance


Edited by Tano (14/04/18 01:00 AM)

Top
#262881 - 15/04/18 05:00 PM Re: I need a script for repeat text [Re: Tano]
maroon Offline
Hoopy frood

Registered: 12/01/04
Posts: 766
Inside the :TEXT: event,

/hadd -mu300 LastMsg $nick $strip($1-)
... puts the last thing someone says into the table for 5 minutes, assuming you don't want to compare against something they said 2 days ago. You can first compare

if ($hget(LastMsg,$nick) == $strip($1-)) echo -a This is a match

The other part is harder to compare. You can use "isin" instead of "==" but it's too easy for false matches. Such as someone saying "no" and then the next sentence contains those 2 letters somewhere inside. You could also check to see if newline isin oldline, if they do the repeats backwards, and could also add an additional check for pairs of messages that are both above a certain minimum. But any spammer who gets kicked for example2 can easily alter their spam to avoid just about any rules you can think of.

Top
#262991 - 02/05/18 08:08 PM Re: I need a script for repeat text [Re: maroon]
SLiprockS Offline
Ameglian cow

Registered: 25/10/05
Posts: 24
Loc: Dhk,BD
Hi Maroon,

How about number of user saying the same thing within the period such as

<Guest2201> This is my buddy
<Guest2202> This is my buddy
<Guest2203> This is my buddy
<Guest2204> This is my buddy
<Guest2205> This is my buddy
<Guest2206> This is my buddy
<Guest2207> This is my buddy
<Guest2208> This is my buddy
<Guest2209> This is my buddy
<Guest2210> This is my buddy

Please advise

Thanks

Top
#262992 - 02/05/18 09:09 PM Re: I need a script for repeat text [Re: SLiprockS]
maroon Offline
Hoopy frood

Registered: 12/01/04
Posts: 766
The way it's creating the %text variable makes it be a match if their text is the same thing regardless of upper/lower case, whether there are color codes, or whether they have different amount of spaces padding.

This is checking for an exact match, so it doesn't catch when someone changes punctuation or adds a word, etc.

the "#" can change to be either a #channelname or #chan1,#chan2

The TEXT and ACTION events are so it can trap them doing it in channel messages and in /me sentence.

The %allowed can change to 1 or 3 depending how many times you let them say it. The -u30 makes the variable exist for 30 seconds until it goes away, and you can change it to whatever seconds you wish. Each time they say something, the counter for that text increments +1 with an additional life of 30 seconds.

The %item label is created by combining their nick, the channel name, and the hash of what they say. If there are any false-positive matches, then congratulations, you've discovered a hard-to-find hash collision!

If you want to ban the same thing said by multiple nicks, then simply remove $nick from the list of things being combined to create the item name.


The { } after the IF statement is the section where you put whatever you want to happen when someone repeats. You can add code for checking whether the offender is an OP, etc.

This snippet doesn't monitor the change-nick event, so they're not blocked from saying it after they change nick.

Code:
on *:TEXT:*:#:{   noop $dupe_catcher($1-) }
on *:ACTION:*:#:{ noop $dupe_catcher($1-) }

alias dupe_catcher {
  var %text $lower($gettok($strip($1-),1-,32))
  var %a $sha1(%text) , %item $+($nick,$chan,.,%a) , %allowed 2
  hinc -mu30 flooder %item
  var %count $hget(flooder,%item)
  if (%count > %allowed) {
    echo -a flood: $nick has recently repeated the same thing in $chan %count times - variable is deleted in $hget(flooder,%item) secs: %text
  }
}

Top
#262999 - 03/05/18 06:44 PM Re: I need a script for repeat text [Re: maroon]
SLiprockS Offline
Ameglian cow

Registered: 25/10/05
Posts: 24
Loc: Dhk,BD
Thanks Maroon.. lets test it how it works and will revert to you.

Top