Fix exploit with /tpaccept if sender no longer has permission

This commit is contained in:
Wolvereness 2012-02-09 23:14:57 -06:00
parent f0ee026fb9
commit 9efd0eb6f9

View file

@ -22,7 +22,7 @@ public class Commandtpaccept extends EssentialsCommand
final User target = user.getTeleportRequest();
if (target == null
|| target.getBase() instanceof OfflinePlayer
|| (user.isTeleportRequestHere() && !target.isAuthorized("essentials.tpahere")))
|| (user.isTeleportRequestHere() ? !target.isAuthorized("essentials.tpahere") : !target.isAuthorized("essentials.tpa")))
{
throw new Exception(_("noPendingRequest"));
}