Esempio n. 1
0
 private void MessageReceivedHandler(object sender, IrcEventArgs e)
 {
     OnMessageReceived(e);
 }
Esempio n. 2
0
        private void OnMessageReceived(IrcEventArgs e)
        {
            _isWaitingForActivity = false;

#if DEBUG
            if (Debugger.IsAttached)
            {
                Debug.WriteLine(string.Format("RECV: {0}", e.Message.ToString()));
            }
#endif

            RaiseEvent(RawMessageReceived, e);
            if (e.Handled)
            {
                return;
            }

            switch (e.Message.Command)
            {
            case IrcCommands.Ping:
                if (e.Message.Parameters.Count > 0)
                {
                    _conn.QueueMessage(IrcCommands.Pong + " " + e.Message.Parameters[0]);
                }
                else
                {
                    _conn.QueueMessage(IrcCommands.Pong);
                }
                break;

            case IrcCommands.Nick:
                OnNickChanged(e.Message);
                break;

            case IrcCommands.PrivateMsg:
                OnPrivateMessage(e.Message);
                break;

            case IrcCommands.Notice:
                OnNotice(e.Message);
                break;

            case IrcCommands.Quit:
                OnQuit(e.Message);
                break;

            case IrcCommands.Join:
                OnJoin(e.Message);
                break;

            case IrcCommands.Part:
                OnPart(e.Message);
                break;

            case IrcCommands.Topic:
                OnTopic(e.Message);
                break;

            case IrcCommands.Invite:
                OnInvite(e.Message);
                break;

            case IrcCommands.Kick:
                OnKick(e.Message);
                break;

            case IrcCommands.Mode:
                OnMode(e.Message);
                break;

            default:
                OnOther(e.Message);
                break;
            }
        }
Esempio n. 3
0
 private void MessageSentHandler(object sender, IrcEventArgs e)
 {
     OnMessageSent(e);
 }