Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading;
- using IrcDotNet;
- namespace Tim_s_IRC_bot
- {
- class Program
- {
- static void Main(string[] args)
- {
- using (var client = new IrcDotNet.StandardIrcClient())
- {
- using (var connectedEvent = new ManualResetEventSlim(false))
- {
- client.Connected += (sender2, e2) => connectedEvent.Set();
- client.Connect("irc.freenode.net", 7070, false, new IrcUserRegistrationInfo()
- {
- NickName = "Tims_Tech",
- Password = "****",
- UserName = "Tims_Tech"
- });
- if (!connectedEvent.Wait(10000))
- {
- Console.WriteLine("Connection to '{0}' timed out.", "irc.freenode.net/6667");
- Console.ReadLine();
- return;
- }
- client.Channels.Join("#wrongplanet");
- Console.ReadLine();
- };
- };
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement