Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bukkit-stats

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bukkit-stats - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

15

lib/bukkit-stats.js

@@ -19,6 +19,6 @@ // module dependencies

// ensure that the object is instanciated with the new operator
if(!(this instanceof Stats)) return new Stats(host, port);
if(!(this instanceof Stats)) return new Stats(host, port, cb);
// parse the arguments
if(~host.indexOf(":")) {
if(typeof host == "string" && ~host.indexOf(":")) {
host = host.split(":");

@@ -28,6 +28,7 @@ this.config = { host: host[0], port: host[1] };

this.config = {
host: host || CONNECTION.defaultHost,
port: parseInt(port) || CONNECTION.defaultPort
host: typeof host == "string" ? host : CONNECTION.defaultHost,
port: typeof port == "number" ? port : CONNECTION.defaultPort
};
}
if(typeof host == "function") cb = host;

@@ -113,3 +114,7 @@ else if(typeof port == "function") cb = port;

return { motd: res[0], onlinePlayers: res[1], maxPlayers: res[2] };
return {
motd: res[0],
onlinePlayers: parseInt(res[1]),
maxPlayers: parseInt(res[2])
};
};

@@ -116,0 +121,0 @@

{
"name": "bukkit-stats",
"version": "1.0.0",
"version": "1.0.1",
"description": "Gets a server's stats displayed in the client serverlist",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc