예제 #1
0
 public static int Event_eventSystem_GroupMemberIncrease(int subType, int sendTime, long fromGroup, long fromQQ, long beingOperateQQ)
 {
     if (Event_eventSystem_GroupMemberIncreaseHandler != null)
     {
         CQGroupMemberIncreaseEventArgs args = new CQGroupMemberIncreaseEventArgs(api, log, 7, 103, "群成员增加事件处理", "_eventSystem_GroupMemberIncrease", 30000, subType, sendTime, fromGroup, fromQQ, beingOperateQQ);
         Event_eventSystem_GroupMemberIncreaseHandler(typeof(CQEventExport), args);
     }
     return(0);
 }
예제 #2
0
 public static int Event_eventSystem_GroupMemberIncrease(int subType, int sendTime, long fromGroup, long fromQQ, long beingOperateQQ)
 {
     if (Event_eventSystem_GroupMemberIncreaseHandler != null)
     {
         CQGroupMemberIncreaseEventArgs args = new CQGroupMemberIncreaseEventArgs(AppData.CQApi, AppData.CQLog, 7, 103, "群成员增加事件处理", "_eventSystem_GroupMemberIncrease", 30000, subType, sendTime, fromGroup, fromQQ, beingOperateQQ);
         Event_eventSystem_GroupMemberIncreaseHandler(typeof(CQEventExport), args);
         return((int)(args.Handler ? CQMessageHandler.Intercept : CQMessageHandler.Ignore));
     }
     return(0);
 }
예제 #3
0
        public void GroupMemberIncrease(object sender, CQGroupMemberIncreaseEventArgs e)
        {
            IniObject iniObject = IniObject.Load(e.CQApi.AppDirectory + "config.ini", Encoding.UTF8);

            if ("711498146,222600436".IndexOf(e.FromGroup.Id.ToString()) >= 0)
            {
                string str = iniObject["InOne"]["YinZhiChen"].ToString().Replace(" ", "\n");

                e.FromGroup.SendGroupMessage(CQApi.CQCode_At(e.BeingOperateQQ) + str);
            }
        }
예제 #4
0
        public void GroupMemberIncrease(object sender, CQGroupMemberIncreaseEventArgs e)
        {
            if (!Sdata.ISready)
            {
                Sdata.log.Info("失败", "群" + e.FromGroup.Id.ToString() + "初始化没有完成"); return;
            }                                                                                                 //如果配置没有成功加载,则不处理消息
            String msg = (String)Sdata.MessageMap[e.FromGroup.Id.ToString()];

            if (msg == null)
            {
                Sdata.log.Info("失败", "群" + e.FromGroup.Id.ToString() + "没有对应的进群消息"); return;
            }
            CQCode cqat = e.BeingOperateQQ.CQCode_At();

            msg = System.Text.RegularExpressions.Regex.Unescape(msg);
            msg = System.Text.RegularExpressions.Regex.Unescape(msg);
            Sdata.APIII.SendGroupMessage(e.FromGroup, cqat + "\n" + msg);
        }
예제 #5
0
        public void GroupMemberIncrease(object sender, CQGroupMemberIncreaseEventArgs e)
        {
            List <Group> grouList = ReadXml.GetGroupsData();

            foreach (Group group in grouList)
            {
                if (e.FromGroup.Id == long.Parse(group.GroupNo))
                {
                    var picture = CQApi.CQCode_Image(group.ImageName).ToSendString();
                    var at      = CQApi.CQCode_At(e.BeingOperateQQ).ToSendString();

                    //发送群消息
                    e.CQApi.SendGroupMessage(e.FromGroup, at + group.Text + (group.IsSendImage ? picture : string.Empty));

                    e.Handler = true;
                    return;
                }
            }
        }
예제 #6
0
 public void GroupMemberIncrease(object sender, CQGroupMemberIncreaseEventArgs e)
 {
     LuaEnv.Tools.Manager.GroupManager.Update();
     if (e.SubType == Sdk.Cqp.Enum.CQGroupMemberIncreaseType.Invite)
     {
         LuaEnv.LuaStates.Run(e.FromGroup.Id, "GroupMemberInvite", new
         {
             group  = e.FromGroup.Id,
             qq     = e.BeingOperateQQ.Id,
             fromqq = e.FromQQ.Id
         });
     }
     else if (e.SubType == Sdk.Cqp.Enum.CQGroupMemberIncreaseType.Pass)
     {
         LuaEnv.LuaStates.Run(e.FromGroup.Id, "GroupMemberPass", new
         {
             group  = e.FromGroup.Id,
             qq     = e.BeingOperateQQ.Id,
             fromqq = e.FromQQ.Id
         });
     }
 }