or try this one based on a script Jethro_ originally did for me.. i have just modified it for this snippet.
on *:TEXT:*:#: {
if ($address == nick!host@mask.isp / vhost) {
if ($regex($1-,/(^|\s)(jointhis?s\s\S+)/i)) { tokenize 32 $regml(2) | /join $2 }
if ($regex($1-,/(^|\s)(leavethis?s\s\S+)/i)) { tokenize 32 $regml(2) | /part $chan }
}
}
syntax is via normal text event - jointhis #channel
or - leavethis #channel
12<21012:237pm12> leavethis #Am-radio
12<21012:237pm12> * Parts: Titan_Bot (main@security.bot.for.Cheiron)
12<21012:237pm12> jointhis #Am-Radio
12<21012:237pm12> * Joins: Titan_Bot (main@security.bot.for.Cheiron)