protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } if (!Provider.isServer) { CommandWindow.LogError(this.localization.format("NotRunningErrorText")); return; } string[] componentsFromSerial = Parser.getComponentsFromSerial(parameter, '/'); if (componentsFromSerial.Length != 2) { CommandWindow.LogError(this.localization.format("InvalidParameterErrorText")); return; } CSteamID csteamID; if (!PlayerTool.tryGetSteamID(componentsFromSerial[0], out csteamID)) { CommandWindow.LogError(this.localization.format("InvalidSteamIDErrorText", new object[] { componentsFromSerial[0] })); return; } SteamWhitelist.whitelist(csteamID, componentsFromSerial[1], executorID); CommandWindow.Log(this.localization.format("PermitText", new object[] { csteamID, componentsFromSerial[1] })); }
public static void save() { if (Level.info.type == ELevelType.SURVIVAL) { for (int i = 0; i < Provider.clients.Count; i++) { if (Provider.clients[i].model != null) { Player component = Provider.clients[i].model.GetComponent <Player>(); component.save(); } } VehicleManager.save(); BarricadeManager.save(); StructureManager.save(); ObjectManager.save(); LightingManager.save(); GroupManager.save(); } if (Dedicator.isDedicated) { SteamWhitelist.save(); SteamBlacklist.save(); SteamAdminlist.save(); } }
protected override void execute(CSteamID executorID, string parameter) { if (!Dedicator.isDedicated) { return; } if (!Provider.isServer) { CommandWindow.LogError(this.localization.format("NotRunningErrorText")); return; } CSteamID csteamID; if (!PlayerTool.tryGetSteamID(parameter, out csteamID)) { CommandWindow.LogError(this.localization.format("InvalidSteamIDErrorText", new object[] { parameter })); return; } if (!SteamWhitelist.unwhitelist(csteamID)) { CommandWindow.LogError(this.localization.format("NoPlayerErrorText", new object[] { csteamID })); return; } CommandWindow.Log(this.localization.format("UnpermitText", new object[] { csteamID })); }