Exemple #1
0
        static void Main(string[] args)
        {
            IRCLib.Server  s = new IRCLib.Server("irc.newnet.net", 6667);
            IRCLib.Profile p = new IRCLib.Profile();

            p.Nick = "DaveTest";
            p.User = "******";
            // p.RealName = "Dave IRC Test";


            //s.OnStatusMessage += new IRCLib.Server.MessageHandler(s_OnStatusMessage);
            //s.OnJoined += new Server.ChannelHandler(s_OnJoined);
            s.OnConnected += new Server.ServerHandler(s_OnConnected);
            s.Profile      = p;
            s.Connect();



            while (true)
            {
                Console.Write("irc: ");
                string line = Console.ReadLine();
                if (line == "show")
                {
                    foreach (Channel c in s.Channels.ToArray())
                    {
                        Console.WriteLine(c);
                    }
                }
                else
                {
                    s.Send(line);
                }
            }
        }
Exemple #2
0
 internal Channel(Server Server, string Name)
 {
     this.Server = Server;
     this.Name = Name;
     Users = new List<User>();
 }