mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 20:49:43 +00:00
Obtain GIT information
This commit is contained in:
parent
40b43a911e
commit
6763e93a8d
1 changed files with 5 additions and 0 deletions
|
|
@ -113,6 +113,11 @@ class ServerAPI{
|
||||||
self::$serverRequest = $this->server;
|
self::$serverRequest = $this->server;
|
||||||
$this->setProperty("server-id", $this->server->serverID);
|
$this->setProperty("server-id", $this->server->serverID);
|
||||||
$this->server->api = $this;
|
$this->server->api = $this;
|
||||||
|
if(file_exists(FILE_PATH.".git/refs/heads/master")){ //Found Git information!
|
||||||
|
$sha1 = trim(file_get_contents(FILE_PATH.".git/refs/heads/master"));
|
||||||
|
console("[GIT] Commit \x1b[33m".$sha1);
|
||||||
|
}
|
||||||
|
|
||||||
if($this->getProperty("upnp-forwarding") === true){
|
if($this->getProperty("upnp-forwarding") === true){
|
||||||
console("[INFO] [UPnP] Trying to port forward...");
|
console("[INFO] [UPnP] Trying to port forward...");
|
||||||
UPnP_PortForward($this->getProperty("port"));
|
UPnP_PortForward($this->getProperty("port"));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue