Having just one channel name there should work fine.
Did you paste the script in Remote (Alt+R)?
Are you aware you cannot trigger this script yourself, only other people?

If yes, then maybe you are running other scripts that interfere with this one. Placing this script in an empty/new file (File > New) and moving it up in the script order (File > Order...) may help.