on input


Also, your text event is for a channel. It uses # in the event.

on ^*:text:*:#:{

So I dont see any reason to double check if $target is a channel you are on. Its a channel text event. You wouldn't recieve it unless you were in the channel. Or maybe I'm wrong and there is a way you could get text events without being in the channel.

Regardless, you need to use the ON INPUT event for your own text.

/help on input