diff --git a/SecondBotEvents/Config/CommandsConfig.cs b/SecondBotEvents/Config/CommandsConfig.cs index 20bf78f..8024831 100644 --- a/SecondBotEvents/Config/CommandsConfig.cs +++ b/SecondBotEvents/Config/CommandsConfig.cs @@ -19,6 +19,7 @@ namespace SecondBotEvents.Config settings.Add("EnforceTimeWindow"); settings.Add("TimeWindowSecs"); settings.Add("Enabled"); + settings.Add("HideStatusOutput"); } public bool GetEnabled() diff --git a/SecondBotEvents/Config/CustomCommandsConfig.cs b/SecondBotEvents/Config/CustomCommandsConfig.cs index dc966db..e820c0b 100644 --- a/SecondBotEvents/Config/CustomCommandsConfig.cs +++ b/SecondBotEvents/Config/CustomCommandsConfig.cs @@ -12,6 +12,7 @@ namespace SecondBotEvents.Config { filename = "customcommands"; settings.Add("count"); + settings.Add("HideStatusOutput"); int loop = 1; while(loop <= GetCount()) { diff --git a/SecondBotEvents/Config/DataStoreConfig.cs b/SecondBotEvents/Config/DataStoreConfig.cs index afc86b5..248b754 100644 --- a/SecondBotEvents/Config/DataStoreConfig.cs +++ b/SecondBotEvents/Config/DataStoreConfig.cs @@ -21,6 +21,7 @@ namespace SecondBotEvents.Config settings.Add("AutoCleanKeyValueStore"); settings.Add("CleanKeyValueStoreAfterMins"); settings.Add("CommandHistoryLimit"); + settings.Add("HideStatusOutput"); } public int GetCommandHistoryLimit() diff --git a/SecondBotEvents/Config/DialogRelayConfig.cs b/SecondBotEvents/Config/DialogRelayConfig.cs index 07daafb..4b8bf14 100644 --- a/SecondBotEvents/Config/DialogRelayConfig.cs +++ b/SecondBotEvents/Config/DialogRelayConfig.cs @@ -15,6 +15,7 @@ namespace SecondBotEvents.Config settings.Add("RelayAvatar"); settings.Add("RelayObjectOwnerOnly"); settings.Add("RelayHttpurl"); + settings.Add("HideStatusOutput"); } public string GetRelayHttpurl() diff --git a/SecondBotEvents/Config/DiscordConfig.cs b/SecondBotEvents/Config/DiscordConfig.cs index 1543df5..69bfae6 100644 --- a/SecondBotEvents/Config/DiscordConfig.cs +++ b/SecondBotEvents/Config/DiscordConfig.cs @@ -14,6 +14,7 @@ namespace SecondBotEvents.Config settings.Add("ServerID"); settings.Add("ClientToken"); settings.Add("AllowDiscordCommands"); + settings.Add("HideStatusOutput"); } public bool GetEnabled() diff --git a/SecondBotEvents/Config/EventsConfig.cs b/SecondBotEvents/Config/EventsConfig.cs index 444fbe7..bd7a9f6 100644 --- a/SecondBotEvents/Config/EventsConfig.cs +++ b/SecondBotEvents/Config/EventsConfig.cs @@ -34,6 +34,7 @@ namespace SecondBotEvents.Config settings.Add("OutputIMuuid"); settings.Add("OutputHttpURL"); settings.Add("OutputSecret"); + settings.Add("HideStatusOutput"); } public string GetOutputSecret() diff --git a/SecondBotEvents/Config/HomeboundConfig.cs b/SecondBotEvents/Config/HomeboundConfig.cs index 1251762..e1e497f 100644 --- a/SecondBotEvents/Config/HomeboundConfig.cs +++ b/SecondBotEvents/Config/HomeboundConfig.cs @@ -17,6 +17,7 @@ namespace SecondBotEvents.Config settings.Add("AtHomeSeekLocation"); settings.Add("AtBackupSeekLocation"); settings.Add("AtHomeAutoSitUuid"); + settings.Add("HideStatusOutput"); } public string GetAtHomeAutoSitUuid() diff --git a/SecondBotEvents/Config/HttpConfig.cs b/SecondBotEvents/Config/HttpConfig.cs index 7089301..2d8b129 100644 --- a/SecondBotEvents/Config/HttpConfig.cs +++ b/SecondBotEvents/Config/HttpConfig.cs @@ -12,6 +12,7 @@ namespace SecondBotEvents.Config filename = "http"; settings.Add("Enabled"); settings.Add("Port"); + settings.Add("HideStatusOutput"); } public int GetPort() diff --git a/SecondBotEvents/Config/InteractionConfig.cs b/SecondBotEvents/Config/InteractionConfig.cs index 9b18c62..0f10f13 100644 --- a/SecondBotEvents/Config/InteractionConfig.cs +++ b/SecondBotEvents/Config/InteractionConfig.cs @@ -17,6 +17,7 @@ namespace SecondBotEvents.Config settings.Add("JsonOutputEventsTarget"); settings.Add("AcceptFriendRequests"); settings.Add("Enabled"); + settings.Add("HideStatusOutput"); } public bool GetEnabled() diff --git a/SecondBotEvents/Config/RelayConfig.cs b/SecondBotEvents/Config/RelayConfig.cs index fdc7c9a..7a6d390 100644 --- a/SecondBotEvents/Config/RelayConfig.cs +++ b/SecondBotEvents/Config/RelayConfig.cs @@ -12,6 +12,7 @@ namespace SecondBotEvents.Config { filename = "relay"; settings.Add("count"); + settings.Add("HideStatusOutput"); int loop = 1; while(loop <= GetRelayCount()) { diff --git a/SecondBotEvents/Config/config.cs b/SecondBotEvents/Config/config.cs index 490f171..26d53f2 100644 --- a/SecondBotEvents/Config/config.cs +++ b/SecondBotEvents/Config/config.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Reflection; +using System.Runtime; using System.Text; @@ -26,6 +27,11 @@ namespace SecondBotEvents.Config { mysettings["Enabled"] = enabled.ToString(); } + + public bool GetHideStatusOutput() + { + return ReadSettingAsBool("HideStatusOutput", false); + } public bool IsLoaded() { return loaded; diff --git a/SecondBotEvents/Services/CommandsService.cs b/SecondBotEvents/Services/CommandsService.cs index bee8780..d57f451 100644 --- a/SecondBotEvents/Services/CommandsService.cs +++ b/SecondBotEvents/Services/CommandsService.cs @@ -103,6 +103,14 @@ namespace SecondBotEvents.Services public override string Status() { + if(myConfig == null) + { + return "No Config"; + } + else if(myConfig.GetHideStatusOutput() == true) + { + return "hidden"; + } if (acceptNewCommands == false) { return "Disabled"; diff --git a/SecondBotEvents/Services/CustomCommandsService.cs b/SecondBotEvents/Services/CustomCommandsService.cs index d9c45e5..3771460 100644 --- a/SecondBotEvents/Services/CustomCommandsService.cs +++ b/SecondBotEvents/Services/CustomCommandsService.cs @@ -76,6 +76,10 @@ namespace SecondBotEvents.Services { return "Config broken"; } + else if (myConfig.GetHideStatusOutput() == true) + { + return "hidden"; + } else if (botConnected == false) { return "Waiting for client"; diff --git a/SecondBotEvents/Services/DataStoreService.cs b/SecondBotEvents/Services/DataStoreService.cs index 4356b3d..2467e01 100644 --- a/SecondBotEvents/Services/DataStoreService.cs +++ b/SecondBotEvents/Services/DataStoreService.cs @@ -80,6 +80,10 @@ namespace SecondBotEvents.Services { return "DataStore Service [Config broken]"; } + else if (myConfig.GetHideStatusOutput() == true) + { + return "hidden"; + } long unixtime = SecondbotHelpers.UnixTimeNow(); if (myConfig.GetAutoCleanKeyValueStore() == true) { diff --git a/SecondBotEvents/Services/DialogService.cs b/SecondBotEvents/Services/DialogService.cs index f553aa5..5330d29 100644 --- a/SecondBotEvents/Services/DialogService.cs +++ b/SecondBotEvents/Services/DialogService.cs @@ -46,7 +46,15 @@ namespace SecondBotEvents.Services } public override string Status() { - if(botConnected == false) + if (myConfig == null) + { + return "No Config"; + } + else if (myConfig.GetHideStatusOutput() == true) + { + return "hidden"; + } + if (botConnected == false) { return "Waiting for client"; } diff --git a/SecondBotEvents/Services/EventsService.cs b/SecondBotEvents/Services/EventsService.cs index aa2766a..611eca8 100644 --- a/SecondBotEvents/Services/EventsService.cs +++ b/SecondBotEvents/Services/EventsService.cs @@ -45,13 +45,17 @@ namespace SecondBotEvents.Services { if (myConfig == null) { - return "Config broken"; + return "No Config"; } - if (myConfig.GetEnabled() == false) + else if (myConfig.GetHideStatusOutput() == true) + { + return "hidden"; + } + else if (myConfig.GetEnabled() == false) { return "- Not requested -"; } - if (botConnected == false) + else if (botConnected == false) { return "Waiting for bot"; } diff --git a/SecondBotEvents/Services/HomeboundService.cs b/SecondBotEvents/Services/HomeboundService.cs index 1476c12..9dd5751 100644 --- a/SecondBotEvents/Services/HomeboundService.cs +++ b/SecondBotEvents/Services/HomeboundService.cs @@ -147,15 +147,19 @@ namespace SecondBotEvents.Services public override string Status() { - if(myConfig == null) + if (myConfig == null) { - return simNickname + "Config broken"; + return "No Config"; } - if(botConnected == false) + else if (myConfig.GetHideStatusOutput() == true) + { + return "hidden"; + } + else if (botConnected == false) { return simNickname + "No bot"; } - if(softDisable == false) + else if(softDisable == false) { Tick(); if(evacWanted == true) diff --git a/SecondBotEvents/Services/HttpService.cs b/SecondBotEvents/Services/HttpService.cs index cd0eedb..05d7089 100644 --- a/SecondBotEvents/Services/HttpService.cs +++ b/SecondBotEvents/Services/HttpService.cs @@ -36,17 +36,21 @@ namespace SecondBotEvents.Services { if (myConfig == null) { - return "Config broken"; + return "No Config"; } - if (myConfig.GetEnabled() == false) + else if (myConfig.GetHideStatusOutput() == true) + { + return "hidden"; + } + else if (myConfig.GetEnabled() == false) { return "- Not requested -"; } - if (HTTPendpoint == null) + else if (HTTPendpoint == null) { return "not online"; } - if (acceptBotCommands == false) + else if (acceptBotCommands == false) { return "Active ~ Service"; } diff --git a/SecondBotEvents/Services/InteractionService.cs b/SecondBotEvents/Services/InteractionService.cs index 4c970f3..fcbb555 100644 --- a/SecondBotEvents/Services/InteractionService.cs +++ b/SecondBotEvents/Services/InteractionService.cs @@ -24,15 +24,19 @@ namespace SecondBotEvents.Services public override string Status() { - if(myConfig == null) + if (myConfig == null) { - return "Config broken"; + return "No Config"; } - if (myConfig.GetEnabled() == false) + else if (myConfig.GetHideStatusOutput() == true) + { + return "hidden"; + } + else if (myConfig.GetEnabled() == false) { return "- Not requested -"; } - if (botConnected == false) + else if (botConnected == false) { return "Waiting for bot"; } diff --git a/SecondBotEvents/Services/RelayService.cs b/SecondBotEvents/Services/RelayService.cs index 655c9e7..9c8d2af 100644 --- a/SecondBotEvents/Services/RelayService.cs +++ b/SecondBotEvents/Services/RelayService.cs @@ -27,9 +27,13 @@ namespace SecondBotEvents.Services { if (myConfig == null) { - return "Config broken"; + return "No Config"; } - if (botConnected == false) + else if (myConfig.GetHideStatusOutput() == true) + { + return "hidden"; + } + else if (botConnected == false) { return "Waiting for bot"; }