Merge pull request #255 from hydroflame/fix-join-banned-faction-exploit

fix faction join exploit
This commit is contained in:
danielyxie 2018-05-30 17:30:22 -05:00 committed by GitHub
commit 496ea728d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -738,9 +738,9 @@ let Engine = {
clickListener:()=>{
joinFaction(Factions[factionName]);
for (var i = 0; i < Player.factionInvitations.length; ++i) {
if (Player.factionInvitations[i] == factionName) {
if (Player.factionInvitations[i] == factionName || Factions[Player.factionInvitations[i]].isBanned) {
Player.factionInvitations.splice(i, 1);
break;
i--;
}
}
Engine.displayFactionsInfo();