Exemplo n.º 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);
                }
            }
        }
Exemplo n.º 2
0
 public void SendMessage(string msg)
 {
     Server.Send("PRIVMSG " + this.Nick + " :" + msg);
 }