I have been using RCON to connect to my game server (Minecraft) remotely without logging into my computer and certain commands use § and a number for a color coding in the game and I was wondering if with the output if I could have it removed as the output comes back. Here is the code,
const readline = require('readline').createInterface({
input: process.stdin,
output: process.stdout
});
const Rcon = require('rcon')
const conn = new Rcon('IP', Port, 'password');
conn.on('auth', function() {
// You must wait until this event is fired before sending any commands,
// otherwise those commands will fail.
console.log("Authenticated");
console.log("Sending command upon entry")
readline.question('enter command: ', input => {
conn.send(`${input}`);
readline.close();
});
}).on('response', function(str) {
console.log("Response: " + str);
}).on('error', function(err) {
console.log("Error: " + err);
}).on('end', function() {
console.log("Connection closed");
process.exit();
});
conn.connect();