public WhisperBot( SQLite sqlite ) { _sqlite = sqlite; _irc = new IrcClient( "199.9.253.119", 6667, Credentials.login, Credentials.oauth ); _irc.sendIrcMessage( "CAP REQ :twitch.tv/commands" ); ThreadStart ts = delegate { this.listnerThread(); }; Thread thread = new Thread( ts ); thread.Start(); }
public MainBot( SQLite sqlite ) { _sqlite = sqlite; _irc = new IrcClient( "irc.twitch.tv", 6667, Credentials.login, Credentials.oauth ); string[] rooms = Resources.rooms.Split( ',' ); foreach ( string room in rooms ) _irc.joinRoom( room.Trim() ); _irc.sendIrcMessage( "CAP REQ :twitch.tv/membership" ); _irc.sendIrcMessage( "CAP REQ :twitch.tv/commands" ); _irc.sendIrcMessage( "CAP REQ :twitch.tv/tags" ); ThreadStart ts = delegate { this.ListnerThread(); }; Thread thread = new Thread( ts ); thread.Start(); }