Representing a fully working Irc connection class. Extend and override the sufficient OnEvent methods in order to customize it. The Dcc class offers sufficient events and commands for dealing with all Dcc matters.
예제 #1
0
 public IrcUser(IrcClient irc, string nick, IrcChannel chan)
     : this(irc)
 {
     m_nick = nick;
     m_comChans.Add(chan.Name, chan);
     irc.OnUserEncountered(this);
 }
예제 #2
0
 internal IrcUser(IrcClient irc)
 {
     m_isParsed = false;
     m_comChans = new Dictionary<string, IrcChannel>(StringComparer.InvariantCultureIgnoreCase);
     m_irc = irc;
     m_nick = "*";
     m_UserName = "******";
     m_host = "*";
 }
예제 #3
0
        public IrcChannel(IrcClient irc, string name)
        {
            m_irc = irc;
            m_name = name;

            Users = new Dictionary<string, IrcUser>(StringComparer.InvariantCultureIgnoreCase);
            Privileges = new Dictionary<IrcUser, UserPrivSet>();
            BanMasks = new Dictionary<string, BanEntry>(StringComparer.InvariantCultureIgnoreCase);
            UnbanTimers = new Dictionary<string, UnbanTimer>(StringComparer.InvariantCultureIgnoreCase);
            m_topic = "";
            ClearModes();
        }
예제 #4
0
        internal Client(IrcClient irc)
        {
            m_irc = irc;
            m_queue = new ThrottledSendQueue();
            m_queue.Dequeued += SendLineNow;
            m_addr = "";

            Connecting += OnConnecting;
            Connected += OnConnect;
            ConnectFailed += OnConnectFail;
            Disconnecting += OnDisconnecting;
        }
예제 #5
0
 public static void Irc_Disconnected(IrcClient arg1, bool arg2)
 {
     try
     {
         UtilityMethods.Print("Disconnected from IRC server, Attempting reconnect in 5 seconds", true);
         Thread.Sleep(5000);
         Irc.BeginConnect(Irc._network[0].ToString(), Port);
     }
     catch (Exception e)
     {
         UtilityMethods.Print(e.Data + e.StackTrace,true);
     }
 }
예제 #6
0
 public static void Irc_Disconnected(IrcClient arg1, bool arg2)
 {
     try
     {
         var msg = "Disconnected from IRC server, Attempting reconnect in 5 seconds";
         Console.WriteLine(msg);
         IrcLog.WriteLine(msg);
         Thread.Sleep(5000);
         Irc.BeginConnect(Irc._network[0].ToString(), Port);
     }
     catch (Exception e)
     {
         WriteErrorSystem.WriteError(e);
     }
 }
예제 #7
0
 public IrcUser(IrcClient irc, string mask)
     : this(irc)
 {
     Parse(mask);
     irc.OnUserEncountered(this);
 }
예제 #8
0
 public IrcUser(IrcClient irc, string mask)
     : this(irc)
 {
     Parse(mask);
     irc.OnUserEncountered(this);
 }