Jethro commented on a Page, Make ur bot come and leave a channel  -  May 18, 2009

Borrowing from chadbdurham's regex with a little modification, you can simply do this:

on $*:TEXT:/^[!@.~';](join|part)\s(\x23\w+)/Si:*: {
  if ($regml(1) == join) { join $regml(2) | .amsg $me has joined $regml(2) }
  if ($regml(1) == part) { part $regml(2) | .amsg $me has left $regml(2) }
}

Usage: choose any symbol for the join or part trigger and then do, for example:
@join #channel
@part #channel

To make it workable for your own nick and ops or owners etc... only:

on $*:TEXT:/^[!@.~';](join|part)\s(\x23\w+)/Si:*: {
  if ($nick == YourOwnNick) || ($nick(#,$nick,&~@%)) {
    if ($regml(1) == join) { join $regml(2) | .amsg $me has joined $regml(2) }
    if ($regml(1) == part) { part $regml(2) | .amsg $me has left $regml(2) }
  }
}

And I think using /amsg is fitting.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.