What is Remote CubeScript (rcs)?It is a way to send cubescript commands from the server to the client. Cubescript is the embedded scripting language of Sauerbraten, and it controls aspects such as menus, personal settings, key binds. A similar project, in the technical aspects, that aims to provide a better server browser is
crapmod.
Why is Remote CubeScript needed?Sauerbraten has an outdated user experience in some areas. A server, for example, cannot show even a simple yes/no dialog to its clients, and all interactions with the server must go through the now standard hash command mechanism (#help, #info, #geoip ...). Furthermore, it is not possible to send a new map to players, so are either stuck with the default set of stock maps, or they have to go download a (possibly sparse and intricate) set of files.
Remote CubeScript allows the server to manage a great part of this for the client. Just to mention a few examples, one can
- show clickable menus to players
- download maps
- bind keys to server-specific commands
In waiting for proper support of these operation in the vanilla client,
rcs aims principally to provide players and mappers a way to play new maps which are being tested for a new release, and in general a better user experience.
How do I install and remove Remote CubeScript?You install
rcs run these commands (commands are just like chat messages):
/mastername pisto.horse
/updatefrommaster
This
dialog will confirm that rcs is installed. To uninstall it, type
/rcs_uninstall
and a console message will confirm its removal.
I use wc-ng, and I get an error "master server sent an invalid command" during installation, what is it?wc-ng is warning you that letting a remote server run cubescript on your client is potentially dangerous. Go to the next question for details. You can retry to install
rcs in wc-ng by first issuing this command:
/allowmasterserverscripts 1
What are the security implications of rcs?By allowing a remote server to run cubescript, you are trusting the server not to do evil things on your installation. However, cubescript is limited by the kind of commands that can be run. It is not possible to actually read a file and upload it to the server, for example. The risk which comes with
rcs then is much smaller than downloading a program (such as a client mod) from the internet and running it. Basically, the main risk is that the server can maliciously, or by mistake, corrupt your configuration: for example, it can wipe all your key bindings.
Who will be able to run cubescript after installing rcs?The code sent by pisto.horse allows all game servers on pisto.horse (currently 92.222.69.15) to run cubescript,
only when you are connected to them. Hence, it is my (pisto) complete responsibility of what is run on your client. If you don't know me, I've been active for a long time in the Sauerbraten scene, and my I have coded an anticheat client for the now defunct tournament swl (
this and
that archive.org links), and I'm now coding a server mod called
spaghettimod. The most popular server that I manage is
ZOMBIE OUTRBREAK! (pisto.horse 6666).
Will rcs overwrite my maps when the server sends one?Always and in any case, backups of both the map (.ogz) and configuration file (.cfg) are made.
I am a power user, and I want to know exactly how this works.The code sent by the pseudo master server is
here. The code installs itself in the
mapstart,
gamehud and
edithud aliases in order to be activated when you join the server, and to poll at every frame if the
maptitle is runnable as cubescript. In such case, it first checks that the server is allowed to run cubescript (the list of allowed addresses is in alias
rcs_allowed_servers), and if positive it finally runs it. The server side code to send cubescript is
here. During installation, the master server is reset to "sauerbraten.org", and your preexisting
mapstart,
gamehud and
edithud aliases are moved to
rcs_mapstart_real,
rcs_gamehud_real and
rcs_edithud_real, which are in turn called by the
rcs hooks.
This thing is made for the server "reissen? FUCK YOU!", however there is no mentioning of it in the server itself, why is that?Getting a modded server on the official server list requires an individual approval of eihrul. The deal for this server, due to the security implications outlined above, was that I wouldn't publicize
rcs on the server itself, in order not to set a precedent and have a large number of other parties require something similar.