Try to fix double loading
This commit is contained in:
parent
26bd15fa27
commit
5e9c8cfc89
3 changed files with 3 additions and 17 deletions
|
@ -6,7 +6,7 @@ using System.Reflection;
|
||||||
[assembly: AssemblyCompany("ZNI")]
|
[assembly: AssemblyCompany("ZNI")]
|
||||||
[assembly: AssemblyAlgorithmId(System.Configuration.Assemblies.AssemblyHashAlgorithm.MD5)]
|
[assembly: AssemblyAlgorithmId(System.Configuration.Assemblies.AssemblyHashAlgorithm.MD5)]
|
||||||
[assembly: AssemblyCopyright("© 2020 Tara Piccari")]
|
[assembly: AssemblyCopyright("© 2020 Tara Piccari")]
|
||||||
[assembly: AssemblyFileVersion("5.2.016")]
|
[assembly: AssemblyFileVersion("5.2.017")]
|
||||||
[assembly: AssemblyDescription("Second Life Bot - BotCore5")]
|
[assembly: AssemblyDescription("Second Life Bot - BotCore5")]
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ namespace Bot.Assemble
|
||||||
public class ASMInfo
|
public class ASMInfo
|
||||||
{
|
{
|
||||||
public static string BotName = "ZBotCore";
|
public static string BotName = "ZBotCore";
|
||||||
public static string BotVer = "5.2.016";
|
public static string BotVer = "5.2.017";
|
||||||
public static string GitPassword
|
public static string GitPassword
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
15
Program.cs
15
Program.cs
|
@ -306,21 +306,6 @@ namespace Bot
|
||||||
Console.WriteLine("Could not load file: " + fi.FullName+" as a Bot Plugin");
|
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();
|
CommandRegistry.Instance.LocateCommands();
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ namespace Bot.WebHookServer
|
||||||
}
|
}
|
||||||
public void run(GridClient client, MessageHandler MH, CommandRegistry registry)
|
public void run(GridClient client, MessageHandler MH, CommandRegistry registry)
|
||||||
{
|
{
|
||||||
|
if (listener != null) return;// Already had run triggered
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
listener = new HttpListener();
|
listener = new HttpListener();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue