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: 24
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: 826
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: 826
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
#263075 - 24/05/18 05:33 PM Re HELP ME [Re: maroon]
Tano Offline
Ameglian cow

Registered: 12/04/18
Posts: 24
Why is not work this script what i did wrong, i want to ban on 2 line flooders user when they use 1 nick or diferent nicknames with the same text message they spamm on channel, the time between the first line and next repeat line takes 2,5,10s for flood, fast or slow they escape my ban, need to match the first line text msg with second txt msg on second line from 1 user with 1 Ip only, or more user nicknames with same text msg from same Ip or Diferent Ip frown



On *:start: {
hmake flood 150
}
On *:text:*:#: {
On *:action:*:#: {
if ($me isop $chan) {
if ($hget(LastMsg,$nick) == $strip($1-)
hadd -mu300 LastMsg $nick $strip($1-)
hsave -m LastMsg $nick $strip($1-)
hinc -u5 flood $nick 1
if ($hget(flood,$nick) > 2) {
mode $chan +b-v $address($nick,3) $nick | /timer 1 300 /mode $chan -b $address($nick,3)
echo -a $chan 4Flood Detected - 2 Lines in 5 seconds. - 5 min ban.
hdel flood $nick
}
}
}

example they flood on this way:

Tommy; Jimmy your are a stupid boy, go now get lost
Tommy; Jimmy your are a stupid boy, go now get lost a
Tommy; Jimmy your are a stupid boy, go now get lost as
Tommy; Jimmy your are a stupid boy, go now get lost asd
Tommy; Jimmy your are a stupid boy, go now get lost asdf

Tommy; Jimmy your are a stupid boy, go now get lost
Tommy; Jimmy your are a stupid boy, go now get lost .
Tommy; Jimmy your are a stupid boy, go now get lost ..
Tommy; Jimmy your are a stupid boy, go now get lost ...
Tommy; Jimmy your are a stupid boy, go now get lost ....

Tommy; Jimmy your are a stupid boy, go now get lost
Tommy; 1Jimmy your are a stupid boy, go now get lost
Tommy; 11Jimmy your are a stupid boy, go now get lost
Tommy; 111Jimmy your are a stupid boy, go now get lost
Tommy; 111Jimmy your are a stupid boy, go now get lost

Tommy; Jimmy your are a stupid boy, go now get lost
Tommy; 1 Jimmy your are a stupid boy, go now get lost
Tommy; 11 Jimmy your are a stupid boy, go now get lost
Tommy; 111 Jimmy your are a stupid boy, go now get lost
Tommy; 111 Jimmy your are a stupid boy, go now get lost

this is when they use clonex and use 5 till 10 nick with same or diferent IP to spamm floood on channel

Tommy; Jimmy your are a stupid boy, go now get lost
Marc; Jimmy your are a stupid boy, go now get lost
Tommy; Jimmy your are a stupid boy, go now get lost
John; Jimmy your are a stupid boy, go now get lost
Miachel; Jimmy your are a stupid boy, go now get lost

HELP me guys, i am new on this and dont understand much the language script


Edited by Tano (24/05/18 06:12 PM)

Top
#263077 - 24/05/18 10:56 PM Re: Re HELP ME [Re: Tano]
Seb Offline
Pikka bird

Registered: 24/05/18
Posts: 13
Code:
if ($hget(LastMsg,$nick) == $strip($1-) ; <--- ARE YOU MISSING SOME CHARACTERS?!
hadd -mu300 LastMsg $nick $strip($1-)


Please ensure your begin and end brackets all count equal and match.

Top
#263078 - 24/05/18 10:58 PM Re: Re HELP ME [Re: Seb]
Seb Offline
Pikka bird

Registered: 24/05/18
Posts: 13
Code:
On *:text:*:#: {
On *:action:*:#: {


Also what the heck is this? Where did you learn that it's okay to nest events like this? Because in the ten years (or more) that I've been scripting mIRC I have never seen events nested... To clarify, this is also an error.

Top
#263079 - 24/05/18 10:59 PM Re: Re HELP ME [Re: Seb]
Seb Offline
Pikka bird

Registered: 24/05/18
Posts: 13
It seems to me like you are just guessing and/or copy/pasting bits and pieces of scripts together hoping it will all work. That's clearly not working for you. What you need to do is stop guessing and start reading through the mIRC help files.

Top
#263080 - 24/05/18 11:30 PM Re: Re HELP ME [Re: Seb]
Tano Offline
Ameglian cow

Registered: 12/04/18
Posts: 24
Ty for ur advice and ur help
how i say i am new on this thing if u can help ty in advance
what is wrong i know cozz is dont work dont need somone to show me is wrong cozz i know for that i come to ask the help here, so many brilliant genius mind specialist to give me a hand to figure out to work , anyway thx again for ur compasion


Edited by Tano (24/05/18 11:31 PM)

Top