Cached Utils::getIP() method

This commit is contained in:
Shoghi Cervantes 2013-05-26 16:15:30 +02:00
parent 838e7ad010
commit 6d54495402
2 changed files with 10 additions and 9 deletions

View file

@ -102,9 +102,7 @@ class ServerAPI{
console("[INFO] [UPnP] Trying to port forward...");
UPnP_PortForward($this->getProperty("server-port"));
}
if(($ip = Utils::getIP()) !== false){
console("[INFO] External IP: ".$ip);
}
if($this->getProperty("last-update") === false or ($this->getProperty("last-update") + 3600) < time()){
console("[INFO] Checking for new server version");
console("[INFO] Last check: \x1b[36m".date("Y-m-d H:i:s", $this->getProperty("last-update"))."\x1b[0m");
@ -144,7 +142,6 @@ class ServerAPI{
console("[INFO] \x1b[36mThis is the latest STABLE version");
}
}
}
}