Revise the message handler system, and partially the command system

This commit is contained in:
Zontreck 2020-06-28 03:27:04 -07:00
parent 57dcc685df
commit 59c62e62e2
19 changed files with 350 additions and 209 deletions

View file

@ -10,7 +10,7 @@ namespace Bot.NonCommands
/// <summary>
/// Defaults to all except action
/// </summary>
public MessageHandler.Destinations SourceType = MessageHandler.Destinations.DEST_AGENT | MessageHandler.Destinations.DEST_CONSOLE_INFO | MessageHandler.Destinations.DEST_DISCORD | MessageHandler.Destinations.DEST_GROUP | MessageHandler.Destinations.DEST_LOCAL;
public Destinations SourceType = Destinations.DEST_AGENT | Destinations.DEST_DISCORD | Destinations.DEST_GROUP | Destinations.DEST_LOCAL;
public NotCommand()
{
// Not Command, this just marks a class

View file

@ -9,6 +9,6 @@ namespace Bot.NonCommands
{
public interface nCMD
{
public void handle(string text, UUID User, string agentName, MessageHandler.Destinations src, UUID originator);
public void handle(string text, UUID User, string agentName, Destinations src, UUID originator);
}
}

View file

@ -10,7 +10,7 @@ namespace Bot.NonCommands
{
public class nRegistry
{
public static void Dispatch(string request, UUID agentKey, string agentName, MessageHandler.Destinations sourceLoc, UUID originator)
public static void Dispatch(string request, UUID agentKey, string agentName, Destinations sourceLoc, UUID originator)
{
foreach(Assembly a in AppDomain.CurrentDomain.GetAssemblies())