public EcUser GetUser(XQQQ client, GroupClient group) { string id = group.Group.Id + "_" + client.Id; if (this.Users.ContainsKey(id)) { return(this.Users[id]); } EcUser user = new EcUser() { //QQ = client QQId = client.Id, QQName = client.GetNick(group.RobotQQ), Group = group }; var dbItem = this.GetFromDb(id); if (dbItem != null) { user.Gold = dbItem.Gold; user.Items = dbItem.Items; } this.Users[id] = user; return(user); }
public XQAppPrivateMsgEventArgs(string robotQQ, int eventtype, int extratype, string fromqq, string msg, string index, string id, XQAPI api) : base(api) { RobotQQ = robotQQ; EventType = eventtype; ExtraType = extratype; FromQQ = new XQQQ(fromqq, api); Message = new XQMessage() { Text = msg, MsdId = id, MsgIndex = index }; }
public XQAddGroupEventArgs(XQAPI api, string robotqq, int eventtype, string qq, string group, string seq) : base(api, robotqq, eventtype) { FromQQ = new XQQQ(qq, api); FromGroup = new XQGroup(group, api); Seq = seq; }
public XQBanSpeakEventArgs(XQAPI xqapi, string robotQQ, int eventType, string fromqq, string targetqq, string fromgroup) : base(xqapi, robotQQ, eventType) { FromQQ = new XQQQ(fromqq, xqapi); FromGroup = new XQGroup(fromgroup, xqapi); TargetQQ = new XQQQ(fromqq, xqapi); }
/// <summary> /// 发送抖动窗口 /// </summary> /// <param name="robotQQ"></param> /// <returns></returns> public void ShakeWindow(XQQQ qqs) { qqs.ShakeWindow(RobotQQ); }
/// <summary> /// 发送私聊消息 /// </summary> /// <param name="qq"></param> /// <param name="msg"></param> public void SendPrivateMessage(XQQQ qq, string msg) { qq.SendMsg(RobotQQ, msg); }
public XQAddFriendEventArgs(XQAPI xqapi, string robotQQ, int eventType, string qq) : base(xqapi, robotQQ, eventType) { FromQQ = new XQQQ(qq, xqapi); }