ITGChatProvider => IChatProvider

Missed that one
This commit is contained in:
Cyberboss
2017-10-20 19:29:36 -04:00
parent abc899c121
commit 2568b786ff
6 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -23,12 +23,12 @@ namespace TGServerService.ChatCommands
/// </summary>
public string Speaker { get; set; }
/// <summary>
/// A reference to the <see cref="ServerInstance"/> that runs the <see cref="ChatProviders.ITGChatProvider"/> that heard the <see cref="ChatCommand"/>
/// A reference to the <see cref="ServerInstance"/> that runs the <see cref="ChatProviders.IChatProvider"/> that heard the <see cref="ChatCommand"/>
/// </summary>
public ServerInstance Server { get; set; }
}
/// <summary>
/// A command heard by a <see cref="ChatProviders.ITGChatProvider"/>
/// A command heard by a <see cref="ChatProviders.IChatProvider"/>
/// </summary>
abstract class ChatCommand : Command
{
@@ -13,11 +13,11 @@ namespace TGServerService.ChatProviders
/// <param name="isAdmin"><see langword="true"/> if <paramref name="speaker"/> is considered a chat admin, <see langword="false"/> otherwise</param>
/// <param name="isAdminChannel"><see langword="true"/> if <paramref name="channel"/> is an admin chat channel, <see langword="false"/> otherwise</param>
delegate void OnChatMessage(ITGChatProvider ChatProvider, string speaker, string channel, string message, bool isAdmin, bool isAdminChannel);
delegate void OnChatMessage(IChatProvider ChatProvider, string speaker, string channel, string message, bool isAdmin, bool isAdminChannel);
/// <summary>
/// Interface for a chat provder service
/// </summary>
interface ITGChatProvider : IDisposable
interface IChatProvider : IDisposable
{
/// <summary>
/// Sets <paramref name="info"/> for the provider
@@ -9,9 +9,9 @@ using TGServiceInterface;
namespace TGServerService.ChatProviders
{
/// <summary>
/// <see cref="ITGChatProvider"/> for Discord: https://discordapp.com/
/// <see cref="IChatProvider"/> for Discord: https://discordapp.com/
/// </summary>
sealed class DiscordChatProvider : ITGChatProvider
sealed class DiscordChatProvider : IChatProvider
{
/// <inheritdoc />
public event OnChatMessage OnChatMessage;
@@ -7,9 +7,9 @@ using Meebey.SmartIrc4net;
namespace TGServerService.ChatProviders
{
/// <summary>
/// <see cref="ITGChatProvider"/> for internet relay chat
/// <see cref="IChatProvider"/> for internet relay chat
/// </summary>
sealed class IRCChatProvider : ITGChatProvider
sealed class IRCChatProvider : IChatProvider
{
/// <summary>
/// Header used to mark that a channel is actually a query message
+5 -5
View File
@@ -12,11 +12,11 @@ namespace TGServerService
/// </summary>
ChatCommand = 100,
/// <summary>
/// Warning: When a <see cref="ChatProviders.ITGChatProvider"/> fails to <see cref="ChatProviders.ITGChatProvider.Connect"/>
/// Warning: When a <see cref="ChatProviders.IChatProvider"/> fails to <see cref="ChatProviders.IChatProvider.Connect"/>
/// </summary>
ChatConnectFail = 200,
/// <summary>
/// Error: When a <see cref="ChatProviders.ITGChatProvider"/> fails to construct
/// Error: When a <see cref="ChatProviders.IChatProvider"/> fails to construct
/// </summary>
ChatProviderStartFail = 300,
/// <summary>
@@ -110,11 +110,11 @@ namespace TGServerService
/// </summary>
DDWatchdogStarted = 2500,
/// <summary>
/// Info: Successful completion of a <see cref="ChatProviders.ITGChatProvider.SendMessageDirect(string, string)"/> operation
/// Info: Successful completion of a <see cref="ChatProviders.IChatProvider.SendMessageDirect(string, string)"/> operation
/// </summary>
ChatSend = 2600,
/// <summary>
/// Info: Successful completion of a <see cref="ChatProviders.ITGChatProvider.SendMessage(string, MessageType)"/> operation
/// Info: Successful completion of a <see cref="ChatProviders.IChatProvider.SendMessage(string, MessageType)"/> operation
/// </summary>
ChatBroadcast = 2700,
/// <summary>
@@ -123,7 +123,7 @@ namespace TGServerService
[Obsolete("Not in use anymore", true)]
ChatAdminBroadcast = 2800,
/// <summary>
/// Error: When an error occurs during a <see cref="ChatProviders.ITGChatProvider.Disconnect"/> operation
/// Error: When an error occurs during a <see cref="ChatProviders.IChatProvider.Disconnect"/> operation
/// </summary>
ChatDisconnectFail = 2900,
/// <summary>
+6 -6
View File
@@ -11,9 +11,9 @@ namespace TGServerService
sealed partial class ServerInstance : ITGChat
{
/// <summary>
/// List of <see cref="ITGChatProvider"/>s for the <see cref="ServerInstance"/>
/// List of <see cref="IChatProvider"/>s for the <see cref="ServerInstance"/>
/// </summary>
IList<ITGChatProvider> ChatProviders;
IList<IChatProvider> ChatProviders;
/// <summary>
/// Used for multithreading safety
/// </summary>
@@ -25,10 +25,10 @@ namespace TGServerService
public void InitChat()
{
var infos = InitProviderInfos();
ChatProviders = new List<ITGChatProvider>(infos.Count);
ChatProviders = new List<IChatProvider>(infos.Count);
foreach (var info in infos)
{
ITGChatProvider chatProvider;
IChatProvider chatProvider;
try
{
switch (info.Provider)
@@ -60,13 +60,13 @@ namespace TGServerService
/// <summary>
/// Implementation of <see cref="OnChatMessage"/> that recieves messages from all channels of all connected <see cref="ChatProviders"/>
/// </summary>
/// <param name="ChatProvider">The <see cref="ITGChatProvider"/> that heard the <paramref name="message"/></param>
/// <param name="ChatProvider">The <see cref="IChatProvider"/> that heard the <paramref name="message"/></param>
/// <param name="speaker">The user who wrote the <paramref name="message"/></param>
/// <param name="channel">The channel the <paramref name="message"/> is from</param>
/// <param name="message">The recieved message</param>
/// <param name="isAdmin"><see langword="true"/> if <paramref name="speaker"/> is considered a chat admin, <see langword="false"/> otherwise</param>
/// <param name="isAdminChannel"><see langword="true"/> if <paramref name="channel"/> is an admin channel, <see langword="false"/> otherwise</param>
private void ChatProvider_OnChatMessage(ITGChatProvider ChatProvider, string speaker, string channel, string message, bool isAdmin, bool isAdminChannel)
private void ChatProvider_OnChatMessage(IChatProvider ChatProvider, string speaker, string channel, string message, bool isAdmin, bool isAdminChannel)
{
var splits = message.Trim().Split(' ');