Tiny Quake3 RCON library for Go.
It was inspired by the excellent Node.js library: https://github.com/thbaumbach/node-quake3-rcon
The goal of this project is to provide the same simplicity and tiny footprint, but in pure Go.
- tiny and clean implementation
- no dependencies
- supports multi-packet responses
- configurable timeout and quiet window
- debug logging support
- interactive CLI example included
Clone the repository:
git clone https://github.com/mambuzrrr/golang-quake3-rcon.git
cd golang-quake3-rconInitialize module if needed:
go mod tidyCreate a config.json in the project root:
{
"address": "127.0.0.1:28960",
"password": "your_rcon_password",
"debug": false,
"timeout_ms": 2000,
"quiet_ms": 180
}Run the status example:
go run ./examples/statusExample output:
map: mp_railyard
num score ping name lastmsg address
--- ----- ---- --------------- ------- ---------------------
0 8 50 player 0 127.0.0.1:28960
Run the CLI:
go run ./examples/cliThen type commands:
> status
> map_restart
> say hello noobs
> exit (exit is to leave the CLI, nothing todo with ingame :D)
Example:
package main
import (
"fmt"
"q3rcon/q3rcon"
)
func main() {
client, _ := q3rcon.New("127.0.0.1:28960", "rconpassword")
resp, _ := client.Send("status") // Change Command here... like map_restart blabla...
fmt.Println(resp)
}This library exists to provide a minimal, clean, and reliable Go implementation of Quake3 RCON, inspired by the Node.js version but without runtime dependencies.
MIT License
Inspired by: https://github.com/thbaumbach/node-quake3-rcon
Thanks to the original authors.