pushrax / node-rcon

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

Csgo server returning "Bad Password" #21

Closed JamesDolphin closed 3 years ago

JamesDolphin commented 5 years ago

I am running some test code to get up and running.

I am getting an "Authed" output.

If I try to client.send('say test message');

The server console responds with "rcon from x.x.x.x:yyyy : Bad Password"

I have made sure my rcon password is correct as that is what I am using to monitor the server outputs. Any idea what the issue may be?

Shaneajm commented 5 years ago

Currently getting the same error. Did you ever find a fix?

JamesDolphin commented 5 years ago

I am not sure what I was doing wrong back then but yeah I got it working.

const Rcon = require('rcon');

rconclient = new Rcon(ip, port, rpassword);
rconclient.connect();

rconclient.on('auth', async () => {
    console.log("RCON connected")

    rconclient.send(data);
});
SinaAboutalebi commented 1 year ago

cuz u send commands after the connection & authentication , i had this issue too!