Yes, Remotes is the correct section, and note that the code uses the ON CONNECT event, so it won't activate until you actually make the connection. ie: If you are already connected to the network, you will have to disconnect, then reconnect.

If the code still doesn't work, then there's a possibility that access to the server raw command structure is limited to certain people (eg: ircops). You might be able to get confirmation of this in the network's help channel (usually #help)