That's a pretty easy on TEXT...

Code:
on *:text:*:#: {
  if (word isin $1-) { msg $chan this }
  if (*word* iswm $1-) { msg $chan this }
  if ($1 == hi) { msg $chan this }
}


That shows 3 different ways you can check. Keep in mind possible matches when considering isin/iswm. For example, checking if "hi" is part of the entire line rather than just the first word will make it match other things, such as "this". You could also use regex on certain matches like that to check if there is a "word" that matches without considering punctuation.