[color:#006600]; When I'm the one joining, WHO the channel to fill its IAL.
;[/color]
on me:*:JOIN:#:{
set -u600 $+(%,me.JOIN.,$chan) 1
who $chan
}
raw 352:*:{
if ($eval($+(%,me.JOIN.,$2),2)) {
[color:#006600]; Initialize everyone's ident $ctime to 0 since I didn't see them join.[/color]
hadd -m $2 $remove($3,~) 0
halt
}
}
raw 315:*:{
if ($eval($+(%,me.JOIN.,$2),2)) {
unset $+(%,me.JOIN.,$2)
halt
}
}
[color:#006600];
; If someone else is joining, process by the rules given in the previous post.
;[/color]
on !*:JOIN:[color:red]%IJSchannel[/color]:{
var %ctime = $ctime, %ident = $gettok($remove($address,~),1,64), %mask = $+(*!*,$right(%ident,9),@*)
if ($calc(%ctime - $hget($chan,%ident)) < [color:red]%Sident[/color]) KB-Ops %mask Too fast!
elseif ($ialchan(%mask,$chan,0) > [color:red]%Bident[/color]) KB-Ops %mask Too many!
hadd -m $chan %ident %ctime
}
[color:#006600]; (KickBan minus Ops) Don't kick any ops that might have this ident.
;[/color]
alias -l KB-Ops {
if ($me !isop $chan) return
var %-o, %i = 1
[color:#006600]; Check to see if there are any non-ops to ban.[/color]
while ($ialchan($1,$chan,%i).nick)) {
if ($ifmatch !isop $chan) {
mode $chan +b $1
%-o = 1
break
}
inc %i
}
[color:#006600]; If we found any non-ops, kick them.[/color]
while ($ialchan($1,$chan,%-o).nick)) {
var %nick = $ifmatch
if (%nick !isop $chan) kick $chan %nick $2-
inc %-o
}
}
[color:#006600];
; Handle cleanup of the tables we no longer need.
;[/color]
on me:*:PART:%IJSchannel: hfree $chan
on me:*:QUIT: hfree -w #*