Hello alls,

I've lately started scripting again, this time I'm trying to script a bad nick kicker on a on nick event, the code i scripted is the following:

on *:NICK:{
if ([censored] isin $newnick) || ([censored] isin $newnick) || (dick isin $newnick) || (whore isin $newnick) || (cunt isin $newnick) {
var %i = 0
while (%i < $comchan($newnick,0)) {
inc %i
if ($me isop $comchan($newnick,%i)) && ($comchan($newnick,%i) isin %fc.chans) {
ban $comchan($newnick,%i) * $+ $ifmach $+ *!*@*
kick $comchan($newnick,%i) $newnick Bad nick detected. -BadNickKick-
}
}
}
}
My problems i that I can't ban since the $ifmatch is not targeting in the first if-then-else event but in the sequend one but it needs to pass throght the 2nd one to find the channel... any idea how to script this?