From 456084438369561626828cf305918979030e2920 Mon Sep 17 00:00:00 2001 From: Zontreck Date: Sun, 21 Jun 2020 01:22:13 -0700 Subject: [PATCH] Remove double trigger on web listener --- Assembly/ASMInfo.cs | 4 ++-- Program.cs | 20 ++++++++++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/Assembly/ASMInfo.cs b/Assembly/ASMInfo.cs index 7d4d8b1..c34160d 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.2.015")] +[assembly: AssemblyFileVersion("5.2.016")] [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.2.015"; + public static string BotVer = "5.2.016"; public static string GitPassword { get diff --git a/Program.cs b/Program.cs index 1de71f5..3563a5b 100644 --- a/Program.cs +++ b/Program.cs @@ -290,9 +290,13 @@ namespace Bot { try { - Console.WriteLine("Plugin [" + prog.ProgramName + "] found (" + fi.FullName + ") loaded and activated"); - prog.run(client, MH, CommandRegistry.Instance); - g_ZPrograms.Add(prog); + if (!g_ZPrograms.Contains(prog)) + { + + Console.WriteLine("Plugin [" + prog.ProgramName + "] found (" + fi.FullName + ") loaded and activated"); + prog.run(client, MH, CommandRegistry.Instance); + g_ZPrograms.Add(prog); + } } catch (Exception e) { } } @@ -307,9 +311,13 @@ namespace Bot { try { - Console.WriteLine("Plugin [" + prog.ProgramName + "] found (" + Assembly.GetExecutingAssembly().FullName + ") loaded and activated"); - prog.run(client, MH, CommandRegistry.Instance); - g_ZPrograms.Add(prog); + if (!g_ZPrograms.Contains(prog)) + { + + Console.WriteLine("Plugin [" + prog.ProgramName + "] found (" + Assembly.GetExecutingAssembly().FullName + ") loaded and activated"); + prog.run(client, MH, CommandRegistry.Instance); + g_ZPrograms.Add(prog); + } } catch (Exception e) { } }