gamedig / node-gamedig

Query game servers and not only! Node.JS/Deno/Bun or Bash (via the CLI).
https://www.npmjs.com/package/gamedig
MIT License
598 stars 146 forks source link

add function to send commands by rcon #350

Open 3lmack opened 1 year ago

3lmack commented 1 year ago

It would be great apart from receiving information from the server that you can also send commands for example status or kick etc.

CosminPerRam commented 1 year ago

Well, that's just an rcon client then. It would be true that we could benefit in having rcon comunication for getting specific data/extra data (in case with Rust where it has a streamsniping system and on the normal query they change the players names around), ~but I don't really think that embeding a rcon client in the library would be something fit to be here, as there are already a multitude of rcon clients~ (edited: I was wrong).

3lmack commented 1 year ago

Well, that's just an rcon client then. It would be true that we could benefit in having rcon comunication for getting specific data/extra data (in case with Rust where it has a streamsniping system and on the normal query they change the players names around), but I don't really think that embeding a rcon client in the library would be something fit to be here, as there are already a multitude of rcon clients.

What are they, the ones that exist are specific games and this library is multiple, that's why I said add the rcon

CosminPerRam commented 1 year ago

Hmm, on a second thought you might be right, there is rcon that implements rcon for Source, GoldSrc, Minecraft and CoD, there is also quake3-rcon which implements rcon for Quake 3 (which I think protocol-wise is different from the others, not sure). Making a single rcon for multiple games might be fit for this library after all, as it already is a wrapper for querying many games.

I will look into it to check what games have rcon support (other than Valve ones which are the same everywhere), this is now a tracking issue regarding rcon support.

CosminPerRam commented 12 months ago

Related: #329 (get better players data from rcon) and #46 (request for Valve's rcon).