prestonp / simple-rcon

Simple, painless node RCON client for Source servers
MIT License
14 stars 4 forks source link

simple-rcon

Build Status Coverage Status

Dependency Status devDependency Status

Simple, painless node RCON client for Source servers.

Install
npm install simple-rcon
Examples
var Rcon = require('simple-rcon');
var client = new Rcon({
  host: '127.0.0.1',
  port: '27015',
  password: 'rconPassword'
}).exec('changelevel cp_badlands', function() {
  client.exec('say \'hey look the map changed!\'');
}).exec('status', function(res) {
  console.log('Server status', res.body);
}).exec('sm_kick somebody', function() {
  client.close();
}).connect();

client.on('authenticated', function() {
  console.log('Authenticated!');
}).on('connected', function() {
  console.log('Connected!');
}).on('disconnected', function() {
  console.log('Disconnected!');
});
API
Events
Contributors
Further Reading

Read more about the RCON Protocol

License

MIT