public ChannelPair(IrcConnection ircConnection, DiscordConnectionInfo discordConnectionInfo) { this.DiscordConnectionInfo = discordConnectionInfo; this.IrcConnection = ircConnection; this.EnableConsoleLogging = true; this.Ready = false; this.IrcConnection.ConnectComplete += Irc_ConnectComplete; this.IrcConnection.MessageReceived += Irc_ChannelMessageReceived; }
private static async Task LoadChannel(DiscordConnectionInfo discordInfo, IrcConnectionInfo ircInfo) { var pair = new ChannelPair(new IrcConnection(ircInfo) { EnableConsoleLogging = WriteToConsole }, discordInfo) { EnableConsoleLogging = WriteToConsole }; if (WriteToConsole) { Console.WriteLine("Connecting..."); } await pair.Connect(); if (WriteToConsole) { Console.WriteLine("Ready."); } Pairs.Add(pair); }
public ChannelPair(IrcConnection ircConnection, DiscordConnectionInfo discordConnectionInfo) { this.DiscordConnectionInfo = discordConnectionInfo; this.IrcConnection = ircConnection; this.EnableConsoleLogging = true; }