If i get your meaning currectly, you can store the channel name and command somewhere and then handle RAW 421 which is for Unknown command... Something like this:

Code:
alias AddCommand {
  if (!$hget(MyCmds)) { hmake MyCmds }
  hadd -m MyCmds $1 $eval($2-,0)
}

on *:Text:*:#:{
  ; Doing some validation for triggers and stuff here...
  AddCommand $chan $eval($2-,0)
  $(,$2-)
}

raw 421:*:{
  if ($hget(MyCmds)) {
    if ($hfind(MyCmds,$+(*,$2,*),1,w).data) {
      msg $gettok($hget(MyCmds,$v1),1,32) It seems $qt($2) is an unknown command!
      hdel MyCmds $v1
    }
  }
}


Hope that helps...


Nothing...