Autolimiter

From Scriptwiki
Revision as of 00:48, 26 April 2008 by Daveoh (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This is a very simple yet effective autolimiter. It can be incorporated into a larger script easily, and is recommended to be in a script of its own unless you know how to merge it.

It is a prerequisite to set the limit amount for each channel (a positive integer) using variables in the format of %limit.#CHANNEL, or otherwise changing the format used in the script.

on @*:JOIN:#:autolimit #
on @*:PART:#:autolimit #
on @*:KICK:#:autolimit #
on *:QUIT:{
  var %i = 1
  while ($comchan($nick,%i)) {
    autolimit $v1
    inc %i
  }
}
alias -l autolimit if ($me isop $1 && !$timer(autolimit. $+ $1)) && (%limit. [ $+ [ $1 ] ] ) .timerautolimit. $+ $1 1 10 mode $1 +l $!calc( $!nick( $1 ,0) + $v1 )
Contributed by Daveoh