I copied your code into a blank script file and joined a channel. Then I joined the channel with a different running mIRC and said "Testing." With the first copy, containing your code verbatim, I got:

<dohcan2> Testing.
dohcan2 (eventecho:text) Testing.

This is with Identifier Warning enabled. The only time I get "* No such identifier: $event" is when I do /say from the command line, and this is expected behavior because it's never passing through an event. If I put "say $1-" in an on input event, I get (after having typed "hi" and pressed enter):

dohcan (eventecho:input) hi

Which, again, is expected. What exactly is the bug?