From ec53b14ec090f1bb9d0ee10dabc309570769956b Mon Sep 17 00:00:00 2001 From: Zontreck Date: Mon, 15 Jun 2020 20:43:10 -0700 Subject: [PATCH] Fix the !!help command. Add configuration attribute to specify hostname --- Assembly/ASMInfo.cs | 4 ++-- CommandSystem/BaseHooks.cs | 2 +- ConfigSystem/MainConfiguration.cs | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Assembly/ASMInfo.cs b/Assembly/ASMInfo.cs index 05e7250..970874f 100644 --- a/Assembly/ASMInfo.cs +++ b/Assembly/ASMInfo.cs @@ -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.949")] +[assembly: AssemblyFileVersion("5.1.950")] [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.949"; + public static string BotVer = "5.1.950"; public static string GitPassword { get diff --git a/CommandSystem/BaseHooks.cs b/CommandSystem/BaseHooks.cs index 21c2166..7333957 100644 --- a/CommandSystem/BaseHooks.cs +++ b/CommandSystem/BaseHooks.cs @@ -136,7 +136,7 @@ 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://zontreck.dev:35591/help"); + MHE(source, client, $"All commands viewable at: https://{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)] diff --git a/ConfigSystem/MainConfiguration.cs b/ConfigSystem/MainConfiguration.cs index fb804f1..cdfcac5 100644 --- a/ConfigSystem/MainConfiguration.cs +++ b/ConfigSystem/MainConfiguration.cs @@ -60,6 +60,7 @@ namespace Bot public double AutoRelogAfterHours = 12; public int WebServerPort { get; set; } = 35591; + public string WebServerIP { get; set; } = "zontreck.dev"; public Dictionary BotAdmins { get; set; } = new Dictionary();