on *:JOIN:#:{ if ( $nick == $me ) { set %channel # } } on *:PART:#:{ if ( $nick == $me ) { set %lastchannel # } }