instead of using $nick, you could use $wildsite or $address($nick,2) (both of which do the same thing) and check the same thing when they leave. this will ignore the fact someone has changed their nick and parted...