pushrax / node-rcon

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

Can't connect to DayZ server #48

Open inkihh opened 1 year ago

inkihh commented 1 year ago

Hey there,

I'm trying to connect to a local test DayZ server, but it just doesn't work. I tried every combination of tcp true/false and challenge true/false. I know that rcon works per se, because I can connect with a DarT client.

This is my script, any advice?

const rcon = require('rcon');

const options = {
  tcp: true,
  challenge: false
};

const conn = new rcon('127.0.0.1', 2305, 'testtest', options);

conn.on('auth', function() {
  console.log("Authenticated");
}).on('response', function(str) {
  console.log("Response: " + str);
}).on('server', function(str) {
  console.log("server: " + str);
}).on('error', function(err) {
  console.log("Error: " + err);
}).on('end', function() {
  console.log("Connection closed");
  process.exit();
});

conn.connect();
Thomas-is-dev commented 1 year ago

same problem