mIRC Home    About    Download    Register    News    Help

Print Thread
#35965 12/07/03 08:19 PM
Joined: Jun 2003
Posts: 11
P
Pikka bird
OP Offline
Pikka bird
P
Joined: Jun 2003
Posts: 11
Can anyone help me with a decent script to kick and ban people who flood in the room ?

Many Thanks in advance

grin

#35966 12/07/03 08:20 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Rather than do it for you again, I'm just going to say search Google!

#35967 12/07/03 08:26 PM
Joined: Jun 2003
Posts: 11
P
Pikka bird
OP Offline
Pikka bird
P
Joined: Jun 2003
Posts: 11
Ah right i must have missed that one before, it works great

Cheers grin

#35968 12/07/03 09:37 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Code:
; -------------------------------------------------------------------------------------------------
; Protections - Sniplet i made for mIRC forums, but decided to keep (comments and all) heh

#protect.flood off

on @1:TEXT:*:#: {
  ; ----------------------------------- Flood (Repeated Messages)
  ; This is a simple protection that looks for a user repeating the
  ; same message, and if it finds that person, first will warn, then
  ; will set a mute ban, next kick, then ban
  ; ----------------------------------- Flood (Repeated Messages)
  if (%text. [ $+ [ $nick ] ] != $1-) /set -u300 %text. [ $+ [ $nick ] ] $1-
  else {
    ; Increase number of duplicate messages
    /inc -u5 %flood. [ $+ [ $nick ] ]
    ;check how many times we've had to see that message
    if (%flood. [ %+ [ %nick ] ] == 3) {
      /unset %flood. [ $+ [ $nick ] ]
      ; increase number of times we've had to deal with this person
      /inc -u1800 %warn. [ $+ [ $nick ] ]
      ; take action
      /takeaction $chan $nick Flood Flooding (5 lines, 3 seconds)
    }
  }
}

#protect.flood end

#protect.spam off

on @1:TEXT:*:#: {
  ; ----------------------------------- Spam (Repeated Gibberish)
  ; This is also a simple protection, as it will find a person typing
  ; several lines, but with any line of text.  This has the same actions
  ; as the flood protection, but is 7 lines in 5 seconds.
  ; ----------------------------------- Spam (Repeated Gibberish)
  /inc -u5 %spam. [ $+ [ $nick ] ]
  ; they passed limit
  if (%spam. [ $+ [ $nick ] ] == 7) {
    /unset %spam. [ $+ [ $nick ] ]
    ; increase times dealt with
    /inc -u1800 %warn. [ $+ [ $nick ] ]
    ; take action
    /takeaction $chan $nick Spam Spamming (7 lines, 5 seconds)
  }
}

#protect.spam end


-KingTomato
#35969 12/07/03 09:43 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Might be nice if you had these too:

Code:
; -------------------------------------------------------------------------------------------------
; Aliases

; take action - use when %warn.(name) has been declaired
; syntax: /takeaction <channel> <nickname> <action> <reason(if kicked)>
; Example: /takeaction #king-tomato ChanSys Flood Flooding (7 lines, 5 seconds)
alias -l takeaction {
  ; set some easy-to-use variables
  /set -u0 %chan $1
  /set -u0 %nick $2
  /set -u0 %word $3
  /set -u0 %reason $4-

  ; Now, to take action
  if (%warn. [ $+ [ %nick ] ] == 1) {
    ; warning
    /msg %chan Please do not %word the channel $nick $+ . Further to do so will result in kicks and/or bans.
  }
  else if (%warn. [ $+ [ %nick ] ] <= 3) {
    ; mute ban
    /mode %chan -ov+b %nick %nick $address(%nick, 1)
  }
  else if (%warn. [ $+ [ %nick ] ] <= 6) {
    ; kick
    /mode $chan -ov $nick $nick
    /kick $chan %nick %reason
  }
  else if (%warn. [ $+ [ %nick ] ] != $null) {
    /mode %chan -ov+b %nick %nick $address(%nick, 11)
    /kick %chan %nick Banned! %reason
  }
}


and of course

Code:
menu channel {
  Flood Protection
  .Repeated Messages ( $+ $iif($group(#protect.flood), Enabled, Disabled) $+ ): {
    var %word = $iif($group(#protect.flood), disable, enable)
    . [ $+ [ %word ] ] #protect.flood
    /echo -a Flood Protection Is Now: $+(%word,d)
  }
  .Spam ( $+ $iif($group(#protect.spam), Enabled, Disabled) $+ ): {
    var %word = $iif($group(#protect.spam), disable, enable)
    . [ $+ [ %word ] ] #protect.spam
    /echo -a Spam Protection Is Now: $+(%word,d)
  }
} 


-KingTomato

Link Copied to Clipboard