Code:
on me:*:join:#:timer 1 5 if ( $me isreg $chan ) && (m isincs $!gettok($chan( $chan ).mode,1,32)) part $chan

It's better to check the m mode in the first word in the channel mode, because the channel could be +k something


#mircscripting @ irc.swiftirc.net == the best mIRC help channel