Try to fix double loading

This commit is contained in:
Zontreck 2020-06-21 01:36:27 -07:00
parent 26bd15fa27
commit 5e9c8cfc89
3 changed files with 3 additions and 17 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.2.016")]
[assembly: AssemblyFileVersion("5.2.017")]
[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.016";
public static string BotVer = "5.2.017";
public static string GitPassword
{
get

View file

@ -306,21 +306,6 @@ namespace Bot
Console.WriteLine("Could not load file: " + fi.FullName+" as a Bot Plugin");
}
}
List<IProgram> main = new PluginActivator().Activate(Assembly.GetExecutingAssembly());
foreach (IProgram prog in main)
{
try
{
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) { }
}
CommandRegistry.Instance.LocateCommands();

View file

@ -57,6 +57,7 @@ namespace Bot.WebHookServer
}
public void run(GridClient client, MessageHandler MH, CommandRegistry registry)
{
if (listener != null) return;// Already had run triggered
try
{
listener = new HttpListener();