Code:
alias join {
  set [color:red]-u10[/color] $+($eval(%joined,0),.,[color:green]$iif($left($1,1) == -,$2,$1)[/color]) $true
  !join $1-
}

on *:JOIN:#: {
  if (($nick == $me) && (!$eval($+($eval(%joined,0),.,#),2))) !part #
  unset $+($eval(%joined,0),.,#)
}


[i]Edit:

Added this to unset variable in case of no join (ban, invite only, incorrect
key, channel limit etc.) and 10 seconds to allow for some lag time.


Added this in case switches are used with the JOIN command

Last edited by r0ck0; 22/09/03 05:52 PM.