public override void OnHttpStatusOK(QQHttpResponse response) { JObject json = JObject.Parse(response.GetResponseString()); if (json["retcode"].ToString() == "0") { JObject result = json["result"].ToObject <JObject>(); QQLevel level = user.Level; level.Level = result["level"].ToObject <int>(); level.Days = result["days"].ToObject <int>(); level.Hours = result["hours"].ToObject <int>(); level.RemainDays = result["remainDays"].ToObject <int>(); NotifyActionEvent(QQActionEventType.EVT_OK, user); } else { NotifyActionEvent(QQActionEventType.EVT_ERROR, new QQException(QQErrorCode.UNEXPECTED_RESPONSE, response.GetResponseString())); } }
public void Manager() { if (Config.Status) { if (Config.BlackListJoin && Config.BlackListJoinReject) { if (Config.QunBlackListUseYunBlackList) { if (Conf.YunBlackList.Contains(e.QQ)) { this.Client.AgreeJoinCluster(e.Cluster.ExternalId, e.QQ, false, Config.BlackListJoinResult_R); e.Cancel = true; return; } } if (Config.QunBlackList.Contains(e.QQ)) { this.Client.AgreeJoinCluster(e.Cluster.ExternalId, e.QQ, false, Config.BlackListJoinResult_R); e.Cancel = true; return; } } if (Config.Level) { if (Config.LevelReject) { QQLevel qqlevel = this.Client.GetQQLevel(e.QQ); if (qqlevel != null && qqlevel.ret == 0 && !Config.LevelWhiteList.Contains(e.QQ) && int.Parse(qqlevel.qq_level) < Config.LevelMin) { this.Client.AgreeJoinCluster(e.Cluster.ExternalId, e.QQ, false, Config.LevelResult_R .Replace("[最低等级]", Config.LevelMin.ToString())); e.Cancel = true; return; } } } } }