I’ve tried a couple of libraries but it seems that the rust rcon protocol and the source ds rcon protocol still use different implementations. This annoyed me so I went to write the rcon class myself up to the point where it worked.
This class is quickly hacked together. I expect this to break with every other Rust update or even fail to handle certain commands.
I use this class to send announcements to my vanilla server, to call airdrops every n minutes with a minimum amount of players and to announce when admins joined the server.
NOTE that this script should not be used for user interaction (it’s slow and it sucks, but it does the job).
Edit: It’s a lot faster now, pretty sure this can be used for user interaction.
To see a live use of this script, join rust.bloodisgood.org:28200
http://pastebin.com/vQqmx6bR (v 1.1)
Creative Commons BY-NC-SA 4.0