コード例 #1
0
ファイル: IrcBot.cs プロジェクト: qwertyuu/TwitchPlays
 public IrcBot()
 {
     using (StreamReader sR = new StreamReader("PASS.txt"))
     {
         PASS = sR.ReadLine();
     }
     try
     {
         handler = new InputHandler();
         irc     = new TcpClient(SERVER, PORT);
         stream  = irc.GetStream();
         reader  = new StreamReader(stream);
         writer  = new StreamWriter(stream)
         {
             AutoFlush = true
         };
         ping = new PingSender();
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
     }
     stop      = false;
     botThread = new Thread(Run);
     botThread.IsBackground = true;
     botThread.Start();
 }
コード例 #2
0
ファイル: IrcBot.cs プロジェクト: qwertyuu/TwitchPlays
 public IrcBot()
 {
     using (StreamReader sR = new StreamReader("PASS.txt"))
     {
         PASS = sR.ReadLine();
     }
     try
     {
         handler = new InputHandler();
         irc = new TcpClient(SERVER, PORT);
         stream = irc.GetStream();
         reader = new StreamReader(stream);
         writer = new StreamWriter(stream) { AutoFlush = true };
         ping = new PingSender();
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message);
     }
     stop = false;
     botThread = new Thread(Run);
     botThread.IsBackground = true;
     botThread.Start();
 }