Why not just take advantage of the text match in the event?

Code:
on *:CHAT:.settrivchan:{
  if ((#* iswm $2) && ($me ison $2)) chan.add $2
  else msg =$nick Please make sure I am present in $2 $+ , else you cannot add that channel to the bot 
}

on *:CHAT:.setpoint:{
  if ((#* iswm $2) && ($me ison $2)) ;do stuff
  else ;do other stuff
}

;more onCHAT events here

;this event goes last, all events must be in the same file for this to work
on *:CHAT:*: msg =$nick That is not a valid command


-genius_at_work