Personally, I think you are going at this in an inefficient way.

I hadn't looked at the thread, so didn't know what you were doing.

But if you want to alter the way commands work, or change their actions, you shouldn't try to detect them with on input events, but rather create custom aliases.


alias me echo -a this is my own alias which overrides the built in one, unless if you type /!me

alias ame return

alias mode {
...
if $network == undernet && h isin $2 { blabla }
...
}

This way, it will work, wherever it is used, whether from the editbox, or from popups, or from scripts etc.

You get the picture.

Greets