mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-09 23:00:57 -05:00
added top player stats
fix for some commands returning multiple matches found when target not required
This commit is contained in:
@ -4,6 +4,7 @@ using System.Threading.Tasks;
|
||||
using SharedLibraryCore.Objects;
|
||||
using SharedLibraryCore.Services;
|
||||
using SharedLibraryCore.Configuration;
|
||||
using System.Reflection;
|
||||
|
||||
namespace SharedLibraryCore.Interfaces
|
||||
{
|
||||
@ -33,5 +34,6 @@ namespace SharedLibraryCore.Interfaces
|
||||
/// </summary>
|
||||
void SetHasEvent();
|
||||
bool ShutdownRequested();
|
||||
IList<Assembly> GetPluginAssemblies();
|
||||
}
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ namespace SharedLibraryCore.Plugins
|
||||
{
|
||||
public static List<Command> ActiveCommands = new List<Command>();
|
||||
public static List<IPlugin> ActivePlugins = new List<IPlugin>();
|
||||
public static List<Assembly> PluginAssemblies = new List<Assembly>();
|
||||
|
||||
public static bool Load(IManager Manager)
|
||||
{
|
||||
@ -24,7 +25,7 @@ namespace SharedLibraryCore.Plugins
|
||||
ICollection<Assembly> assemblies = new List<Assembly>(dllFileNames.Length);
|
||||
foreach (string dllFile in dllFileNames)
|
||||
{
|
||||
// byte[] rawDLL = File.ReadAllBytes(dllFile);
|
||||
// byte[] rawDLL = File.ReadAllBytes(dllFile);
|
||||
//Assembly assembly = Assembly.Load(rawDLL);
|
||||
assemblies.Add(Assembly.LoadFrom(dllFile));
|
||||
}
|
||||
@ -58,6 +59,7 @@ namespace SharedLibraryCore.Plugins
|
||||
if (ActivePlugins.Find(x => x.Name == newNotify.Name) == null)
|
||||
{
|
||||
ActivePlugins.Add(newNotify);
|
||||
PluginAssemblies.Add(Plugin);
|
||||
Manager.GetLogger().WriteDebug($"Loaded plugin \"{ newNotify.Name }\" [{newNotify.Version}]");
|
||||
LoadedPlugins++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user