public void joinChannel(string channel, IRCListener listener) { channel = channel.ToLower(); registerListener(channel, listener); if (!joinedChannels.ContainsKey(channel)) { joinedChannels.Add(channel, 1); IRCJoinCommand.send(this, channel); } else { joinedChannels[channel]++; } }
private void doConnect() { // Socket Connected - DO LOGIN oAuth.clearToken(); IRCCapCommand.send(this, ":twitch.tv/tags"); IRCPassCommand.send(this, oAuth); IRCNickCommand.send(this, Nickname); IRCUserCommand.send(this, Nickname, RealName); ReadMessage(); foreach (KeyValuePair <string, int> item in joinedChannels) { string channel = item.Key; IRCJoinCommand.send(this, channel); } }