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

Last change on this file since 322 was 318, checked in by alloc, 7 years ago

Added console command openiddebug

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