예제 #1
0
 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;
 }
예제 #2
0
        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);
        }
예제 #3
0
 public ChannelPair(IrcConnection ircConnection, DiscordConnectionInfo discordConnectionInfo)
 {
     this.DiscordConnectionInfo = discordConnectionInfo;
     this.IrcConnection         = ircConnection;
     this.EnableConsoleLogging  = true;
 }