public void GroupBanSpeak(object sender, CQGroupBanSpeakEventArgs e) { if (e.SubType == Sdk.Cqp.Enum.CQGroupBanSpeakType.SetBanSpeak) { long banqq = 0; if (e.BeingOperateQQ != null) { banqq = e.BeingOperateQQ.Id; } LuaEnv.LuaStates.Run(e.FromGroup.Id, "GroupBanSpeak", new { fromqq = e.FromQQ.Id, group = e.FromGroup.Id, banqq, all = e.IsAllBanSpeak, time = Utils.DateTimeToInt(e.BanSpeakTimeSpan ?? new TimeSpan(0)), }); } else if (e.SubType == Sdk.Cqp.Enum.CQGroupBanSpeakType.RemoveBanSpeak) { long banqq = 0; if (e.BeingOperateQQ != null) { banqq = e.BeingOperateQQ.Id; } LuaEnv.LuaStates.Run(e.FromGroup.Id, "GroupUnBanSpeak", new { fromqq = e.FromQQ.Id, group = e.FromGroup.Id, banqq, all = e.IsAllBanSpeak }); } }
public static int Event_eventSystem_GroupBan(int subType, int sendTime, long fromGroup, long fromQQ, long beingOperateQQ, long duration) { if (Event_eventSystem_GroupBanHandler != null) { CQGroupBanSpeakEventArgs args = new CQGroupBanSpeakEventArgs(api, log, 8, 104, "群禁言事件处理", "_eventSystem_GroupBan", 30000, subType, sendTime, fromGroup, fromQQ, beingOperateQQ, duration); Event_eventSystem_GroupBanHandler(typeof(CQEventExport), args); } return(0); }
public static int Event_eventSystem_GroupBan(int subType, int sendTime, long fromGroup, long fromQQ, long beingOperateQQ, long duration) { if (Event_eventSystem_GroupBanHandler != null) { CQGroupBanSpeakEventArgs args = new CQGroupBanSpeakEventArgs(AppData.CQApi, AppData.CQLog, 8, 104, "群禁言事件处理", "_eventSystem_GroupBan", 30000, subType, sendTime, fromGroup, fromQQ, beingOperateQQ, duration); Event_eventSystem_GroupBanHandler(typeof(CQEventExport), args); return((int)(args.Handler ? CQMessageHandler.Intercept : CQMessageHandler.Ignore)); } return(0); }