mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2018
Posts: 24
T
Tano Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2018
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

Last edited by Tano; 14/04/18 12:00 AM.
Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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.

Joined: Oct 2005
Posts: 34
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Oct 2005
Posts: 34
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

Joined: Jan 2004
Posts: 2,127
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 2,127
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
  }
}

Joined: Oct 2005
Posts: 34
S
Ameglian cow
Offline
Ameglian cow
S
Joined: Oct 2005
Posts: 34
Thanks Maroon.. lets test it how it works and will revert to you.

maroon #263075 24/05/18 04:33 PM
Joined: Apr 2018
Posts: 24
T
Tano Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2018
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

Last edited by Tano; 24/05/18 05:12 PM.
Tano #263077 24/05/18 09:56 PM
Joined: May 2018
Posts: 13
S
Seb Offline
Pikka bird
Offline
Pikka bird
S
Joined: May 2018
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.

Seb #263078 24/05/18 09:58 PM
Joined: May 2018
Posts: 13
S
Seb Offline
Pikka bird
Offline
Pikka bird
S
Joined: May 2018
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.

Seb #263079 24/05/18 09:59 PM
Joined: May 2018
Posts: 13
S
Seb Offline
Pikka bird
Offline
Pikka bird
S
Joined: May 2018
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.

Seb #263080 24/05/18 10:30 PM
Joined: Apr 2018
Posts: 24
T
Tano Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: Apr 2018
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

Last edited by Tano; 24/05/18 10:31 PM.

Link Copied to Clipboard