Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using System.Text;
- using System.Net.Sockets;
- using System.IO;
- namespace chatrig
- {
- class chatrig
- {
- static String ip = "irc.twitch.tv";
- static Int32 port = 6667;
- static String username = "traps_are_not_gay_baka";
- static String password = "oauth:hokzuzhoe0dxggzc95neltebkv5gnb";
- static String clientID = "2lubvv5fdg0getu30dw3f2m8orz24c";
- static String channel = "bakoni";
- static TcpClient tcpClient = new TcpClient(ip, port);
- static StreamReader reader = new StreamReader(tcpClient.GetStream());
- static StreamWriter writer = new StreamWriter(tcpClient.GetStream());
- static void Main(string[] args)
- {
- writer.WriteLine("PASS " + password);
- writer.Flush();
- writer.WriteLine("NICK " + username);
- writer.Flush();
- writer.WriteLine("USER " + username + " 8 * :" + username);
- writer.Flush();
- writer.WriteLine("JOIN #" + channel);
- writer.Flush();
- while (true)
- {
- var message = reader.ReadLine();
- Console.WriteLine(message);
- if (message.Contains("yandYo"))
- {
- writer.WriteLine("PRIVMSG #" + channel + " :" + "w" + "rn");
- writer.Flush();
- Console.WriteLine("It worked!");
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment