LinuxGSM icon indicating copy to clipboard operation
LinuxGSM copied to clipboard

feat(rcon): add RCON command

Open MicLieg opened this issue 1 year ago • 1 comments

Description

This pull request aims to add RCON commands to lgsm. This will allow game server admins to easily run scheduled RCON commands on game servers that don't provide an interactive console, without the need for external client software.

I've implemented a very basic RCON client in Python. It mostly follows the Source RCON Protocol except for multiple packet responses that are used when the server response exceeds 4096 bytes. This shouldn't be a problem as I intend the RCON command to be a write only command rather than a full RCON interface to the server.

While i'm using Minecraft, which already supports LinuxGSM's send command, to demo this feature, the main goal ist to send commands to gameservers that do NOT have an interactive console.

https://github.com/GameServerManagers/LinuxGSM/assets/38057464/a12625eb-f774-419b-b11a-f15f9bb08a69

Still on the TODO list (help appreciated):

  • Identify Servers that don't support RCON
  • Identify if there are Servers that use a different Protocol than the Source RCON Protocol
  • Verify that the Used RCON connection Details (${telnetip}, ${rconport}, ${rconpassword}) are always set

Related to #674, #2107, #2334, #2922

Fixes #674

Type of change

  • [ ] Bug fix (a change which fixes an issue).
  • [x] New feature (a change which adds functionality).
  • [ ] New Server (new server added).
  • [ ] Refactor (restructures existing code).
  • [ ] Comment update (typo, spelling, explanation, examples, etc).

Checklist

PR will not be merged until all steps are complete.

  • [x] This pull request links to an issue.
  • [x] This pull request uses the develop branch as its base.
  • [x] This pull request subject follows the Conventional Commits standard.
  • [x] This code follows the style guidelines of this project.
  • [x] I have performed a self-review of my code.
  • [x] I have checked that this code is commented where required.
  • [x] I have provided a detailed enough description of this PR.
  • [ ] I have checked if documentation needs updating. TODO

Documentation

If documentation does need updating either update it by creating a PR (preferred) or request a documentation update.

  • User docs: https://github.com/GameServerManagers/LinuxGSM-Docs
  • Dev docs: https://github.com/GameServerManagers/LinuxGSM-Dev-Docs

Thank you for your Pull Request!

MicLieg avatar Feb 06 '24 03:02 MicLieg

Do you have any feedback for this feature & implementation, @dgibbs64?

MicLieg avatar Jul 13 '24 02:07 MicLieg