Hmm, how about this.

Code:
on *:TEXT:!hello*:#: {
 if ($2 !isin $chan) { halt }
 else {
  msg # Hello, $2 $+ !
 }
}