source-rcon-lib

1.0.3 • Public • Published

Source RCON library

A simple Node.js library for the Source RCON Protocol

Installation

yarn add source-rcon-lib

Usage

This is a promise-based library.

Examples

Establishing a connection:

const {connect} = require('source-rcon-lib');
 
// these values are default
connect('127.0.0.1', '27020', '')
  .then(() => console.log('connected'))
  .catch(err => console.error(err));

Sending a command to list all players in server:

const {send} = require('source-rcon-lib');
 
send('listplayers')
  .then(res => console.log(res))
  .catch(err => console.error(err));

Disconnecting from RCON server:

const {disconnect} = require('source-rcon-lib');
 
disconnect()
  .then(() => console.log('disconnected'))
  .catch(err => console.error(err));

API

Function Arguments Returns
connect url (string), port (string), password (string) Promise
send command (string) Promise
disconnect none Promise

Upcoming

  • tests

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    11
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    11
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i source-rcon-lib

Weekly Downloads

11

Version

1.0.3

License

ISC

Unpacked Size

6.31 kB

Total Files

12

Last publish

Collaborators

  • brandtnick