Пример #1
0
Файл: CQ.cs Проект: zzzzzga/CQP
        /// <summary>
        /// 置好友添加请求。
        /// </summary>
        /// <param name="react">请求反馈标识。</param>
        /// <param name="reactType">反馈类型。</param>
        /// <param name="description">备注。</param>
        public static void SetFriendAddRequest(string react, CQReactType reactType, string description = "")
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][请友] {0} {1}", react, reactType));

            if (CQ.ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SetFriendAddRequest|{0}|{1}|{2}", react, (int)reactType, description.Replace("|", "$内容分割$"));
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SetFriendAddRequest(CQAPI.GetAuthCode(), react, (int)reactType, description);
            }
        }