pushrax / node-rcon

A generic RCON protocol client for node.js
MIT License
134 stars 31 forks source link

Starter code not working for chivalry server #34

Closed avi312singh closed 3 years ago

avi312singh commented 3 years ago

Hi there i have this starter code for my chivalry server...

var conn = new Rcon('79.98.25.135', 25010, 'myPassword');
conn.on('auth', function () {
    console.log("Authed!");

}).on('response', function (str) {
    console.log("Got response: " + str);

}).on('end', function () {
    console.log("Socket closed!");
    process.exit();

});

However doesn't seem to do anything or print anything in console. image

Does this documentation - https://tornbannerjira.atlassian.net/wiki/spaces/CHIVCOM/pages/9175118/RCon+Protocol not match with this RCON pacakge?

BarryCarlyon commented 3 years ago

Add conn.connect(); to the end of the file

the new Rcon won't "auto connect" so you have to tell it to connect.