You don't need to specify the channel name throughout the code. You only need the channel name jotted down by the text event, as shown to you above. That will tell mIRC to listen to the certain channel.

It's optional if you want to leave a space. It works both ways.

Do you happen to use an outdated copy of mIRC?