Change bot code to include more debug in the command manager

This commit is contained in:
Zontreck 2020-06-14 11:06:08 -07:00
parent fe628b0a9d
commit fc583603d4
2 changed files with 7 additions and 4 deletions

View file

@ -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.932")]
[assembly: AssemblyFileVersion("5.1.949")]
[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.932";
public static string BotVer = "5.1.949";
public static string GitPassword
{
get

View file

@ -22,7 +22,7 @@ namespace Bot.CommandSystem
public GridClient cl;
public Logger Log = BotSession.Instance.Logger;
public string newReply;
public bool RunChatCommand(string cmdData, GridClient client, MessageHandler.MessageHandleEvent MHE, CommandRegistry registry)
public unsafe bool RunChatCommand(string cmdData, GridClient client, MessageHandler.MessageHandleEvent MHE, CommandRegistry registry)
{
register = registry;
Dictionary<UUID, int> BotAdmins = MainConfiguration.Instance.BotAdmins;
@ -152,7 +152,10 @@ namespace Bot.CommandSystem
{
string Msg = e.Message;
Msg = Msg.Replace("ZNI", "");
MHE(MessageHandler.Destinations.DEST_LOCAL, UUID.Zero, "Exception caught in OpenCollarBot.dll: [" + Msg + "]\n \n[STACK] " + e.StackTrace.Replace("ZNI", ""));
int i;
int* ptr = &i;
IntPtr addr = (IntPtr)ptr;
MHE(MessageHandler.Destinations.DEST_LOCAL, UUID.Zero, "Exception caught: [" + Msg + "]\n \n[STACK] " + e.StackTrace.Replace("ZNI", "")+"\nMemory Position: 0x"+addr.ToString("x")+"\nCommand: "+request+$"\nMisc Details: {fromID}, {userLevel}, {sourceLoc}, {agentKey}, {agentName}");
// do nothing here.
}
Log.info(log:"Leaving command parser");