Skip to content

Commit

Permalink
Fixed a bug that caused parsing the XML of the memberlog of the World…
Browse files Browse the repository at this point in the history
… Assembly to fail.
  • Loading branch information
Agadar committed Mar 12, 2018
1 parent 53ea589 commit 48b4d6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- General properties -->
<groupId>com.github.agadar</groupId>
<artifactId>nationstates-api-java-wrapper</artifactId>
<version>4.0.2</version>
<version>4.0.3</version>
<packaging>jar</packaging>
<name>NationStates API Java Wrapper</name>
<description>A Java library for consuming the NationStates API.</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ public boolean isOfSpecializedType(Happening happening) {
if (happening.description == null) {
return false;
}
return happening.description.contains("was ejected from") || happening.description.contains("banned");
return (happening.description.contains("was ejected from")
&& !happening.description.contains("was ejected from the WA for rule violations"))
|| happening.description.contains("banned");
}

@Override
Expand All @@ -42,7 +44,7 @@ public EjectedHappening toSpecializedType(Happening happening) {
final String fromRegion = splitOnPercent[1];

return new EjectedHappening(happening.id, happening.timestamp, happening.description, ejectingNation,
ejectedNation, banned, fromRegion);
ejectedNation, banned, fromRegion);
}

}

0 comments on commit 48b4d6d

Please sign in to comment.