mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Added online check
This commit is contained in:
parent
b589b69beb
commit
bf5df18170
2 changed files with 24 additions and 1 deletions
|
|
@ -26,6 +26,9 @@ the Free Software Foundation, either version 3 of the License, or
|
|||
*/
|
||||
|
||||
function UPnP_PortForward($port){
|
||||
if(Utils::$online === false){
|
||||
return false;
|
||||
}
|
||||
if(Utils::getOS() != "win" or !class_exists("COM")){
|
||||
return false;
|
||||
}
|
||||
|
|
@ -44,6 +47,9 @@ function UPnP_PortForward($port){
|
|||
}
|
||||
|
||||
function UPnP_RemovePortForward($port){
|
||||
if(Utils::$online === false){
|
||||
return false;
|
||||
}
|
||||
if(Utils::getOS() != "win" or !class_exists("COM")){
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue