Try to fix double loading
This commit is contained in:
parent
26bd15fa27
commit
5e9c8cfc89
3 changed files with 3 additions and 17 deletions
15
Program.cs
15
Program.cs
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue