Esempio n. 1
0
File: CQ.cs Progetto: zzzzzga/CQP
        /// <summary>
        /// 发送私聊消息。
        /// </summary>
        /// <param name="qqNumber">QQ号码。</param>
        /// <param name="message">私聊消息内容。</param>
        public static void SendPrivateMessage(long qqNumber, string message)
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][私聊] QQ:{0} {1}", qqNumber, message));

            if (ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SendPrivateMessage|{0}|{1}", qqNumber, message.Replace("|", "$内容分割$"));
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SendPrivateMessage(CQAPI.GetAuthCode(), qqNumber, message);
            }
        }