using System;
using System.Collections.Generic;

namespace MeidoCommon
{
    public interface IMeidoHook
    {
        string Name { get; }
        string Version { get; }
        Dictionary<string, string> Help { get; }

        string Prefix { set; }
    }

    public interface IIrcMessage
    {
        string Message { get; }
        string[] MessageArray { get; }
        string Channel { get; }
        string Nick { get; }
        string Ident { get; }
        string Host { get; }
    }

    public interface IMeidoComm
    {
        string ConfDir { get; }
    }

    public interface IIrcComm
    {
        void AddChannelMessageHandler(Action<IIrcMessage> handler);
        void AddQueryMessageHandler(Action<IIrcMessage> handler);

        void SendMessage(string target, string message);
        void DoAction(string target, string action);
        void SendNotice(string target, string message);

        string[] GetChannels();
        bool IsMe(string nick);
    }
}
using System;
using System.Collections.Generic;

namespace MeidoCommon
{
    public interface IMeidoHook
    {
        // Things the plugin provides us with.
        string Name { get; }
        string Version { get; }
        Dictionary<string, string> Help { get; }

        // Things we provide to the plugin.
        string Prefix { set; }

        // Method to signal to the plugins they need to stop whatever seperate threads they have running.
        // As well as to save/deserialize whatever it needs to.
        void Stop();
    }

    public interface IIrcMessage
    {
        string Message { get; }
        string[] MessageArray { get; }
        string Channel { get; }
        string Nick { get; }
        string Ident { get; }
        string Host { get; }
    }

    public interface IMeidoComm
    {
        string ConfDir { get; }
    }

    public interface IIrcComm
    {
        void AddChannelMessageHandler(Action<IIrcMessage> handler);
        void AddQueryMessageHandler(Action<IIrcMessage> handler);

        void SendMessage(string target, string message);
        void DoAction(string target, string action);
        void SendNotice(string target, string message);

        string[] GetChannels();
        bool IsMe(string nick);
    }
}
Modify the MeidoHook interface to allow communicating to the plugins they need to stop. That way they can release whatever resources they're holding or stop threads/timers to have running seperate from the main thread. This will make it possible to have MeidoBot stop the entire program from top-down.
Modify the MeidoHook interface to allow communicating to the plugins they need to stop.
That way they can release whatever resources they're holding or stop threads/timers to have running seperate from the main
thread.
This will make it possible to have MeidoBot stop the entire program from top-down.
