In a remote (Alt-R).
Alternatively you could put the
in the perform section.
From: alt-o Connect->Options [perform]
Check: [x] Enable perform on connect
Add the network that this applies to by pressing [Add] and selecting from the list. (You could add it to "All Networks", but then it would be run even if the network you were joining did not support mode R, resulting in error messages)
Then in the "Perform Commands" edit box type the code above.
(Sounds like a lot of steps, but it's pretty straightforward)