on $*:TEXT:/!(join|part)\s(.*)/Si:#: {
if ($nick isop $chan) { $regml(1) $+($chr(35),$regml(2)) }
}
You don't even have to enter the #ChanName. Just !join ChanName and !part ChanName without #
Take blitzz's word for it so that only ops can command the client running the code to join or part.
Oh blitzz, no ! negate symbol in isop operator 'cause that will mean if a user is NOT an op...lol