on text help:
on 1:TEXT:%matchtext:%channel:/msg $nick You just said $1- on channel %channel
then if you were intrigued by the $1-, /help $1-
$1-
You can use the $1 $2 ... $N identifiers to refer to individual parameters in a line. You can also use $N- to refer to parameters N and onwards, and $N-M to refer to parameters $N through to $M. So to refer to a whole line, you would use $1-.