What landon gave you is called a "Raw event", just like the on Events (on JOIN, on QUIT, etc.) these cannot be used inside other events.

Code:
on *:text:!command:?: {
  who $me
}
raw 315:*://echo -s $numeric $1 1 $2 2 $3 3 $4 4 $5 5 $6 6 $7 7 $8 8 $9 9 $10- $10- | halt