Prevent faction invitations from being accepted programmatically

This commit is contained in:
danielyxie 2019-02-22 11:43:59 -08:00 committed by danielyxie
parent b7157b63e0
commit 880167d76d

@ -748,7 +748,8 @@ const Engine = {
item.appendChild(createElement("a", {
innerText:"Accept Faction Invitation",
class:"a-link-button", display:"inline", margin:"4px", padding:"4px",
clickListener:()=>{
clickListener: (e) => {
if (!e.isTrusted) { return false; }
joinFaction(Factions[factionName]);
for (var i = 0; i < Player.factionInvitations.length; ++i) {
if (Player.factionInvitations[i] == factionName || Factions[Player.factionInvitations[i]].isBanned) {