If you're trying to change incoming or outgoing text without displaying the original text, then you need to halt/haltdef the text.
on ^*:text:*:#: {
echo -a Incoming: $1-
haltdef
}
on *:input:#: {
.msg $chan $1-
echo -a Outgoing: $1-
halt
}
You can change how those display. Just use haltdef and the ^ for incoming text and halt and .msg for the outgoing text. The echo lines are what you'll see on your end.
Note that if you want everyone else to also see your text formatted, then include the formatting in the .msg line, but remove the . and remove the echo line. That will let you and everyone else see your text formatted in whatever way you want.