Fix some bad references

This commit is contained in:
Cryptkeeper 2016-02-01 04:53:40 -06:00
parent 01a11263ce
commit 1483a62711
2 changed files with 4 additions and 4 deletions

6
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', {

@ -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;
}