looks good, but you should check that $3 is a number .. $regex($3,/[\d]/) or something
and why did you add a kick in !ban? thought that was what !kb was for.. bug might just be me misunderstanding the purpose :)
also why do you have 2x
if (($nick isop $chan) || ($nick ishop $chan) && (!$3))