SourceCon - Simple SRCDS RCON for node.js =========================================
npm install @hellz.fr/sourceconSourceCon - Simple SRCDS RCON for node.js
=========================================
Features
--------
This fork use async await, with node 20*
* Executes arbitrary RCON commands
* Properly handles multi-part responses
* Emits push messages / server log, like sent by Rust
* Includes a command line RCON console
Usage
-----npm install sourcecon
``js`
var SourceCon = require("sourcecon");
var con = new SourceCon("127.0.0.1", 25080);
con.connect(function(err) {
if (err) {
throw(err);
}
con.auth("rconpass", function(err) {
if (err) {
throw(err);
}
con.send("status", function(err, res) {
if (err) {
throw(err);
}
console.log("STATUS: "+res);
});
...
});
});
Command line
------------
* npm install -g sourceconsourcecon` on the command line to start the RCON console
* Run
License: Apache License, Version 2.0