Пример #1
0
 public static void Disconnect(string reason = "Leaving")
 {
     if (irc != null)
     {
         irc.Close(reason);
         irc = null;
     }
 }
Пример #2
0
        public static bool Connect(string host, int port = 6667)
        {
            try
            {
                irc = new FrameworkIRC(host, port);

                irc.Registered      += OnRegistered;
                irc.ChannelJoin     += OnChannelJoin;
                irc.DataReceived    += OnDataReceived;
                irc.MessageReceived += OnMessageReceived;
                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }