pushrax / node-rcon

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

A question #28

Closed Shelly7w7 closed 3 years ago

Shelly7w7 commented 4 years ago

How do I capture the output send in the console ?

jonathan-x01 commented 3 years ago

It is quite simple actually. You should use the response event to accomplish this.

const conn = new Rcon('localhost',1234,"my-pass");

conn.on('response',function(res){
    console.log(res);
});

But hopefully I understood you correctly though and this managed to help you.