1.1.0 • Published 4 years ago

sub-rosa-servers v1.1.0

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

sub-rosa-servers

Grab info about currently running Sub Rosa servers. Simple Promise API that gives you an array of server objects.

Installation

npm install sub-rosa-servers

Example

const getServers = require('sub-rosa-servers');

// Usage
const servers = await getServers();
for (const server of servers) {
  if (server.players > 0) {
    console.log(`${server.players} people playing on ${server.name}!`);
  }
}

Server Object

KeyTypeDescription
addressstringIP of the server (x.x.x.x)
portnumber
latencynumberResponse time in milliseconds
namestringPublic server title
versionnumberEx. 35
buildstringEx. 'b'
passwordedboolean
gameTypenumberEx. 3 = round
playersnumberHow many people are connected
maxPlayersnumber
identifiernumberUnique ID the server assigns to itself, stored in server.srk. Not guaranteed to be unique because people copy/paste files.
clientCompatabilitynumberHidden build number used to indicate which clients can join this server — it appears red and unclickable in the list if it isn't the same as the client's
bufferBufferRaw binary ping response from the server
1.1.0

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago