Skip to content

Commit

Permalink
Update forgotten vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Slivo-fr committed Nov 9, 2017
1 parent 21f316e commit f9c7b11
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions Killbot.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private function processKill() {
$isVictimCorpWatched = in_array($victim->{'corporation_id'}, Settings::$WATCHED_ENTITIES['corporations']);
$isVictimAllianceWatched =
isset($victim->{'alliance'}) &&
in_array($victim->{'alliance'}->{'id'}, Settings::$WATCHED_ENTITIES['alliances']);
in_array($victim->{'alliance_id'}, Settings::$WATCHED_ENTITIES['alliances']);

// Dissociating kill and loss
if ($isVictimAllianceWatched || $isVictimCorpWatched) {
Expand Down Expand Up @@ -146,14 +146,14 @@ private function isVictimWatched($killmail) {

$victim = $killmail->{'victim'};

if (isset($victim->{'corporation'}->{'id'})) {
if (in_array($victim->{'corporation'}->{'id'}, Settings::$WATCHED_ENTITIES['corporations'])){
if (isset($victim->{'corporation_id'})) {
if (in_array($victim->{'corporation_id'}, Settings::$WATCHED_ENTITIES['corporations'])){
return true;
}
}

if (isset($victim->{'alliance'}->{'id'})) {
if (in_array($victim->{'alliance'}->{'id'}, Settings::$WATCHED_ENTITIES['alliances'])){
if (isset($victim->{'alliance_id'})) {
if (in_array($victim->{'alliance_id'}, Settings::$WATCHED_ENTITIES['alliances'])){
return true;
}
}
Expand All @@ -167,14 +167,14 @@ private function isAttackerWatched($killmail) {

foreach ($attackers as $attacker) {

if (isset($attacker->{'corporation'}->{'id'})) {
if (in_array($attacker->{'corporation'}->{'id'}, Settings::$WATCHED_ENTITIES['corporations'])){
if (isset($attacker->{'corporation_id'})) {
if (in_array($attacker->{'corporation_id'}, Settings::$WATCHED_ENTITIES['corporations'])){
return true;
}
}

if (isset($attacker->{'alliance'}->{'id'})) {
if (in_array($attacker->{'alliance'}->{'id'}, Settings::$WATCHED_ENTITIES['alliances'])){
if (isset($attacker->{'alliance_id'})) {
if (in_array($attacker->{'alliance_id'}, Settings::$WATCHED_ENTITIES['alliances'])){
return true;
}
}
Expand Down Expand Up @@ -285,4 +285,3 @@ private function storeKillJson($killId, $data) {
}

}

0 comments on commit f9c7b11

Please sign in to comment.