Xonotic Forums
[WIP] Xon_Rcon - In-Game Rcon Tool - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Support (https://forums.xonotic.org/forumdisplay.php?fid=3)
+--- Forum: Xonotic - Server Administration (https://forums.xonotic.org/forumdisplay.php?fid=16)
+--- Thread: [WIP] Xon_Rcon - In-Game Rcon Tool (/showthread.php?tid=3284)



[WIP] Xon_Rcon - In-Game Rcon Tool - sqamsqam - 07-18-2012

NOTICE:
This system is not secure: it is very easy to use the rcon commands when you are not an admin.
Please do not use this.

~Mr. Bougo



Xon_Rcon
Project on GitHub



Hey I am currently working on a little project of mine that aims to make server administration easier. Xon_Rcon does this by reading the server log and issuing rcon commands depending on what is typed in chat e.g a user on the admin list types "!map stor" in the ingame chat. Xon_Rcon then looks for any map beginning with "stor". since stormkeep is the only map that matches Xon_Rcon sends the rcon command "chmap stormkeep" to the server.

This is still a work in progress.

Current Features:
  • Sends rcon commands to the server.
  • Checks to make sure the user is allowed to issue commands.
  • Receives server log over udp using "log_dest_udp"

Todo:
  • Implement rcon_secure 1 and 2
  • Command access levels. (let only certain users issue some of the commands such as "!rcon")
  • bug fixes...

Possible Features:
  • Manage multiple Xonotic servers from one Xon_Rcon instance.

Command List:
  • say ("!say hi everyone" -> "rcon say hi everyone")
  • map ("!map stor" -> "rcon chmap stormkeep")
  • gametype ("!gametype ctf" -> "rcon gametype ctf")
  • kick ("!kick player name" -> "rcon kick player name")
  • ban ("!ban player name" -> "rcon ban player name")
  • rcon ("!rcon set g_minstagib 1" -> "rcon set g_minstagib 1")

Anyways if you have any suggestions feel free to comment below. All input is welcomed.

If you want join in on the development feel free to help collaborate on GitHub.

Changelog:
Jul 29, 2012:
  • Code Cleanup - Cleaned up code for a more cleaner release. i have decided not to implement rcon_secure 1 and 2 yet
Jul 20, 2012:
  • Bug Fixes... - Sanitised incomming packets to be in a format that is easier to work with.
Jul 19, 2012:
  • More Commands - Extended the functionality of !map to also accept a third optional agument to specify the gametype and added !restart which restarts the current map.
Jul 18, 2012:
  • Functionality and Documentation - More functionality, documentation and commands.
  • Adding Rcon Security - Somewhat implemented. not at a near finished state yet. rcon_secure abouve 0 does not currently work.
  • First Commit =D - First upload to github.



RE: [WIP] Xon_Rcon - In-Game Rcon Tool - Mirio - 07-19-2012

You don't kick via player name. You have to type "status" first and check the number.

rcon kick # X and rcon kickban #X
Can't remember if you need a space between # and X at kick or ban. But you need it somewhere. Tongue
Edit: Ban works via IP.
It used to be on DCC like this: rcon ban IP TIMEINSCEONDS REASON
i.e. rcon ban 128.0 10000 Troll

But this seems to become a nice tool. Smile


RE: [WIP] Xon_Rcon - In-Game Rcon Tool - sqamsqam - 07-19-2012

ahh ok thanks for that. i guess iv got a bit more work to do then. i havent been able to test the kick and ban commands yet. the only commands i have been able to test are say, map, and gametype. in theory the rcon command should work.


RE: [WIP] Xon_Rcon - In-Game Rcon Tool - Mr. Bougo - 07-19-2012

Also, consider a more "silent" way to use the script than saying the command in chat. Otherwise it looks like these "look-at-my-admin-powers" irc bot. I'm not sure the command tell # 0 <message> shows up in the server log, see if that works.


RE: [WIP] Xon_Rcon - In-Game Rcon Tool - sqamsqam - 07-20-2012

Ok so i woke up this morning and did some more work on the script after having a few days break from it. I went to town on thursday night and well on friday i didn't get out of bed till 3pm =/

Jul 20, 2012:
  • Bug Fixes... - Sanitized incomming packets to be in a format that is easier to work with.

as for looking into a silent way i cannot test "tell" as you need at least 2 players on the server to even use the command ("tell 0 message" doesn't work either because 0 is an invalid client number). if you want to do it silently you may as well just use the normal rcon through the in game console.


RE: [WIP] Xon_Rcon - In-Game Rcon Tool - Majki - 07-21-2012

"Big Brother Bot" tailored for Xonotic? Great news! In future GUI maybe?


RE: [WIP] Xon_Rcon - In-Game Rcon Tool - sqamsqam - 07-21-2012

could be a possibility.
my main goal at the moment is to get it working with rcon_secure 1 and 2


RE: [WIP] Xon_Rcon - In-Game Rcon Tool - Mr. Bougo - 07-21-2012

Um, majki, as said in the other B3 thread, this here project is pretty much (a part of) rcon2irc in php instead of perl. Wink


RE: [WIP] Xon_Rcon - In-Game Rcon Tool - sqamsqam - 07-29-2012

i have decided to clean the code up a little and that i will not be implementing rcon_secure 1 and 2 for now.]

Jul 29, 2012:
  • Code Cleanup - Cleaned up code for a more cleaner release. i have decided not to implement rcon_secure 1 and 2 yet



RE: [WIP] Xon_Rcon - In-Game Rcon Tool - kingtiger01 - 02-23-2013

Any update??


RE: [WIP] Xon_Rcon - In-Game Rcon Tool - Mr. Bougo - 02-23-2013

(02-23-2013, 05:05 AM)kingtiger01 Wrote: Any update??

You'd better send him an email through his profile page if you want an answer. But the git repository has not seen any update in seven months so don't keep your hopes too high.

EDIT: Wow, I read some code and this thing is pretty insecure. Please don't use it.


RE: [WIP] Xon_Rcon - In-Game Rcon Tool - sqamsqam - 06-20-2013

I pretty much abandoned the project after i realized there is no form of getting the users identity other then their in-game name or ip address.

if Xonotic had some sort of guid associated with each account then this would be easier.

if anyone wants to expand on what i have already done feel free to fork it.


RE: [WIP] Xon_Rcon - In-Game Rcon Tool - Mr. Bougo - 06-20-2013

Actually there is such a system, but not for in-game chat messages. Users can make HTTP requests that contain a signature in their header, which can be checked based on the player's public key (which is also what authenticates users on stats.xonotic.org).

There was some slight experimenting in this thread: How to output (rainbow) colored text?

I don't think you can have a safe, authenticated in-game chat trigger for the moment.