pyth0n, your script is redundant. The /ban command along with the -k switch will do both banning and kicking. There's no reason for you to add a /kick command after it. I think mountaindew may have made a little mistake some two years ago. The script should have been as such:
on @*:join:#: {
if (!$istok(nick1 nick2 nick3 nick4,$nick,32)) {
ban -k $chan $nick 2 msg here
}
}
this will ban the type 2 address, which is the host, and exclude those nicks from the $istok.