public TwitchConnection(ClientType client) { m_irc = new IrcConnection(client); m_irc.UserJoined += NotifyJoined; m_irc.UserParted += NotifyPart; m_irc.MessageReceived += NotifyMessageReceived; m_irc.ModeratorJoined += NotifyModeratorJoined; m_irc.ModeratorLeft += NotifyModeratorLeft; m_irc.Disconnected += m_irc_disconnected; m_irc.Connected += m_irc_connected; }
public static IEnumerable<string> TestInput(IEnumerable<string> lines, TwitchConnection.ChannelCreatedHandler chanCreated) { List<string> errors = new List<string>(); TwitchConnection twitch = new TwitchConnection(ClientType.Full); twitch.ChannelCreated += chanCreated; IrcConnection conn = new IrcConnection(ClientType.Full); foreach (var line in lines) { int userStart; int userEnd; string command; int args; if (ParseLine(line, out userStart, out userEnd, out command, out args)) { if (!conn.ProcessCommand(line, userStart, userEnd, command, args)) errors.Add(line); } else { errors.Add(line); } } return errors; }