I'm not a huge fan, but I've not been able to think of another way to do it. Feel free to suggest alternate ways of doing it.

Code:
on *:TEXT:!test*:#: {
  var %var1 = oneobject twoobject threeobject
  var %var2 = carobject sumobject whyobject
  if ($regex(%var1,/^[ $2 ]/i)) {
    $msgbot($chan,Number objects)
  } 
  if ($regex(%var2,/^[ $2 ]/i)) {
    $msgbot($chan,Weird objects)
  }
}


How do I make it so that it identifies each word (oneobject, twoobject etc) and matches if the word is in the variable list correctly?

Thanks!

Last edited by lindenkron; 01/12/13 03:25 PM.