on !*:JOIN:[color:red]#YourChannel[/color]:{
hadd -mu3 temp.whois $nick $chan
whois $nick
}
raw 319:*:{
if ($hget(temp.whois,$2)) {
[color:blue]var %chans = $_noprefix($3-)[/color]
var %bad.chans = [color:red]#BadChannel1 #BadChannel2 #BadChannelN[/color]
var %i = 1, %l = $numtok(%bad.chans,32)
while (%i <= %l) {
if ($istok(%chans,$gettok(%bad.chans,%i,32),32)) {
ban -ku300 $hget(temp.whois,$2) $2 You may not join $hget(temp.whois,$2) while on $gettok(%bad.chans,%i,32) $+ !
return
}
inc %i
}
}
}
alias _noprefix {
if (!$isid) return
var %chans = $1-
var %i = 1, %l = $numtok(%chans,32), %tmp
while (%i <= %l) {
%tmp = $+(%tmp,$chr(32),$chr(35),$gettok($gettok(%chans,%i,32),$iif($numtok($gettok(%chans,%i,32),35) > 1,2,1),35)))
inc %i
}
return %tmp
}