public bool ConnectRCON() { try { rcon = ServerQuery.GetServerInstance(EngineType.Source, loadedServer.getRCONIPEndPoint()).GetControl(loadedServer.RCONpw); WriteLog("Connected to RCON"); return true; } catch { WriteLog("Connecting to RCON failed"); return false; } }
public Helper() { Settings = new Config(); loadedServer = null; rcon = null; //Config laden bzw. erstellen... if (!File.Exists(configPath)) { if (!Directory.Exists(Directory.GetParent(configPath).ToString())) Directory.CreateDirectory(Directory.GetParent(configPath).ToString()); SaveConfig(); } else { LoadConfig(); } }