diff --git a/lib/util.js b/lib/util.js index 44921e6..98639e4 100644 --- a/lib/util.js +++ b/lib/util.js @@ -5,6 +5,8 @@ var servers = require('../servers.json'); var serverNameLookup = {}; +// Finds a server in servers.json with a matching IP. +// If it finds one, it caches the result for faster future lookups. function getServerNameByIp(ip) { var lookupName = serverNameLookup[ip]; @@ -23,6 +25,7 @@ function getServerNameByIp(ip) { } } +// Returns a list of configured server IPs from servers.json function getServerIps() { var ips = [];