Exemple #1
0
        protected override void BuildNormalResponse()
        {
            base.BuildNormalResponse();
            //we only broadcast the b_flags
            string flags = "";

            if (_request.KeyValues.ContainsKey("b_flags"))
            {
                flags += @"\" + "b_flags" + @"\" + _request.KeyValues["b_flags"];
            }

            //todo check the paramemter
            if (IsSetOthersKeyValue)
            {
                _sendingBuffer =
                    GETCKEYReply.BuildGetCKeyReply(
                        _otherUser.UserInfo.NickName,
                        _channel.Property.ChannelName,
                        "BCAST", flags);
            }
            else
            {
                _sendingBuffer =
                    GETCKEYReply.BuildGetCKeyReply(
                        _user.UserInfo.NickName,
                        _channel.Property.ChannelName,
                        "BCAST", flags);
            }
        }
        private void GetUserBFlagsOnly(ChatChannelUser user)
        {
            string flags = user.GetBFlagsString();

            _sendingBuffer += GETCKEYReply.BuildGetCKeyReply(
                    user.UserInfo.NickName, _channel.Property.ChannelName,
                    _request.Cookie, flags);
        }
        private void GetAllKeyValues(ChatChannelUser user)
        {
            string flags = user.GetUserValuesString(_request.Keys);

            //todo check the paramemter 
            _sendingBuffer +=
                GETCKEYReply.BuildGetCKeyReply(
                    user.UserInfo.NickName,
                    _channel.Property.ChannelName,
                    _request.Cookie, flags);
        }