If you want to kick the user from all the channels youre on, you will have to break out of the while loop before you can use another loop for kicking. You could try to set this up by triggering a timer instead of the /ban -ku.
Instead of saying /ban -ku3600 $chan $nick, say:
set %kicknick $nick
.timer.allkick $comchan($nick,0) 1 kickalias
Then just write a kick alias that will kick %kicknick from all channels that youre an op on. It will halt the loop, and start a timer, instead of trying to execute two loops within one another.
I would write it out for ya, but i have to get scootin here. If you can't get it, Ill stop back in tomorrow, or perhaps one of the commorades here will jump in and fix this thing up for ya. Its almost there