Ejemplo n.º 1
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
 public static void ReceiveVoice(string fileName, string postfixName)
 {
     if (ProxyType == CQProxyType.UDP)
     {
         CQLogger.GetInstance().AddLog(String.Format("[↓][语音] QQ:{0} {1}", fileName, postfixName));
         string content = String.Format("ReceiveVoice|{0}|{1}", fileName, postfixName);
         CQUDPProxy.GetInstance().SendMessage(content);
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// 初始化 <see cref="CQLogger"/> 的一个单例。
        /// </summary>
        /// <returns></returns>
        public static CQLogger GetInstance()
        {
            if (_instance == null)
            {
                _instance = new CQLogger();
            }

            return(_instance);
        }
Ejemplo n.º 3
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        public static Image GetQQFace(long qqNumber)
        {
            CQLogger.GetInstance().AddLog(String.Format("[↓][头像] QQ:{0}", qqNumber));

            string url = String.Format("http://q.qlogo.cn/headimg_dl?dst_uin={0}&spec=640&img_type=jpg", qqNumber);

            Image img = HttpHelper.GetImage(url);

            return(img);
        }
Ejemplo n.º 4
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 取群成员信息。
        /// <para>
        /// 多线程同步等待,采用阻塞线程的方式等待客户端返回群成员信息,响应时间较慢,建议使用缓存。
        /// </para>
        /// <para>
        /// 缓存时长1天,超过1天的成员,在下次访问时会通过酷Q重新获取最新信息。
        /// </para>
        /// </summary>
        /// <param name="groupNumber">群号码。</param>
        /// <param name="qqNumber">被操作的QQ号码。</param>
        /// <param name="cache">是否使用缓存(使用缓存后,当后第一次访问会通过客户端读取,之后每次都通过缓存获得)。</param>
        public static CQGroupMemberInfo GetGroupMemberInfo(long groupNumber, long qqNumber, bool cache = true)
        {
            lock (_syncRoot)
            {
                Dictionary <long, CQGroupMemberInfo> dicMemebers = new Dictionary <long, CQGroupMemberInfo>();

                if (_dicCache.ContainsKey(groupNumber))
                {
                    dicMemebers = _dicCache[groupNumber];
                }
                else
                {
                    _dicCache.Add(groupNumber, dicMemebers);
                }

                CQGroupMemberInfo member = new CQGroupMemberInfo();

                if (dicMemebers.ContainsKey(qqNumber))
                {
                    member = dicMemebers[qqNumber];
                }
                else
                {
                    dicMemebers.Add(qqNumber, member);
                }

                if (!cache || member.RefreshDate.Date.AddDays(1) < DateTime.Now)
                {
                    CQLogger.GetInstance().AddLog(String.Format("[↓][成员] 群:{0} QQ:{1}", groupNumber, qqNumber));
                    string content = String.Empty;

                    if (CQ.ProxyType == CQProxyType.UDP)
                    {
                        content = String.Format("GroupMemberRequest|{0}|{1}", groupNumber, qqNumber);
                        member  = CQUDPProxy.GetInstance().GetGroupMemberInfo(content);
                    }
                    if (CQ.ProxyType == CQProxyType.NativeClr)
                    {
                        content = CQAPI.GetGroupMemberInfo(CQAPI.GetAuthCode(), groupNumber, qqNumber, cache ? 1 : 0);
                        member  = CQMessageAnalysis.AnalyzeGroupMember(content);
                    }

                    if (cache)
                    {
                        dicMemebers[qqNumber] = member;
                    }
                }

                return(member);
            }


            return(new CQGroupMemberInfo());
        }
Ejemplo n.º 5
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 置群成员专属头衔
        /// </summary>
        /// <param name="groupNumber">群号码。</param>
        /// <param name="qqNumber">被操作的QQ号码。</param>
        /// <param name="newName">头衔名称。</param>
        /// <param name="time">过期时间(以秒为单位)。</param>
        public static void SetGroupHonorName(long groupNumber, long qqNumber, string newName, int time)
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][头衔] 群:{0} QQ:{1} {2}", groupNumber, qqNumber, newName));

            if (CQ.ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SetGroupHonor|{0}|{1}|{2}|{3}", groupNumber, qqNumber, newName.Replace("|", "$内容分割$"), time);
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SetGroupSpecialTitle(CQAPI.GetAuthCode(), groupNumber, qqNumber, newName, time);
            }
        }
Ejemplo n.º 6
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 置群管理员。
        /// </summary>
        /// <param name="groupNumber">群号码。</param>
        /// <param name="qqNumber">被操作的QQ号码。</param>
        /// <param name="admin">是否设置为管理员。</param>
        public static void SetGroupAdministrator(long groupNumber, long qqNumber, bool admin)
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][管理] 群:{0} QQ:{1}", groupNumber, qqNumber, admin ? "提升为管理员" : "降为成员"));

            if (CQ.ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SetGroupAdministrator|{0}|{1}|{2}", groupNumber, qqNumber, admin);
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SetGroupAdmin(CQAPI.GetAuthCode(), groupNumber, qqNumber, admin ? 1 : 0);
            }
        }
Ejemplo n.º 7
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 置全群禁言。
        /// </summary>
        /// <param name="groupNumber">群号码。</param>
        /// <param name="gag">设置或关闭全群禁言。</param>
        public static void SetGroupAllGag(long groupNumber, bool gag)
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][禁言] 群:{0} QQ:{1}", groupNumber, gag ? "全员禁言" : "取消全员禁言"));

            if (CQ.ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SetGroupAllGag|{0}|{1}", groupNumber, gag);
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SetGroupWholeBan(CQAPI.GetAuthCode(), groupNumber, gag ? 1 : 0);
            }
        }
Ejemplo n.º 8
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 置群添加请求。
        /// </summary>
        /// <param name="react">请求反馈标识。</param>
        /// <param name="requestType">请求类型。</param>
        /// <param name="reactType">反馈类型。</param>
        /// <param name="reason">加群原因。</param>
        public static void SetGroupAddRequest(string react, CQRequestType requestType, CQReactType reactType, string reason = "")
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][请群] {0} {1} {2}", react, requestType, reactType));

            if (CQ.ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SetGroupAddRequest|{0}|{1}|{2}|{3}", react, (int)requestType, (int)reactType, reason.Replace("|", "$内容分割$"));
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SetGroupAddRequestV2(CQAPI.GetAuthCode(), react, (int)requestType, (int)reactType, reason);
            }
        }
Ejemplo n.º 9
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 置讨论组退出。
        /// </summary>
        /// <param name="discussNumber">讨论组号码。</param>
        public static void SetDiscussExit(long discussNumber)
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][退组] 组:{0}", discussNumber));

            if (CQ.ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SetDiscussExit|{0}", discussNumber);
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SetDiscussLeave(CQAPI.GetAuthCode(), discussNumber);
            }
        }
Ejemplo n.º 10
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 置匿名群员禁言。
        /// </summary>
        /// <param name="groupNumber">群号码。</param>
        /// <param name="anomymous">被操作的匿名成员名称。</param>
        /// <param name="time">禁言时长(以秒为单位)</param>
        public static void SetGroupAnonymousMemberGag(long groupNumber, string anomymous, long time)
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][禁言] 群:{0} 匿名:{1} 时长:{2}", groupNumber, anomymous, time));

            if (CQ.ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SetGroupAnonymousMemberGag|{0}|{1}|{2}", groupNumber, anomymous.Replace("|", "$内容分割$"), time);
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SetGroupAnonymousBan(CQAPI.GetAuthCode(), groupNumber, anomymous, time);
            }
        }
Ejemplo n.º 11
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 置群员移除。
        /// </summary>
        /// <param name="groupNumber">群号码。</param>
        /// <param name="qqNumber">被操作的QQ号码。</param>
        /// <param name="refuse">是否拒绝再次加群。</param>
        public static void SetGroupMemberRemove(long groupNumber, long qqNumber, bool refuse = false)
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][踢人] 群:{0} QQ:{1}", groupNumber, qqNumber));

            if (CQ.ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SetGroupMemberRemove|{0}|{1}|{2}", groupNumber, qqNumber, refuse);
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SetGroupKick(CQAPI.GetAuthCode(), groupNumber, qqNumber, refuse ? 1 : 0);
            }
        }
Ejemplo n.º 12
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 置群员禁言。
        /// </summary>
        /// <param name="groupNumber">群号码。</param>
        /// <param name="qqNumber">被操作的QQ号码。</param>
        /// <param name="time">禁言时长(以秒为单位)</param>
        public static void SetGroupMemberGag(long groupNumber, long qqNumber, long time)
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][禁言] 群:{0} QQ:{1} Time:{2}", groupNumber, qqNumber, time));

            if (CQ.ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SetGroupMemberGag|{0}|{1}|{2}", groupNumber, qqNumber, time);
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SetGroupBan(CQAPI.GetAuthCode(), groupNumber, qqNumber, time);
            }
        }
Ejemplo n.º 13
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 置群成员名片
        /// </summary>
        /// <param name="groupNumber">群号码。</param>
        /// <param name="qqNumber">被操作的QQ号码。</param>
        /// <param name="newName">新的群名称。</param>
        public static void SetGroupNickName(long groupNumber, long qqNumber, string newName)
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][名片] 群:{0} QQ:{1} {2}", groupNumber, qqNumber, newName));

            if (CQ.ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SetGroupNickName|{0}|{1}|{2}", groupNumber, qqNumber, newName.Replace("|", "$内容分割$"));
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SetGroupCard(CQAPI.GetAuthCode(), groupNumber, qqNumber, newName);
            }
        }
Ejemplo n.º 14
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 发送赞(本地C++模式调用一次只能发送一个赞)。
        /// </summary>
        /// <param name="qqNumber">被操作的QQ。</param>
        /// <param name="count">发赞次数。</param>
        public static void SendPraise(long qqNumber, int count = 1)
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][发赞] QQ:{0} {1}次", qqNumber, count));

            if (ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SendGood|{0}|{1}", qqNumber, count);
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SendLike(CQAPI.GetAuthCode(), qqNumber);
            }
        }
Ejemplo n.º 15
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 发送讨论组消息。
        /// </summary>
        /// <param name="discussNumber">讨论组号码。</param>
        /// <param name="message">论组消息内容。</param>
        public static void SendDiscussMessage(long discussNumber, string message)
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][讨论] QQ:{0} {1}", discussNumber, message));

            if (ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SendDiscussMessage|{0}|{1}", discussNumber, message.Replace("|", "$内容分割$"));
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SendDiscussMessage(CQAPI.GetAuthCode(), discussNumber, message);
            }
        }
Ejemplo n.º 16
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 置群匿名设置。
        /// </summary>
        /// <param name="groupNumber">群号码。</param>
        /// <param name="allow">开启或关闭匿名功能。</param>
        public static void SetGroupAllowAnonymous(long groupNumber, bool allow)
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][禁言] 群:{0} QQ:{1}", groupNumber, allow ? "开启匿名" : "关闭匿名"));

            if (CQ.ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SetGroupAllowAnonymous|{0}|{1}", groupNumber, allow);
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SetGroupAnonymous(CQAPI.GetAuthCode(), groupNumber, allow ? 1 : 0);
            }
        }
Ejemplo n.º 17
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 置群退出。
        /// </summary>
        /// <param name="groupNumber">群号码。</param>
        /// <param name="dissolution">是否解散。</param>
        public static void SetGroupExit(long groupNumber, bool dissolution = false)
        {
            CQLogger.GetInstance().AddLog(String.Format("[↑][退群] 群:{0} {1}", groupNumber, dissolution ? "解散" : ""));

            if (CQ.ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("SetGroupExit|{0}|{1}", groupNumber, dissolution);
                CQUDPProxy.GetInstance().SendMessage(content);
            }
            else
            {
                CQAPI.SetGroupLeave(CQAPI.GetAuthCode(), groupNumber, dissolution ? 1 : 0);
            }
        }
Ejemplo n.º 18
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 取取CsrfToken。
        /// </summary>
        /// <returns>登录的CsrfToken。</returns>
        public static int GetCsrfToken()
        {
            CQLogger.GetInstance().AddLog(String.Format("[↓][帐号] 取CsrfToken"));

            if (ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("GetCsrfTokenRequest");
                string result  = CQUDPProxy.GetInstance().GetStringMessage(content);
                return(Convert.ToInt32(result));
            }
            else
            {
                return(CQAPI.GetCsrfToken(CQAPI.GetAuthCode()));
            }
        }
Ejemplo n.º 19
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 取Cookies。
        /// </summary>
        /// <returns>登录的Cookies。</returns>
        public static string GetCookies()
        {
            CQLogger.GetInstance().AddLog(String.Format("[↓][帐号] 取Cookies"));


            if (ProxyType == CQProxyType.UDP)
            {
                string content = String.Format("GetCookiesRequest");
                string result  = CQUDPProxy.GetInstance().GetStringMessage(content);
                return(result);
            }
            else
            {
                return(CQAPI.GetCookies(CQAPI.GetAuthCode()));
            }
        }
Ejemplo n.º 20
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        public static List <CQGroupMemberInfo> GetGroupMemberList(long groupNumber)
        {
            List <CQGroupMemberInfo> list = new List <CQGroupMemberInfo>();

            if (ProxyType == CQProxyType.UDP)
            {
                try
                {
                    CQLogger.GetInstance().AddLog(String.Format("[↓][帐号] 群:{0} 取群成员列表", groupNumber));

                    string content = String.Format("GetGroupMemberListRequest|{0}", groupNumber);
                    string result  = CQUDPProxy.GetInstance().GetStringMessage(content);

                    string[] msQQIds      = result.GetMidStrings("\"uin\":", "}");
                    string[] msQQNames    = result.GetMidStrings("\"nick\":\"", "\",\"uin\":");
                    string[] msIsAdmins   = result.GetMidStrings("\"ismanager\":", ",");
                    string[] msIsCreators = result.GetMidStrings("\"iscreator\":", ",");

                    if (msQQIds.Length == msQQNames.Length &&
                        msQQNames.Length == msIsAdmins.Length &&
                        msIsAdmins.Length == msIsCreators.Length)
                    {
                        for (int i = 0; i < msQQIds.Length; i++)
                        {
                            CQGroupMemberInfo info = new CQGroupMemberInfo();

                            info.GroupNumber = groupNumber;
                            info.QQNumber    = Convert.ToInt64(msQQIds[i]);
                            info.QQName      = msQQNames[i];

                            int isAdmin   = Convert.ToInt32(msIsAdmins[i]);
                            int isCreator = Convert.ToInt32(msIsCreators[i]);

                            info.Authority = isCreator == 1 ? "群主" : isAdmin == 1 ? "管理" : "成员";

                            list.Add(info);
                        }
                    }
                }
                catch
                {
                }
            }

            return(list);
        }
Ejemplo n.º 21
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 取登录昵称。
        /// </summary>
        /// <returns>登录的QQ号码昵称。</returns>
        public static string GetLoginName()
        {
            CQLogger.GetInstance().AddLog(String.Format("[↓][帐号] 取登录昵称"));

            try
            {
                if (ProxyType == CQProxyType.UDP)
                {
                    string content = String.Format("GetLoginNameRequest");
                    string result  = CQUDPProxy.GetInstance().GetStringMessage(content);
                    return(result);
                }
                else
                {
                    return(CQAPI.GetLoginNick(CQAPI.GetAuthCode()));
                }
            }
            catch
            {
            }

            return("");
        }
Ejemplo n.º 22
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        /// <summary>
        /// 取登录QQ。
        /// </summary>
        /// <returns>登录的QQ号码</returns>
        public static long GetLoginQQ()
        {
            CQLogger.GetInstance().AddLog(String.Format("[↓][帐号] 取登录QQ"));

            try
            {
                if (ProxyType == CQProxyType.UDP)
                {
                    string content = String.Format("GetLoginQQRequest");
                    string result  = CQUDPProxy.GetInstance().GetStringMessage(content);
                    return(Convert.ToInt64(result));
                }
                else
                {
                    return(CQAPI.GetLoginQQ(CQAPI.GetAuthCode()));
                }
            }
            catch
            {
            }

            return(0);
        }
Ejemplo n.º 23
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        public static List <CQGroupInfo> GetGroupList()
        {
            List <CQGroupInfo> list = new List <CQGroupInfo>();

            if (ProxyType == CQProxyType.UDP)
            {
                try
                {
                    CQLogger.GetInstance().AddLog(String.Format("[↓][帐号] 取群列表"));

                    string content = String.Format("GetGroupListRequest");
                    string result  = CQUDPProxy.GetInstance().GetStringMessage(content);

                    string[] msGroupIds   = result.GetMidStrings("\"groupid\":", ",\"groupname\":\"");
                    string[] msGroupNames = result.GetMidStrings("groupname\":\"", "\"");

                    if (msGroupIds.Length == msGroupNames.Length)
                    {
                        for (int i = 0; i < msGroupIds.Length; i++)
                        {
                            CQGroupInfo info = new CQGroupInfo();

                            info.GroupNumber = Convert.ToInt64(msGroupIds[i]);
                            info.GroupName   = msGroupNames[i];

                            list.Add(info);
                        }
                    }
                }
                catch
                {
                }
            }

            return(list);
        }
Ejemplo n.º 24
0
Archivo: CQ.cs Proyecto: zzzzzga/CQP
        public static string GetQQName(long qqNumber)
        {
            CQLogger.GetInstance().AddLog(String.Format("[↓][昵称] QQ:{0}", qqNumber));

            string url     = String.Format("http://r.pengyou.com/fcg-bin/cgi_get_portrait.fcg?uins={0}&get_nick=1&_=1438937421131", qqNumber);
            string content = HttpHelper.Get(url, "r.pengyou.com", Encoding.GetEncoding("GB2312"));

            if (content.Contains("error"))
            {
                return("暂无昵称");
            }
            else
            {
                string[] mc = content.GetMidStrings(",\"", "\",");
                if (mc.Length > 0)
                {
                    return(mc[0]);
                }
                else
                {
                    return("暂无昵称");
                }
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        /// 解析消息。
        /// </summary>
        /// <param name="data"></param>
        private void AnalyzeMessage(object data)
        {
            string[] args = data.ToString().Split(new char[] { '|' });

            if (args.Length == 12)
            {
                string eventType      = args[0];                                                      //1事件类型
                int    subType        = Convert.ToInt32(args[1]);                                     //2子类型
                int    sendTime       = String.IsNullOrEmpty(args[2]) ? 0 : Convert.ToInt32(args[2]); //3发送时间(时间戳)
                long   fromGroup      = String.IsNullOrEmpty(args[3]) ? 0 : Convert.ToInt64(args[3]); //4来源群号
                long   fromDiscuss    = String.IsNullOrEmpty(args[4]) ? 0 : Convert.ToInt64(args[4]); //5来源讨论组
                long   fromQQ         = String.IsNullOrEmpty(args[5]) ? 0 : Convert.ToInt64(args[5]); //6来源QQ
                string fromAnonymous  = args[6];                                                      //7来源匿名者
                long   beingOperateQQ = String.IsNullOrEmpty(args[7]) ? 0 : Convert.ToInt64(args[7]); //8被操作QQ
                string msg            = args[8].Replace("$内容分割$", "|");                               //9消息内容
                int    font           = String.IsNullOrEmpty(args[9]) ? 0 : Convert.ToInt32(args[9]); //10字体
                string responseFlag   = args[10];                                                     //11反馈标识(处理请求用)
                string file           = args[11];                                                     //12上传文件信息

                switch (eventType)
                {
                case "PrivateMessage":     //私聊消息
                    CQLogger.GetInstance().AddLog(String.Format("[↓][私聊] QQ:{0} {1}", fromQQ, msg));
                    break;

                case "GroupMessage":     //群消息
                    CQLogger.GetInstance().AddLog(String.Format("[↓][群聊] 群:{0} QQ:{1} {2}", fromGroup, fromQQ, msg));
                    break;

                case "DiscussMessage":     //讨论组消息
                    CQLogger.GetInstance().AddLog(String.Format("[↓][讨论] 组:{0} QQ:{1} {2}", fromDiscuss, fromQQ, msg));
                    break;

                case "GroupUpload":     //群文件上传事件
                    CQLogger.GetInstance().AddLog(String.Format("[↓][上传] 群:{0} QQ:{1} {2}", fromGroup, fromQQ, file));
                    break;

                case "GroupAdmin":     //群事件-管理员变动
                    CQLogger.GetInstance().AddLog(String.Format("[↓][管理] 群:{0} QQ:{1}", fromGroup, beingOperateQQ));
                    break;

                case "GroupMemberDecrease":     //群事件-群成员减少
                    CQLogger.GetInstance().AddLog(String.Format("[↓][减员] 群:{0} QQ:{1} OperateQQ:{2}", fromGroup, fromQQ, beingOperateQQ));
                    break;

                case "GroupMemberIncrease":     //群事件-群成员增加
                    CQLogger.GetInstance().AddLog(String.Format("[↓][增员] 群:{0} QQ:{1} OperateQQ:{2}", fromGroup, fromQQ, beingOperateQQ));
                    break;

                case "FriendAdded":     //好友事件-好友已添加
                    CQLogger.GetInstance().AddLog(String.Format("[↓][加友] QQ:{0}", fromQQ));
                    break;

                case "RequestAddFriend":     //请求-好友添加
                    CQLogger.GetInstance().AddLog(String.Format("[↓][请友] QQ:{0} {1}", fromQQ, msg));
                    break;

                case "RequestAddGroup":     //请求-群添加
                    CQLogger.GetInstance().AddLog(String.Format("[↓][请群] 群:{0} QQ:{1} {2}", fromGroup, fromQQ, msg));
                    break;
                }
            }

            CQMessageAnalysis.Analyze(data.ToString());
        }