diff --git a/Assembly/ASMInfo.cs b/Assembly/ASMInfo.cs index 784230b..1f083ff 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.012")] +[assembly: AssemblyFileVersion("5.2.013")] [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.012"; + public static string BotVer = "5.2.013"; public static string GitPassword { get diff --git a/Program.cs b/Program.cs index e90ec3f..60b832f 100644 --- a/Program.cs +++ b/Program.cs @@ -278,20 +278,28 @@ namespace Bot FileInfo[] files = new DirectoryInfo(Directory.GetCurrentDirectory()).GetFiles(); foreach(FileInfo fi in files) { - if(fi.Extension.ToLower() == ".dll") + try { - PluginActivator PA = new PluginActivator(); - Assembly asm = PA.LoadLibrary(fi.FullName); - List plugins = PA.Activate(asm); - foreach(IProgram prog in plugins) + + if (fi.Extension.ToLower() == ".dll") { - try + PluginActivator PA = new PluginActivator(); + Assembly asm = PA.LoadLibrary(fi.FullName); + List plugins = PA.Activate(asm); + foreach (IProgram prog in plugins) { - Console.WriteLine("Plugin [" + prog.ProgramName + "] found (" + fi.FullName + ") loaded and activated"); - prog.run(client, MH, CommandRegistry.Instance); - g_ZPrograms.Add(prog); - }catch(Exception e) { } + try + { + Console.WriteLine("Plugin [" + prog.ProgramName + "] found (" + fi.FullName + ") loaded and activated"); + prog.run(client, MH, CommandRegistry.Instance); + g_ZPrograms.Add(prog); + } + catch (Exception e) { } + } } + }catch(Exception e) + { + Console.WriteLine("Could not load file: " + fi.FullName+" as a Bot Plugin"); } } List main = new PluginActivator().Activate(Assembly.GetExecutingAssembly());