wiki make updates
This commit is contained in:
parent
4856298691
commit
ced3a54bdb
6 changed files with 19 additions and 14 deletions
|
|
@ -36,7 +36,7 @@ namespace BetterSecondBotShared.API
|
|||
}
|
||||
return null;
|
||||
}
|
||||
protected virtual void LoadCommandsList()
|
||||
protected virtual void LoadCommandsList(bool wikimode)
|
||||
{
|
||||
foreach (var com in GetAPICommandClasses())
|
||||
{
|
||||
|
|
@ -47,7 +47,12 @@ namespace BetterSecondBotShared.API
|
|||
API_interface D = (API_interface)Activator.CreateInstance(com);
|
||||
if (D != null)
|
||||
{
|
||||
if (subtype_map.ContainsKey(D.CommandNameLower) == false)
|
||||
string name = D.CommandNameLower;
|
||||
if(wikimode == true)
|
||||
{
|
||||
name = D.CommandName;
|
||||
}
|
||||
if (subtype_map.ContainsKey(name) == false)
|
||||
{
|
||||
string worknamespace = com.Namespace;
|
||||
worknamespace = worknamespace.Replace("BSB.Commands.", "");
|
||||
|
|
@ -57,8 +62,8 @@ namespace BetterSecondBotShared.API
|
|||
worknamespace = worknamespace.Replace("BetterSecondBot.HttpServer.Control.", "");
|
||||
worknamespace = worknamespace.Replace("BetterSecondBot.HttpServer.control.", "");
|
||||
worknamespace = worknamespace.Replace("CMD_", "");
|
||||
subtype_map.Add(D.CommandNameLower, D.GetType());
|
||||
subtype_workspace_map.Add(D.CommandNameLower, worknamespace);
|
||||
subtype_map.Add(name, D.GetType());
|
||||
subtype_workspace_map.Add(name, worknamespace);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -102,7 +107,7 @@ namespace BetterSecondBotShared.API
|
|||
{
|
||||
if (subtype_map.Count() == 0)
|
||||
{
|
||||
LoadCommandsList();
|
||||
LoadCommandsList(false);
|
||||
}
|
||||
return subtype_map.ContainsKey(command);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -289,12 +289,12 @@ namespace BetterSecondBot.WikiMake
|
|||
InterfaceWiki("JSON", defaultJson);
|
||||
|
||||
// CMD
|
||||
BSB.Commands.CoreCommandsInterface cmd = new BSB.Commands.CoreCommandsInterface(null);
|
||||
BSB.Commands.CoreCommandsInterface cmd = new BSB.Commands.CoreCommandsInterface(null,true);
|
||||
api_reports.Add("Core", new KeyValuePair<int, string>(cmd.ApiCommandsCount, "Good"));
|
||||
InterfaceWiki("Core", cmd, true);
|
||||
|
||||
// RLVapi
|
||||
BSB.RLV.RLVcontrol RLVapi = new BSB.RLV.RLVcontrol(null);
|
||||
BSB.RLV.RLVcontrol RLVapi = new BSB.RLV.RLVcontrol(null,true);
|
||||
api_reports.Add("RLVapi", new KeyValuePair<int, string>(RLVapi.ApiCommandsCount, "Limited"));
|
||||
InterfaceWiki("RLVapi", RLVapi, true);
|
||||
|
||||
|
|
|
|||
|
|
@ -125,11 +125,11 @@ namespace BSB.Commands
|
|||
}
|
||||
}
|
||||
|
||||
public CoreCommandsInterface(CommandsBot linktobot)
|
||||
public CoreCommandsInterface(CommandsBot linktobot, bool wikimode)
|
||||
{
|
||||
bot = linktobot;
|
||||
API_type = typeof(CoreCommand);
|
||||
LoadCommandsList();
|
||||
LoadCommandsList(wikimode);
|
||||
}
|
||||
protected HttpClient HTTPclient = new HttpClient();
|
||||
|
||||
|
|
|
|||
|
|
@ -21,11 +21,11 @@ namespace BSB.RLV
|
|||
last_caller_uuid = callerUUID;
|
||||
}
|
||||
|
||||
public RLVcontrol(RLVbot linktobot)
|
||||
public RLVcontrol(RLVbot linktobot, bool wikimode)
|
||||
{
|
||||
bot = linktobot;
|
||||
API_type = typeof(RLV_command);
|
||||
LoadCommandsList();
|
||||
LoadCommandsList(wikimode);
|
||||
}
|
||||
|
||||
protected List<string> suppress_warning = new List<string>();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace BSB.bottypes
|
|||
{
|
||||
protected CommandsBot()
|
||||
{
|
||||
CommandsInterface = new Commands.CoreCommandsInterface(this);
|
||||
CommandsInterface = new Commands.CoreCommandsInterface(this,false);
|
||||
}
|
||||
|
||||
protected List<string> CommandHistory = new List<string>();
|
||||
|
|
@ -194,7 +194,7 @@ namespace BSB.bottypes
|
|||
{
|
||||
if (reconnect == false)
|
||||
{
|
||||
CommandsInterface = new Commands.CoreCommandsInterface(this);
|
||||
CommandsInterface = new Commands.CoreCommandsInterface(this,false);
|
||||
}
|
||||
Client.Self.RequestBalance();
|
||||
base.AfterBotLoginHandler();
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace BSB.bottypes
|
|||
if (myconfig.Setting_AllowRLV == true)
|
||||
{
|
||||
Info("RLV: Enabled");
|
||||
RLVinterface = new RLV.RLVcontrol(this);
|
||||
RLVinterface = new RLV.RLVcontrol(this,false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue