Modify some features
This commit is contained in:
parent
ec53b14ec0
commit
7637140aad
6 changed files with 20 additions and 5 deletions
|
@ -6,7 +6,7 @@ using System.Reflection;
|
|||
[assembly: AssemblyCompany("ZNI")]
|
||||
[assembly: AssemblyAlgorithmId(System.Configuration.Assemblies.AssemblyHashAlgorithm.MD5)]
|
||||
[assembly: AssemblyCopyright("© 2020 Tara Piccari")]
|
||||
[assembly: AssemblyFileVersion("5.1.950")]
|
||||
[assembly: AssemblyFileVersion("5.1.960")]
|
||||
[assembly: AssemblyDescription("Second Life Bot - BotCore5")]
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@ namespace Bot.Assemble
|
|||
public class ASMInfo
|
||||
{
|
||||
public static string BotName = "ZBotCore";
|
||||
public static string BotVer = "5.1.950";
|
||||
public static string BotVer = "5.1.960";
|
||||
public static string GitPassword
|
||||
{
|
||||
get
|
||||
|
|
|
@ -46,5 +46,6 @@ namespace Bot
|
|||
|
||||
|
||||
public DateTime LaunchTime { get; set; } = DateTime.Now;
|
||||
public bool WaitForFiveMinutes = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -136,7 +136,10 @@ namespace Bot.CommandSystem
|
|||
[CommandGroup("bot.help", 0, 0, "Alias to !help", MessageHandler.Destinations.DEST_AGENT | MessageHandler.Destinations.DEST_LOCAL | MessageHandler.Destinations.DEST_GROUP)]
|
||||
public void PrintAllHelp(UUID client, int level, GridClient grid, string[] additionalArgs, MessageHandler.MessageHandleEvent MHE, MessageHandler.Destinations source, CommandRegistry registry, UUID agentKey, string agentName)
|
||||
{
|
||||
MHE(source, client, $"All commands viewable at: https://{MainConfiguration.Instance.WebServerIP}:{MainConfiguration.Instance.WebServerPort}/help");
|
||||
if (MainConfiguration.Instance.UseSSL)
|
||||
MHE(source, client, $"All commands viewable at: https://{MainConfiguration.Instance.WebServerIP}:{MainConfiguration.Instance.WebServerPort}/help");
|
||||
else
|
||||
MHE(source, client, $"All commands viewable at: http://{MainConfiguration.Instance.WebServerIP}:{MainConfiguration.Instance.WebServerPort}/help");
|
||||
}
|
||||
// !help "command"
|
||||
[CommandGroup("help", 0, 1, "Prints help for one command", MessageHandler.Destinations.DEST_AGENT | MessageHandler.Destinations.DEST_LOCAL | MessageHandler.Destinations.DEST_GROUP | MessageHandler.Destinations.DEST_CONSOLE_INFO)]
|
||||
|
|
|
@ -62,6 +62,8 @@ namespace Bot
|
|||
public int WebServerPort { get; set; } = 35591;
|
||||
public string WebServerIP { get; set; } = "zontreck.dev";
|
||||
|
||||
public bool UseSSL { get; set; } = false;
|
||||
|
||||
public Dictionary<UUID, int> BotAdmins { get; set; } = new Dictionary<UUID, int>();
|
||||
|
||||
public List<string> AuthedGithubUsers { get; set; } = new List<string>();
|
||||
|
|
|
@ -277,7 +277,7 @@ namespace Bot
|
|||
prompter.Start();
|
||||
CM = new CommandManager(BotSession.Instance.Logger, client, MH.callbacks);
|
||||
|
||||
|
||||
MainConfiguration.Instance.Save(); // Flush the config, to update the file format
|
||||
|
||||
while (g_iIsRunning)
|
||||
{
|
||||
|
@ -576,6 +576,12 @@ namespace Bot
|
|||
client.Network.Logout();
|
||||
}
|
||||
while (client.Network.Connected) { }
|
||||
|
||||
if (BotSession.Instance.WaitForFiveMinutes)
|
||||
{
|
||||
AutoResetEvent are = new AutoResetEvent(false);
|
||||
are.WaitOne(TimeSpan.FromMinutes(5));
|
||||
}
|
||||
Environment.Exit(0);
|
||||
|
||||
//System.Console.WriteLine("PAUSING. PRESS ANY KEY TO EXIT");
|
||||
|
|
|
@ -59,7 +59,10 @@ namespace Bot.WebHookServer
|
|||
{
|
||||
listener = new HttpListener();
|
||||
MHEx = MH.callbacks;
|
||||
listener.Prefixes.Add($"https://*:{MainConfiguration.Instance.WebServerPort}/");
|
||||
if (MainConfiguration.Instance.UseSSL)
|
||||
listener.Prefixes.Add($"https://*:{MainConfiguration.Instance.WebServerPort}/");
|
||||
else
|
||||
listener.Prefixes.Add($"http://*:{MainConfiguration.Instance.WebServerPort}/");
|
||||
|
||||
listener.Start();
|
||||
var hc = new HookCmds();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue