Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            //ShowWindow(GetConsoleWindow(), 0);
            DotaModule.heros = FileModule.JsonToClass <List <Heros> >("Heros.json");
            var twitchIRC = new IRCClient();

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        private void ConnectIrc()
        {
            var IRCChannels = FileModule.JsonToClass <List <IRCChannel> >("BotUsers.json");

            irc = new TcpClient("irc.twitch.tv", 6667);
            var stream = irc.GetStream();

            reader = new StreamReader(stream);
            writer = new StreamWriter(stream);
            writer.WriteLine("PASS " + Program.BotDetails.TwitchOauth
                             + Environment.NewLine
                             + "NICK " + Program.BotDetails.TwitchNick + Environment.NewLine
                             + "USER " + Program.BotDetails.TwitchNick + " 8 * :" + Program.BotDetails.TwitchNick);
            writer.WriteLine("JOIN #" + Program.BotDetails.TwitchNick);
            foreach (IRCChannel c in IRCChannels)
            {
                writer.WriteLine("JOIN #" + c.ChannelName);
            }
            writer.Flush();
        }