alias part {
;; Has the user specified a channel? If no, use the current one
var %chan = $iif($1 ischan,$1,$chan)
;; default message
var %msg = cheerio folks
;; Do we have a user-defined message? If so, use that instead of the default
if (($1 ischan) && $2) { %msg = $2- }
if ($1 && $1 !ischan) { %msg = $1- }
;; do the part
!part %chan %msg
}