Finish implementation of configuable command permissions

This commit is contained in:
RaidMax
2020-01-31 20:15:07 -06:00
parent 11ae91281f
commit 318a23ae5b
38 changed files with 373 additions and 213 deletions

View File

@ -12,5 +12,6 @@ namespace SharedLibraryCore.Interfaces
void Build();
T Configuration();
void Set(T config);
string FileName { get; }
}
}

View File

@ -17,7 +17,7 @@ namespace SharedLibraryCore.Interfaces
void Restart();
ILogger GetLogger(long serverId);
IList<Server> GetServers();
IList<Command> GetCommands();
IList<IManagerCommand> GetCommands();
IList<Helpers.MessageToken> GetMessageTokens();
IList<EFClient> GetActiveClients();
IConfigurationHandler<ApplicationConfiguration> GetApplicationSettings();

View File

@ -34,5 +34,15 @@ namespace SharedLibraryCore.Interfaces
/// Minimum permission required to execute the command
/// </summary>
Permission Permission { get; }
/// <summary>
/// Syntax for using the command
/// </summary>
string Syntax { get; }
/// <summary>
/// Indicates if target is required
/// </summary>
bool RequiresTarget { get; }
}
}

View File

@ -0,0 +1,37 @@
using System;
using System.Collections.Generic;
using System.Reflection;
namespace SharedLibraryCore.Interfaces
{
/// <summary>
/// Defines the capabilities of the plugin importer
/// </summary>
public interface IPluginImporter
{
/// <summary>
/// Command types that are defined in plugin assemblies
/// </summary>
IList<Type> CommandTypes { get; }
/// <summary>
/// The loaded plugins from plugin assemblies
/// </summary>
IList<IPlugin> ActivePlugins { get; }
/// <summary>
/// Assemblies that contain plugins
/// </summary>
IList<Assembly> PluginAssemblies { get; }
/// <summary>
/// All assemblies in the plugin folder
/// </summary>
IList<Assembly> Assemblies { get; }
/// <summary>
/// Loads in plugin assemblies and script plugins
/// </summary>
void Load();
}
}