mIRC Home    About    Download    Register    News    Help

Print Thread
#212334 19/05/09 11:04 AM
B
Babystone
Babystone
B
how to write a code for repeat kick if the chatter try to type the same msg in 5 line/min?


#212341 19/05/09 02:55 PM
Joined: Feb 2003
Posts: 3,412
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
Code:
on *:text:*:#: {
  if (%repflood != disabled) && ($me isop $chan) {
    var %rp.repeats = rp. $+ $nick $+ . $+ $chan
    var %rp.text = rp. $+ $nick $+ . $+ $chan $+ .text
    if ( % [ $+ [ %rp.repeats ] ] == $null ) {
      set -u [ $+ [ %rep_time ] ] % [ $+ [ %rp.repeats ] ] 1
      set -u [ $+ [ %rep_time ] ] % [ $+ [ %rp.text ] ] $1-
    }
    elseif ( % [ $+ [ %rp.text ] ] == $1- ) {
      inc % [ $+ [ %rp.repeats ] ]
    }
    elseif ( % [ $+ [ %rp.text ] ] != $1- ) {
      set -u [ $+ [ %rep_time ] ] % [ $+ [ %rp.text ] ] $1-
      set -u [ $+ [ %rep_time ] ] % [ $+ [ %rp.repeats ] ] 1
    }
    if ( % [ $+ [ %rp.repeats ] ] >= %rep_antal ) {
      if (%repflood == 1) { ban $+(-u,$calc(%temp.ban * 60)) $chan $nick 3 }
      kick $chan $nick $eval(%rep.flood,2) $kcs
      unset %rp. $+ $nick $+ . $+ $chan
      unset %rp. $+ $nick $+ . $+ $chan $+ . $+ text
    }
  }
}

Disable the script.
/set %repflood disabled

Ban the user repeating
/set %repflood 1

How long time the ban should last (in minutes)
/set %temp.ban

Will kick the user, but not ban.
/set %repflood 0

Amount of repeats. (in your case 5)
/set %rp.repeats 5

Repeats during how long time. (in minutes)
/set %rep_time 1

I don't think i missed anything, untested tho. And the code goes in to your remote.. ALT + R in mirc.

#212975 12/06/09 12:29 PM
B
Babystone
Babystone
B
dun seem to work .. can any1 teach me some simple code?

#212976 12/06/09 01:56 PM
Joined: Dec 2008
Posts: 1,483
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
first of all try to read some events :

/help on

then see the identifiers :

/help $

and at the end see the mirc if-then :

/help if then else

#212978 12/06/09 03:49 PM
Joined: Feb 2003
Posts: 3,412
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,412
Did you enable the script? did you set the settings? cos i can't see any reason why that wouldn't work, and you dont have a on text event a bow the code?

#212982 12/06/09 07:18 PM
Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
There are countless repeat kicking scripts out there. If you google around with the search keywords: mirc repeat kicker
You'll easily get hit with one result that may fit your needs.


Link Copied to Clipboard