Is this related to channels only (no private messages)?
The code below should do what you want:
on ^*:TEXT:+UX *:#:{
echo # message from $nick $+ : $2-
haltdef
}
In case you want it to work with private messages as well...:
on ^*:TEXT:+UX *:*:{
echo $iif(#,#,$nick) message from $nick $+ : $2-
haltdef
}