From 878fe6496bf3441c385de725309795db53ed35c2 Mon Sep 17 00:00:00 2001 From: Cryptkeeper Date: Mon, 1 Feb 2016 04:39:31 -0600 Subject: [PATCH] Move servers into servers.json instead of config.json --- app.js | 3 +- config.json | 162 --------------------------------------------------- lib/util.js | 5 +- servers.json | 162 +++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 166 insertions(+), 166 deletions(-) create mode 100644 servers.json diff --git a/app.js b/app.js index 07c3c6d..6501a98 100644 --- a/app.js +++ b/app.js @@ -6,6 +6,7 @@ var util = require('./lib/util'); var db = require('./lib/database'); var config = require('./config.json'); +var servers = require('./servers.json'); var networkHistory = []; var connectedClients = 0; @@ -14,8 +15,6 @@ var graphData = []; var lastGraphPush = []; function pingAll() { - var servers = config.servers; - for (var i = 0; i < servers.length; i++) { // Make sure we lock our scope. (function(network) { diff --git a/config.json b/config.json index d7e8401..5e0264f 100644 --- a/config.json +++ b/config.json @@ -1,166 +1,4 @@ { - "servers": [ - { - "name": "Hypixel", - "ip": "mc.hypixel.net", - "type": "PC" - }, - { - "name": "HiveMC", - "ip": "play.hivemc.com", - "type": "PC" - }, - { - "name": "CubeCraft", - "ip": "play.cubecraft.net", - "type": "PC" - }, - { - "name": "Overcast", - "ip": "us.oc.tc", - "type": "PC" - }, - { - "name": "Shotbow", - "ip": "us.shotbow.net", - "type": "PC" - }, - { - "name": "Badlion", - "ip": "na.badlion.net", - "type": "PC" - }, - { - "name": "MCGamer", - "ip": "play.mcgamer.net", - "type": "PC" - }, - { - "name": "Olimpocraft", - "ip": "olimpo.me", - "type": "PC" - }, - { - "name": "Minecade", - "ip": "mineca.de", - "type": "PC" - }, - { - "name": "The Nexus", - "ip": "hub.thenexusmc.com", - "type": "PC" - }, - { - "name": "Kohi", - "ip": "kohi.us", - "type": "PC" - }, - { - "name": "Wynncraft", - "ip": "play.wynncraft.com", - "type": "PC" - }, - { - "name": "Mineplex", - "ip": "us.mineplex.com", - "type": "PC" - }, - { - "name": "Hypixel PE", - "ip": "pe.hypixel.net", - "type": "PE" - }, - { - "name": "Cosmic PVP", - "ip": "cosmicpvp.me", - "type": "PC" - }, - { - "name": "PartyZone", - "ip": "play.mcpz.net", - "type": "PC" - }, - { - "name": "Brawl", - "ip": "brawl.com", - "type": "PC" - }, - { - "name": "SaicoPvP", - "ip": "saicopvp.com", - "type": "PC" - }, - { - "name": "TheArchon", - "ip": "pvp.thearchon.net", - "type": "PC" - }, - { - "name": "GotPvP", - "ip": "play.gotpvp.com", - "type": "PC" - }, - { - "name": "Rewinside", - "ip": "mc.rewinside.tv", - "type": "PC" - }, - { - "name": "Woodycraft", - "ip": "woodycraft.net", - "type": "PC" - }, - { - "name": "Battlemine", - "ip": "mc.battlemine.net", - "type": "PC" - }, - { - "name": "Arkham", - "ip": "mc.arkhamnetwork.org", - "type": "PC" - }, - { - "name": "VikkCraft", - "ip": "hub.vikkcraft.com", - "type": "PC" - }, - { - "name": "MCMagic", - "ip": "mcmagic.us", - "type": "PC" - }, - { - "name": "GommeHD", - "ip": "gommehd.net", - "type": "PC" - }, - { - "name": "Island Clash", - "ip": "play.islandclash.com", - "type": "PC" - }, - { - "name": "Playminity", - "ip": "mc.playminity.com", - "type": "PC" - }, - { - "name": "Mobcrush Land", - "ip": "play.mobcrush.com", - "type": "PE" - }, - { - "name": "Epicube", - "ip": "play.epicube.fr", - "type": "PC" - } - { - "name": "BeanBlockz", - "ip": "mc.beanblockz.com", - "type": "PC" - } - ], "routes": { "/": "assets/html/index.html", "/images/compass.png": "assets/images/compass.png", diff --git a/lib/util.js b/lib/util.js index a575409..0e9914b 100644 --- a/lib/util.js +++ b/lib/util.js @@ -1,9 +1,10 @@ var config = require('../config.json'); +var servers = require('../servers.json'); // Checks if we have a server in config.json with the IP. function serverWithIpExists(ip) { - for (var i = 0; i < config.servers.length; i++) { - var entry = config.servers[i]; + for (var i = 0; i < servers.length; i++) { + var entry = servers[i]; if (entry.ip === ip) { return true; diff --git a/servers.json b/servers.json new file mode 100644 index 0000000..2e83547 --- /dev/null +++ b/servers.json @@ -0,0 +1,162 @@ +[ + { + "name": "Hypixel", + "ip": "mc.hypixel.net", + "type": "PC" + }, + { + "name": "HiveMC", + "ip": "play.hivemc.com", + "type": "PC" + }, + { + "name": "CubeCraft", + "ip": "play.cubecraft.net", + "type": "PC" + }, + { + "name": "Overcast", + "ip": "us.oc.tc", + "type": "PC" + }, + { + "name": "Shotbow", + "ip": "us.shotbow.net", + "type": "PC" + }, + { + "name": "Badlion", + "ip": "na.badlion.net", + "type": "PC" + }, + { + "name": "MCGamer", + "ip": "play.mcgamer.net", + "type": "PC" + }, + { + "name": "Olimpocraft", + "ip": "olimpo.me", + "type": "PC" + }, + { + "name": "Minecade", + "ip": "mineca.de", + "type": "PC" + }, + { + "name": "The Nexus", + "ip": "hub.thenexusmc.com", + "type": "PC" + }, + { + "name": "Kohi", + "ip": "kohi.us", + "type": "PC" + }, + { + "name": "Wynncraft", + "ip": "play.wynncraft.com", + "type": "PC" + }, + { + "name": "Mineplex", + "ip": "us.mineplex.com", + "type": "PC" + }, + { + "name": "Hypixel PE", + "ip": "pe.hypixel.net", + "type": "PE" + }, + { + "name": "Cosmic PVP", + "ip": "cosmicpvp.me", + "type": "PC" + }, + { + "name": "PartyZone", + "ip": "play.mcpz.net", + "type": "PC" + }, + { + "name": "Brawl", + "ip": "brawl.com", + "type": "PC" + }, + { + "name": "SaicoPvP", + "ip": "saicopvp.com", + "type": "PC" + }, + { + "name": "TheArchon", + "ip": "pvp.thearchon.net", + "type": "PC" + }, + { + "name": "GotPvP", + "ip": "play.gotpvp.com", + "type": "PC" + }, + { + "name": "Rewinside", + "ip": "mc.rewinside.tv", + "type": "PC" + }, + { + "name": "Woodycraft", + "ip": "woodycraft.net", + "type": "PC" + }, + { + "name": "Battlemine", + "ip": "mc.battlemine.net", + "type": "PC" + }, + { + "name": "Arkham", + "ip": "mc.arkhamnetwork.org", + "type": "PC" + }, + { + "name": "VikkCraft", + "ip": "hub.vikkcraft.com", + "type": "PC" + }, + { + "name": "MCMagic", + "ip": "mcmagic.us", + "type": "PC" + }, + { + "name": "GommeHD", + "ip": "gommehd.net", + "type": "PC" + }, + { + "name": "Island Clash", + "ip": "play.islandclash.com", + "type": "PC" + }, + { + "name": "Playminity", + "ip": "mc.playminity.com", + "type": "PC" + }, + { + "name": "Mobcrush Land", + "ip": "play.mobcrush.com", + "type": "PE" + }, + { + "name": "Epicube", + "ip": "play.epicube.fr", + "type": "PC" + }, + { + "name": "BeanBlockz", + "ip": "mc.beanblockz.com", + "type": "PC" + } +] \ No newline at end of file