Skip to content
This repository has been archived by the owner on Aug 26, 2020. It is now read-only.

Commit

Permalink
Another RBL fix - for when results are not in CVA DB.
Browse files Browse the repository at this point in the history
  • Loading branch information
3vi1 committed Mar 12, 2017
1 parent 9ff8033 commit 5b916a3
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 26 deletions.
2 changes: 2 additions & 0 deletions docs/RELEASES
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
0.7.4 - Another fix for RBL checks when CVA comes back with no info for corp.

0.7.3 - Fixes various issues with kos checking.

0.7.0 - Added red-by-last KOS checking.
Expand Down
53 changes: 30 additions & 23 deletions src/asyncinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -318,30 +318,37 @@ void AsyncInfo::gotKosCheckCorpReply()
QJsonObject jsonObject = jsonResponse.object();
QJsonArray jsonArray = jsonObject["results"].toArray();

KosEntry kosEntry;
foreach (const QJsonValue& value, jsonArray) {
QJsonObject obj = value.toObject();

// Most of these are unused right now, but I've got plans

kosEntry.corp.eveId = obj["eveid"].toInt();
kosEntry.corp.icon = obj["icon"].toString();
kosEntry.corp.id = obj["id"].toInt();
kosEntry.corp.kos = obj["kos"].toBool();
kosEntry.corp.name = obj["label"].toString();
kosEntry.corp.npc = obj["npc"].toBool();
kosEntry.corp.ticker = obj["ticker"].toString();

QJsonObject allianceObj = obj["alliance"].toObject();
kosEntry.alliance.eveId = allianceObj["eveid"].toInt();
kosEntry.alliance.icon = allianceObj["icon"].toString();
kosEntry.alliance.id = allianceObj["id"].toInt();
kosEntry.alliance.kos = allianceObj["kos"].toBool();
kosEntry.alliance.name = allianceObj["label"].toString();
kosEntry.alliance.ticker = allianceObj["ticker"].toString();
}
if(jsonArray.count() > 0)
{
KosEntry kosEntry;
foreach (const QJsonValue& value, jsonArray) {
QJsonObject obj = value.toObject();

// Most of these are unused right now, but I've got plans

kosEntry.corp.eveId = obj["eveid"].toInt();
kosEntry.corp.icon = obj["icon"].toString();
kosEntry.corp.id = obj["id"].toInt();
kosEntry.corp.kos = obj["kos"].toBool();
kosEntry.corp.name = obj["label"].toString();
kosEntry.corp.npc = obj["npc"].toBool();
kosEntry.corp.ticker = obj["ticker"].toString();

QJsonObject allianceObj = obj["alliance"].toObject();
kosEntry.alliance.eveId = allianceObj["eveid"].toInt();
kosEntry.alliance.icon = allianceObj["icon"].toString();
kosEntry.alliance.id = allianceObj["id"].toInt();
kosEntry.alliance.kos = allianceObj["kos"].toBool();
kosEntry.alliance.name = allianceObj["label"].toString();
kosEntry.alliance.ticker = allianceObj["ticker"].toString();
}

emit rblResultReady(checkNames, kosEntry.corp.kos | kosEntry.alliance.kos);
emit rblResultReady(checkNames, kosEntry.corp.kos | kosEntry.alliance.kos);
}
else
{
emit rblResultReady(checkNames, false);
}
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/imp.pro
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = imp
TEMPLATE = app

VERSION = 0.7.3
VERSION = 0.7.4
QMAKE_TARGET_COMPANY = EternalDusk
QMAKE_TARGET_DESCRIPTION = Eve Online Intelligence Management Program
QMAKE_TARGET_COPYRIGHT = (c) Copyright 2016-2017 Jesse Litton
Expand Down
4 changes: 2 additions & 2 deletions src/meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

static const struct Version
{
QString release = "0.7.3";
QString name = "The Super-Sonic Uber-toxic Lycanthropic Hot-Topic";
QString release = "0.7.4";
QString name = "The Myopic Super-Sonic Uber-toxic Lycanthropic Hot Topic";

QString styleHeader1 = "<span style=\" color:#0000ff;\">";
QString styleFooter1 = "</span>";
Expand Down

0 comments on commit 5b916a3

Please sign in to comment.