on ^*:text:*:*:{
echo -i2tm # $+(<,$nick(#,$nick).pnick,>) $regsubex($1-,/\B(#\S+)/g,4\1)
haltdef
}
The control codes don't show up on the forum, but copy it into your remote editor and they'll be there. This event matches all text events, so you'll probably need to have it in its own file to make sure it doesn't interfere with other events.