HideStatusOutput support
This commit is contained in:
parent
db6772e909
commit
e5c6ced9b0
20 changed files with 78 additions and 18 deletions
|
|
@ -19,6 +19,7 @@ namespace SecondBotEvents.Config
|
|||
settings.Add("EnforceTimeWindow");
|
||||
settings.Add("TimeWindowSecs");
|
||||
settings.Add("Enabled");
|
||||
settings.Add("HideStatusOutput");
|
||||
}
|
||||
|
||||
public bool GetEnabled()
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ namespace SecondBotEvents.Config
|
|||
{
|
||||
filename = "customcommands";
|
||||
settings.Add("count");
|
||||
settings.Add("HideStatusOutput");
|
||||
int loop = 1;
|
||||
while(loop <= GetCount())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ namespace SecondBotEvents.Config
|
|||
settings.Add("AutoCleanKeyValueStore");
|
||||
settings.Add("CleanKeyValueStoreAfterMins");
|
||||
settings.Add("CommandHistoryLimit");
|
||||
settings.Add("HideStatusOutput");
|
||||
}
|
||||
|
||||
public int GetCommandHistoryLimit()
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ namespace SecondBotEvents.Config
|
|||
settings.Add("RelayAvatar");
|
||||
settings.Add("RelayObjectOwnerOnly");
|
||||
settings.Add("RelayHttpurl");
|
||||
settings.Add("HideStatusOutput");
|
||||
}
|
||||
|
||||
public string GetRelayHttpurl()
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ namespace SecondBotEvents.Config
|
|||
settings.Add("ServerID");
|
||||
settings.Add("ClientToken");
|
||||
settings.Add("AllowDiscordCommands");
|
||||
settings.Add("HideStatusOutput");
|
||||
}
|
||||
|
||||
public bool GetEnabled()
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ namespace SecondBotEvents.Config
|
|||
settings.Add("OutputIMuuid");
|
||||
settings.Add("OutputHttpURL");
|
||||
settings.Add("OutputSecret");
|
||||
settings.Add("HideStatusOutput");
|
||||
}
|
||||
|
||||
public string GetOutputSecret()
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ namespace SecondBotEvents.Config
|
|||
settings.Add("AtHomeSeekLocation");
|
||||
settings.Add("AtBackupSeekLocation");
|
||||
settings.Add("AtHomeAutoSitUuid");
|
||||
settings.Add("HideStatusOutput");
|
||||
}
|
||||
|
||||
public string GetAtHomeAutoSitUuid()
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ namespace SecondBotEvents.Config
|
|||
filename = "http";
|
||||
settings.Add("Enabled");
|
||||
settings.Add("Port");
|
||||
settings.Add("HideStatusOutput");
|
||||
}
|
||||
|
||||
public int GetPort()
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ namespace SecondBotEvents.Config
|
|||
settings.Add("JsonOutputEventsTarget");
|
||||
settings.Add("AcceptFriendRequests");
|
||||
settings.Add("Enabled");
|
||||
settings.Add("HideStatusOutput");
|
||||
}
|
||||
|
||||
public bool GetEnabled()
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ namespace SecondBotEvents.Config
|
|||
{
|
||||
filename = "relay";
|
||||
settings.Add("count");
|
||||
settings.Add("HideStatusOutput");
|
||||
int loop = 1;
|
||||
while(loop <= GetRelayCount())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue