et-status-parser

0.0.1 • Public • Published

Wolfenstein: Enemy Territory status response parser

This library parses a status response buffer and returns all the key-value pairs from the server response and a list of players on the server

// We use the enemy-territory-query library to query the
// server
var etQuery = require('enemy-territory-query');
 
var statusParser = require('./et-status-parser');
 
// Send a query to the server
etQuery.getStatus({
  address: 'et.etjump.com',
  port: 27960
}, function (status, rinfo, err) {
  if (err) throw err;
 
  // Parse the status
  var parsedStatus = statusParser.parseStatus(status);
 
  console.log('Server host name', parsedStatus.keys.sv_hostname);
  console.log('Server players: ', parsedStatus.players.join(''));
});
 

Readme

Keywords

none

Package Sidebar

Install

npm i et-status-parser

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • haapanen