Attempt 2 to fix the out of bounds issue

This commit is contained in:
Zontreck 2020-08-18 16:11:14 -07:00
parent 54ef1b63cb
commit 5fa506e01b
3 changed files with 30 additions and 3 deletions

View file

@ -6,7 +6,7 @@ using System.Reflection;
[assembly: AssemblyCompany("ZNI")]
[assembly: AssemblyAlgorithmId(System.Configuration.Assemblies.AssemblyHashAlgorithm.MD5)]
[assembly: AssemblyCopyright("(C) 2020 Tara Piccari")]
[assembly: AssemblyFileVersion("5.4.396")]
[assembly: AssemblyFileVersion("5.4.397")]
[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.4.396";
public static string BotVer = "5.4.397";
public static string GitPassword
{
get

View file

@ -222,7 +222,7 @@ namespace Bot.CommandSystem
var ovj = Activator.CreateInstance(cg.AssignedMethod.DeclaringType);
List<string> lArgs = new List<string>();
for(int i=1; i<= cmdStruct.Length; i++)
for(int i=1; i < cmdStruct.Length; i++)
{
lArgs.Add(cmdStruct[i]);
}

View file

@ -0,0 +1,27 @@
using Bot.CommandSystem;
using OpenMetaverse;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
namespace Bot.WebHookServer
{
class NewVersionWatcher
{
[WebhookAttribs("/NewVersionAvailable", HTTPMethod = "POST")]
public WebhookRegistry.HTTPResponseData a_new_version_is_available(List<string> args, string body, string method, NameValueCollection headers)
{
WebhookRegistry.HTTPResponseData hrd = new WebhookRegistry.HTTPResponseData();
hrd.ReplyString = "OK";
hrd.ReturnContentType = "text/plain";
hrd.Status = 200;
BaseCommands.MH(Destinations.DEST_LOCAL, UUID.Zero, "Alert: A new version is available. Restart required");
BotSession.Instance.EnqueueExit = true;
return hrd;
}
}
}