Added internet check and warning when offline

This commit is contained in:
2026-05-21 10:10:18 -06:00
parent 283ffb66eb
commit 93c4825ff7
4 changed files with 117 additions and 94 deletions

View File

@@ -8,6 +8,9 @@ import (
)
func startStopServer(cmd string, con UsrConfig) {
if hasInternet() != true {
fmt.Printf("WARNING!\n\tNot connected to internet, LAN access only\n")
}
switch cmd {
case "start":
x := fmt.Sprintf("%s --port %d --server-settings %s --start-server %s", con.Server.ServExec, con.Server.ServPort, con.Server.ServCfg, con.Server.WorldFile)