Code:
on !@*:kick:#: {
  if ($knick == $me) {
    join $chan
    notice $nick You max not kick $me
    notice %owner $nick kicked me from $chan [[ $time ]]
  }
  elseif ($read(nokick.txt,w,$knick)) {
    notice $nick (WARNING)  You may not kick $knick
    notice %owner $nick kicked $knick from $chan [[ $time ]]
    invite $knick $chan
  }  
}