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("EnforceTimeWindow");
|
||||||
settings.Add("TimeWindowSecs");
|
settings.Add("TimeWindowSecs");
|
||||||
settings.Add("Enabled");
|
settings.Add("Enabled");
|
||||||
|
settings.Add("HideStatusOutput");
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool GetEnabled()
|
public bool GetEnabled()
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ namespace SecondBotEvents.Config
|
||||||
{
|
{
|
||||||
filename = "customcommands";
|
filename = "customcommands";
|
||||||
settings.Add("count");
|
settings.Add("count");
|
||||||
|
settings.Add("HideStatusOutput");
|
||||||
int loop = 1;
|
int loop = 1;
|
||||||
while(loop <= GetCount())
|
while(loop <= GetCount())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ namespace SecondBotEvents.Config
|
||||||
settings.Add("AutoCleanKeyValueStore");
|
settings.Add("AutoCleanKeyValueStore");
|
||||||
settings.Add("CleanKeyValueStoreAfterMins");
|
settings.Add("CleanKeyValueStoreAfterMins");
|
||||||
settings.Add("CommandHistoryLimit");
|
settings.Add("CommandHistoryLimit");
|
||||||
|
settings.Add("HideStatusOutput");
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetCommandHistoryLimit()
|
public int GetCommandHistoryLimit()
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ namespace SecondBotEvents.Config
|
||||||
settings.Add("RelayAvatar");
|
settings.Add("RelayAvatar");
|
||||||
settings.Add("RelayObjectOwnerOnly");
|
settings.Add("RelayObjectOwnerOnly");
|
||||||
settings.Add("RelayHttpurl");
|
settings.Add("RelayHttpurl");
|
||||||
|
settings.Add("HideStatusOutput");
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetRelayHttpurl()
|
public string GetRelayHttpurl()
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ namespace SecondBotEvents.Config
|
||||||
settings.Add("ServerID");
|
settings.Add("ServerID");
|
||||||
settings.Add("ClientToken");
|
settings.Add("ClientToken");
|
||||||
settings.Add("AllowDiscordCommands");
|
settings.Add("AllowDiscordCommands");
|
||||||
|
settings.Add("HideStatusOutput");
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool GetEnabled()
|
public bool GetEnabled()
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ namespace SecondBotEvents.Config
|
||||||
settings.Add("OutputIMuuid");
|
settings.Add("OutputIMuuid");
|
||||||
settings.Add("OutputHttpURL");
|
settings.Add("OutputHttpURL");
|
||||||
settings.Add("OutputSecret");
|
settings.Add("OutputSecret");
|
||||||
|
settings.Add("HideStatusOutput");
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetOutputSecret()
|
public string GetOutputSecret()
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ namespace SecondBotEvents.Config
|
||||||
settings.Add("AtHomeSeekLocation");
|
settings.Add("AtHomeSeekLocation");
|
||||||
settings.Add("AtBackupSeekLocation");
|
settings.Add("AtBackupSeekLocation");
|
||||||
settings.Add("AtHomeAutoSitUuid");
|
settings.Add("AtHomeAutoSitUuid");
|
||||||
|
settings.Add("HideStatusOutput");
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetAtHomeAutoSitUuid()
|
public string GetAtHomeAutoSitUuid()
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ namespace SecondBotEvents.Config
|
||||||
filename = "http";
|
filename = "http";
|
||||||
settings.Add("Enabled");
|
settings.Add("Enabled");
|
||||||
settings.Add("Port");
|
settings.Add("Port");
|
||||||
|
settings.Add("HideStatusOutput");
|
||||||
}
|
}
|
||||||
|
|
||||||
public int GetPort()
|
public int GetPort()
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@ namespace SecondBotEvents.Config
|
||||||
settings.Add("JsonOutputEventsTarget");
|
settings.Add("JsonOutputEventsTarget");
|
||||||
settings.Add("AcceptFriendRequests");
|
settings.Add("AcceptFriendRequests");
|
||||||
settings.Add("Enabled");
|
settings.Add("Enabled");
|
||||||
|
settings.Add("HideStatusOutput");
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool GetEnabled()
|
public bool GetEnabled()
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ namespace SecondBotEvents.Config
|
||||||
{
|
{
|
||||||
filename = "relay";
|
filename = "relay";
|
||||||
settings.Add("count");
|
settings.Add("count");
|
||||||
|
settings.Add("HideStatusOutput");
|
||||||
int loop = 1;
|
int loop = 1;
|
||||||
while(loop <= GetRelayCount())
|
while(loop <= GetRelayCount())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Runtime;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -26,6 +27,11 @@ namespace SecondBotEvents.Config
|
||||||
{
|
{
|
||||||
mysettings["Enabled"] = enabled.ToString();
|
mysettings["Enabled"] = enabled.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool GetHideStatusOutput()
|
||||||
|
{
|
||||||
|
return ReadSettingAsBool("HideStatusOutput", false);
|
||||||
|
}
|
||||||
public bool IsLoaded()
|
public bool IsLoaded()
|
||||||
{
|
{
|
||||||
return loaded;
|
return loaded;
|
||||||
|
|
|
||||||
|
|
@ -103,6 +103,14 @@ namespace SecondBotEvents.Services
|
||||||
|
|
||||||
public override string Status()
|
public override string Status()
|
||||||
{
|
{
|
||||||
|
if(myConfig == null)
|
||||||
|
{
|
||||||
|
return "No Config";
|
||||||
|
}
|
||||||
|
else if(myConfig.GetHideStatusOutput() == true)
|
||||||
|
{
|
||||||
|
return "hidden";
|
||||||
|
}
|
||||||
if (acceptNewCommands == false)
|
if (acceptNewCommands == false)
|
||||||
{
|
{
|
||||||
return "Disabled";
|
return "Disabled";
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,10 @@ namespace SecondBotEvents.Services
|
||||||
{
|
{
|
||||||
return "Config broken";
|
return "Config broken";
|
||||||
}
|
}
|
||||||
|
else if (myConfig.GetHideStatusOutput() == true)
|
||||||
|
{
|
||||||
|
return "hidden";
|
||||||
|
}
|
||||||
else if (botConnected == false)
|
else if (botConnected == false)
|
||||||
{
|
{
|
||||||
return "Waiting for client";
|
return "Waiting for client";
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,10 @@ namespace SecondBotEvents.Services
|
||||||
{
|
{
|
||||||
return "DataStore Service [Config broken]";
|
return "DataStore Service [Config broken]";
|
||||||
}
|
}
|
||||||
|
else if (myConfig.GetHideStatusOutput() == true)
|
||||||
|
{
|
||||||
|
return "hidden";
|
||||||
|
}
|
||||||
long unixtime = SecondbotHelpers.UnixTimeNow();
|
long unixtime = SecondbotHelpers.UnixTimeNow();
|
||||||
if (myConfig.GetAutoCleanKeyValueStore() == true)
|
if (myConfig.GetAutoCleanKeyValueStore() == true)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,15 @@ namespace SecondBotEvents.Services
|
||||||
}
|
}
|
||||||
public override string Status()
|
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";
|
return "Waiting for client";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,13 +45,17 @@ namespace SecondBotEvents.Services
|
||||||
{
|
{
|
||||||
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 -";
|
return "- Not requested -";
|
||||||
}
|
}
|
||||||
if (botConnected == false)
|
else if (botConnected == false)
|
||||||
{
|
{
|
||||||
return "Waiting for bot";
|
return "Waiting for bot";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -147,15 +147,19 @@ namespace SecondBotEvents.Services
|
||||||
|
|
||||||
public override string Status()
|
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";
|
return simNickname + "No bot";
|
||||||
}
|
}
|
||||||
if(softDisable == false)
|
else if(softDisable == false)
|
||||||
{
|
{
|
||||||
Tick();
|
Tick();
|
||||||
if(evacWanted == true)
|
if(evacWanted == true)
|
||||||
|
|
|
||||||
|
|
@ -36,17 +36,21 @@ namespace SecondBotEvents.Services
|
||||||
{
|
{
|
||||||
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 -";
|
return "- Not requested -";
|
||||||
}
|
}
|
||||||
if (HTTPendpoint == null)
|
else if (HTTPendpoint == null)
|
||||||
{
|
{
|
||||||
return "not online";
|
return "not online";
|
||||||
}
|
}
|
||||||
if (acceptBotCommands == false)
|
else if (acceptBotCommands == false)
|
||||||
{
|
{
|
||||||
return "Active ~ Service";
|
return "Active ~ Service";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,15 +24,19 @@ namespace SecondBotEvents.Services
|
||||||
|
|
||||||
public override string Status()
|
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 -";
|
return "- Not requested -";
|
||||||
}
|
}
|
||||||
if (botConnected == false)
|
else if (botConnected == false)
|
||||||
{
|
{
|
||||||
return "Waiting for bot";
|
return "Waiting for bot";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,13 @@ namespace SecondBotEvents.Services
|
||||||
{
|
{
|
||||||
if (myConfig == null)
|
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";
|
return "Waiting for bot";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue