This is what I have so far.
on *:kick:#: if ($nick == $me) cs kick $nick
I believe that code would be right but it doesn't seem to be working.
I have auto-rejoin after being kicked on, so maybe this would work if I have the right delay on the script (which I am not sure how to implement).