From 1483a62711d430826c973d04d603e7b30ba68fd8 Mon Sep 17 00:00:00 2001 From: Cryptkeeper Date: Mon, 1 Feb 2016 04:53:40 -0600 Subject: [PATCH] Fix some bad references --- app.js | 6 +++--- lib/util.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index 6501a98..8114766 100644 --- a/app.js +++ b/app.js @@ -104,11 +104,11 @@ function handlePing(network, res, err) { // Don't have too much data! util.trimOldPings(graphData); - if (!graphData[network.ip]) { - graphData[network.ip] = []; + if (!graphData[network.name]) { + graphData[network.name] = []; } - graphData[network.ip].push([timeMs, res ? res.players.online : 0]); + graphData[network.name].push([timeMs, res ? res.players.online : 0]); // Send the update. server.io.sockets.emit('updateHistoryGraph', { diff --git a/lib/util.js b/lib/util.js index 2f06c02..39c4039 100644 --- a/lib/util.js +++ b/lib/util.js @@ -29,7 +29,7 @@ function getServerNameByIp(ip) { var entry = servers[i]; if (entry.ip === ip) { - lookupName[entry.ip] = entry.name; + serverNameLookup[entry.ip] = entry.name; return entry.name; }