Any theming script would work
/help ON TEXT
/help Halting default text
shows you how to accomplish it. A simplistic example would be:
ON ^*:TEXT:*:*:echo -tml $iif(#,#,$nick) [[ $+ $nick $+ ]] $1- | haltdef
ON *:INPUT:*:if (/* !iswm $1-) { echo -tam [[ $+ $me $+ ]] $1- | .msg $active $1- | halt }
That changes the separator to [ and ] ([[ and ]] is needed in script). Other script caveats apply. I should also reiterate that this is by no means a "complete" example. You may want to handle $inpaste or $ctrlenter in on input.