Пример #1
0
        protected override void CheckRequest()
        {
            switch (_request.RequestType)
            {
            case ChatMessageType.ChannelMessage:
                base.CheckRequest();
                break;

            case ChatMessageType.UserMessage:

                if (_request.RequestType == ChatMessageType.UserMessage)
                {
                    if (!ChatSessionManager.GetSessionByNickName(_request.NickName, out _otherSession))
                    {
                        _errorCode     = ChatError.NoSuchNick;
                        _sendingBuffer = ChatIRCError.BuildNoSuchNickError();
                    }
                }
                break;

            default:
                _errorCode = ChatError.Parse;
                break;
            }
        }
Пример #2
0
        /// <summary>
        /// Send all channel user information
        /// </summary>
        private void GetUserInfo()
        {
            ChatSession session;

            if (ChatSessionManager.GetSessionByNickName(_cmd.Name, out session))
            {
                BuildWhoReplyForUser(session);
            }
            else if (ChatSessionManager.GetSessionByUserName(_cmd.Name, out session))
            {
                BuildWhoReplyForUser(session);
            }
            else //todo check whether we need this error
            {
                _errorCode     = ChatError.IRCError;
                _sendingBuffer = ChatIRCError.BuildNoSuchNickError();
            }
        }