Last change
on this file since 411 was 359, checked in by alloc, 5 years ago |
Removed unnecessary try-catch-blocks from commands (command handler catches exceptions anyway and provides more detailed output)
|
File size:
720 bytes
|
Rev | Line | |
---|
[318] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
[325] | 3 | using AllocsFixes.NetConnections.Servers.Web;
|
---|
[318] | 4 |
|
---|
[325] | 5 | namespace 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) {
|
---|
[359] | 16 | if (_params.Count != 1) {
|
---|
| 17 | SdtdConsole.Instance.Output ("Current state: " + OpenID.debugOpenId);
|
---|
| 18 | return;
|
---|
| 19 | }
|
---|
[318] | 20 |
|
---|
[359] | 21 | OpenID.debugOpenId = _params [0].Equals ("1");
|
---|
| 22 | SdtdConsole.Instance.Output ("Set OpenID debugging to " + _params [0].Equals ("1"));
|
---|
[318] | 23 | }
|
---|
| 24 | }
|
---|
| 25 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.