I have this:

on *:JOIN:#: {
  set %chan $chan
  msg nickserv INFO $nick
on *:NOTICE:*Information on*(account*:?: {
  if ($nick == nickserv) {
    set %name $left($5,-2)
    /kick %chan %name 
on *:KICK:#:{


how can I get the kick to include the nick being kicked's main nick so when it checks the nick under nickserv and also write it to a kicklist.txt or something , it can autokick it if it matches on the kicklist.txt or something

(my channel is set to +r so i dont have to worry about unregistered accounts)