Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; ---- Settings ----
- alias -l channel { return # }
- alias -l times { return 3 }
- alias -l secs { return 3 }
- alias -l modes { return impsCMRF }
- alias -l modes_secs { return 360 }
- alias -l ban_secs { return 300 }
- alias -l ban_type { return 2 }
- alias -l ban_msg { return Join Flooding }
- ; ---- Settings ----
- ON @!*:JOIN:$($channel): { .timer[CHECK_ $+ $nick $+ _ $+ $chan $+ _JOIN] 1 1 chk_all_status $nick $chan }
- alias chk_all_status {
- if (!$1) && (!$2) && ($status !== connected) && ($me !isop $2) && ($me !ison $2) && ($1 !ison $2) && ($1 !isreg $2) { return }
- inc $+(-eu,$secs) $+(%,flood,_,join,_,$2) 1
- set $+(-eu,$secs) $+(%,flood,_,join,_,$2,_,nicks) $addtok($evalnext($+(%,flood,_,join,_,$2,_,nicks)),$1,32)
- if ($evalnext($+(%,flood,_,join,_,$2)) == $times) {
- unset $+(%,flood,_,join,_,$2)
- mode $2 $+(+,$modes)
- .timer[REMOVE_ $+ $1 $+ _MODES] 1 $modes_secs mode $2 $+(-,$modes)
- bk_all $2
- }
- }
- alias -l bk_all {
- if (!$1) { return }
- var %t = $evalnext($+(%,flood,_,join,_,$1,_,nicks))
- if (!%t) { return }
- var %i = 1
- while (%i <= $numtok(%t,32)) {
- var %n = $gettok(%t,%i,32)
- if (!%n) { goto next }
- if (%n !ison $1) || (%n !isreg $1) { set $+(%,flood,_,join,_,$1,_,nicks) $remtok($evalnext($+(%,flood,_,join,_,$1,_,nicks)),%n,1,32) | goto next }
- ban $+(-ku,$ban_secs) $1 %n $ban_type $ban_msg
- set $+(%,flood,_,join,_,$1,_,nicks) $remtok($evalnext($+(%,flood,_,join,_,$1,_,nicks)),%n,1,32)
- :next
- inc %i
- }
- unset $+(%,flood,_,join,_,$1,_,nicks)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement