Yes you can.

Code:
on *:INPUT:#: {
  [color:green]; don't trigger when you are issuing a /command![/color]
  if (/* !iswm $1) msg $target $reverse($1-)
  [color:green]; don't send the text you typed![/color]
  halt
}
[color:green] [/color]
alias reverse {
  [color:blue]put the code I described in my earlier post here[/color]
}