EVEmail report - pasting here on behalf of Valerian.
he API call via http://kos.cva-eve.org/api/?c=json&type=multi&q=Marklar%20Schultz certainly returns results.
The entity is also clearly NOT KOS.
But Vintel reports this entity as "UNKNOWN"...so somewhere along the line of the KOS check, there seem to be issues.
As far as i can see this is what happens:
if char["kos"] or char["corp"]["kos"] or char["corp"]["alliance"]["kos"]:
data[charname] = {"kos": KOS}
elif corpname not in evegate.NPC_CORPS:
data[charname] = {"kos": NOT_KOS}
else:
if char not in checkBylastChars:
checkBylastChars.append(charname)
The result set is checked if any of the entries for pilot, corp or alliance have returned KOS, which is not the case!
The NPC Corps name is listed in the evegate list, hence we jump to the else part and add the entity will be added to the RBL list and checked via RBL.
So far so good! :)
The next part will turn the name of the entity into an ID and fetch all IDs of the corps in his employment history.
In this case, the entity has only been in one corp, which is NPC...thus resulting in only one entry that will be checked.
for charname, nameData in corpCheckData.items():
if not nameData["need_check"]:
data[charname] = {"kos": UNKNOWN}
if nameData["need_check"] and corpsResult[nameData["corp_to_check"]] == True:
data[charname] = {"kos": RED_BY_LAST}
else:
data[charname] = {"kos": UNKNOWN}
In the case we are currently using, the first two IF clauses return false. The npc corp is listed in the NPC-Corp list, so the "need_check" flag stays false.
This results in the else clause being called, setting the entity to UNKNOWN!
This is where VINTEL is wrong.
The entity IS known by the KOS checker...because the api results were not empty. But that is being overwirtten/ignored due to the fact that we land in that else clause.
The proceeding should be like:
-> all not KOS? y/n
-> if y: KOS!
-> if n: corp npc? y/n
-> not npc = NOT KOS!
-> if NPC = we need to check RBL!
-> get employment history!
-> check employment history!
-> go through every entry and check it for KOS (faction warfare is a thing!)
-> if entry is npc and not kos, traverse the list further
-> if entry is npc and KOS = report KOS! (faction warfare npc corp)
-> if entry is npc and NOTKOS continue with next entry
-> if we finished the list without a player corp = entity was only in NOT KOS npc corps resulting in NOT KOS
-> if we reach a player corp, we check it and stop afterwards!
-> is it kos? y/n
-> if yes = KOS
-> if no = NOT_KOS
UNKNOWN should only be returned if the first call to an entity resulted in an empty api result set! :D
EVEmail report - pasting here on behalf of Valerian.
he API call via http://kos.cva-eve.org/api/?c=json&type=multi&q=Marklar%20Schultz certainly returns results. The entity is also clearly NOT KOS. But Vintel reports this entity as "UNKNOWN"...so somewhere along the line of the KOS check, there seem to be issues.
As far as i can see this is what happens:
if char["kos"] or char["corp"]["kos"] or char["corp"]["alliance"]["kos"]: data[charname] = {"kos": KOS} elif corpname not in evegate.NPC_CORPS: data[charname] = {"kos": NOT_KOS} else: if char not in checkBylastChars:
checkBylastChars.append(charname)
The result set is checked if any of the entries for pilot, corp or alliance have returned KOS, which is not the case! The NPC Corps name is listed in the evegate list, hence we jump to the else part and add the entity will be added to the RBL list and checked via RBL. So far so good! :)
The next part will turn the name of the entity into an ID and fetch all IDs of the corps in his employment history. In this case, the entity has only been in one corp, which is NPC...thus resulting in only one entry that will be checked.
for charname, nameData in corpCheckData.items(): if not nameData["need_check"]: data[charname] = {"kos": UNKNOWN} if nameData["need_check"] and corpsResult[nameData["corp_to_check"]] == True: data[charname] = {"kos": RED_BY_LAST} else:
data[charname] = {"kos": UNKNOWN}
In the case we are currently using, the first two IF clauses return false. The npc corp is listed in the NPC-Corp list, so the "need_check" flag stays false. This results in the else clause being called, setting the entity to UNKNOWN!
This is where VINTEL is wrong. The entity IS known by the KOS checker...because the api results were not empty. But that is being overwirtten/ignored due to the fact that we land in that else clause.
The proceeding should be like: -> all not KOS? y/n -> if y: KOS! -> if n: corp npc? y/n -> not npc = NOT KOS! -> if NPC = we need to check RBL! -> get employment history! -> check employment history! -> go through every entry and check it for KOS (faction warfare is a thing!) -> if entry is npc and not kos, traverse the list further -> if entry is npc and KOS = report KOS! (faction warfare npc corp) -> if entry is npc and NOTKOS continue with next entry -> if we finished the list without a player corp = entity was only in NOT KOS npc corps resulting in NOT KOS -> if we reach a player corp, we check it and stop afterwards! -> is it kos? y/n -> if yes = KOS -> if no = NOT_KOS
UNKNOWN should only be returned if the first call to an entity resulted in an empty api result set! :D