Esempio n. 1
0
        /// <summary>如果我要同意一个人加我为好友的请求,用这个方法发送同意消息
        ///     <remark>abu 2008-03-12 </remark>
        /// </summary>
        /// <param name="qq">The qq.</param>
        public void ApprovedAddMe(int qq)
        {
            AddFriendAuthResponsePacket packet = new AddFriendAuthResponsePacket(QQUser);

            packet.To     = qq;
            packet.Action = AuthAction.Approve;
            QQClient.PacketManager.SendPacket(packet, QQPort.Main.Name);
        }
Esempio n. 2
0
        /// <summary>如果我要拒绝一个人加我为好友的请求,用这个方法发送拒绝消息
        ///     <remark>abu 2008-03-12 </remark>
        /// </summary>
        /// <param name="qq">The qq.</param>
        /// <param name="message">The message.</param>
        public void RejectAddMe(int qq, string message)
        {
            AddFriendAuthResponsePacket packet = new AddFriendAuthResponsePacket(QQUser);

            packet.To      = qq;
            packet.Message = message;
            packet.Action  = AuthAction.Reject;
            QQClient.PacketManager.SendPacket(packet, QQPort.Main.Name);
        }
Esempio n. 3
0
        /// <summary> 处理认证信息的回复包
        ///     <remark>abu 2008-03-12 </remark>
        /// </summary>
        /// <param name="packet">The packet.</param>
        private void ProcessAddFriendAuthReply(AddFriendAuthResponseReplyPacket inPacket, AddFriendAuthResponsePacket outPacket)
        {
            QQEventArgs <AddFriendAuthResponseReplyPacket, AddFriendAuthResponsePacket> e = new QQEventArgs <AddFriendAuthResponseReplyPacket, AddFriendAuthResponsePacket>(client, inPacket, outPacket);

            if (inPacket.ReplyCode != ReplyCode.ADD_FRIEND_AUTH_OK)
            {
                client.FriendManager.OnResponseAuthFailed(e);
            }
            else
            {
                client.FriendManager.OnResponseAuthSuccessed(e);
            }
        }