It only shows all channels in fact, but it correctly reacts on one of those 3 channels at the top. You shouldn't put $3- in the msg you send to the user but rather the channel name the user was detected on.
And also, the line
kick if ($comchan($2,%t).op == $true) $2 11 Spam Channel - 10 Minute Ban
is incorrect. You can't put an if in the middle of another line ... except if you use $iif. You already verify if you're oped on the $comchan with
So rechecking before kicking is not necessary.
Here's what I'm talking about.
;on !*:JOIN:#: whois $nick
raw 319:*: {
if (#laplapan isin $3-) || (#classmate isin $3-) || (#skul isin $3-) {
Var %c = $v1 , %t = $comchan($2,0)
while (%t) {
Var %c' = $comchan($2,%t)
if ($me isop %c') {
ban -u600 %c' $2 2
kick %c' $2 Spam Channel - 10 Minute Ban
msg $2 The channel %c has been mass advertising on other channels. You may enter Chat in 10 minutes when the ban is lifted providing you are no longer on %c
}
dec %t
}
}
}
Cordialement