source: binary-improvements/MapRendering/Commands/EnableOpenIDDebug.cs@ 351

Last change on this file since 351 was 325, checked in by alloc, 6 years ago

Code style cleanup (mostly whitespace changes, enforcing braces, using cleanup)

File size: 821 bytes
RevLine 
[318]1using System;
2using System.Collections.Generic;
[325]3using AllocsFixes.NetConnections.Servers.Web;
[318]4
[325]5namespace AllocsFixes.CustomCommands {
6 public class EnableOpenIDDebug : ConsoleCmdAbstract {
7 public override string GetDescription () {
[318]8 return "enable/disable OpenID debugging";
9 }
10
[325]11 public override string[] GetCommands () {
12 return new[] {"openiddebug"};
[318]13 }
14
[325]15 public override void Execute (List<string> _params, CommandSenderInfo _senderInfo) {
[318]16 try {
17 if (_params.Count != 1) {
[325]18 SdtdConsole.Instance.Output ("Current state: " + OpenID.debugOpenId);
[318]19 return;
20 }
21
[325]22 OpenID.debugOpenId = _params [0].Equals ("1");
[318]23 SdtdConsole.Instance.Output ("Set OpenID debugging to " + _params [0].Equals ("1"));
24 } catch (Exception e) {
25 Log.Out ("Error in EnableOpenIDDebug.Run: " + e);
26 }
27 }
28 }
29}
Note: See TracBrowser for help on using the repository browser.