Guest User

Untitled

a guest
Oct 18th, 2017
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Threading.Tasks;
  5. using System.Windows.Forms;
  6. using System.Text;
  7. using System.Net.Sockets;
  8. using System.IO;
  9. namespace chatrig
  10. {
  11. class chatrig
  12. {
  13. static String ip = "irc.twitch.tv";
  14. static Int32 port = 6667;
  15.  
  16. static String username = "traps_are_not_gay_baka";
  17. static String password = "oauth:hokzuzhoe0dxggzc95neltebkv5gnb";
  18.  
  19. static String clientID = "2lubvv5fdg0getu30dw3f2m8orz24c";
  20.  
  21. static String channel = "bakoni";
  22.  
  23. static TcpClient tcpClient = new TcpClient(ip, port);
  24.  
  25. static StreamReader reader = new StreamReader(tcpClient.GetStream());
  26. static StreamWriter writer = new StreamWriter(tcpClient.GetStream());
  27.  
  28. static void Main(string[] args)
  29. {
  30.  
  31. writer.WriteLine("PASS " + password);
  32.  
  33. writer.Flush();
  34.  
  35. writer.WriteLine("NICK " + username);
  36.  
  37. writer.Flush();
  38.  
  39. writer.WriteLine("USER " + username + " 8 * :" + username);
  40.  
  41. writer.Flush();
  42.  
  43. writer.WriteLine("JOIN #" + channel);
  44.  
  45. writer.Flush();
  46.  
  47. while (true)
  48. {
  49. var message = reader.ReadLine();
  50. Console.WriteLine(message);
  51.  
  52. if (message.Contains("yandYo"))
  53. {
  54. writer.WriteLine("PRIVMSG #" + channel + " :" + "w" + "rn");
  55.  
  56. writer.Flush();
  57.  
  58. Console.WriteLine("It worked!");
  59. }
  60. }
  61. }
  62.  
  63. }
  64.  
  65. }
Add Comment
Please, Sign In to add comment