Prevent clans from spamming users with invites

This commit is contained in:
AlexTheCoder 2017-08-26 02:52:37 -04:00
parent 1ac59b409b
commit f487d2f3af

View File

@ -1228,6 +1228,12 @@ public class ClansUtility
UtilPlayer.message(caller, F.main("Clans", "You cannot invite more members until you remove some allies."));
return;
}
if (clan.getInviteeMap().containsKey(target.getName()))
{
UtilPlayer.message(caller, F.main("Clans", "Your Clan has already invited " + F.elem(target.getName()) + "."));
return;
}
// Inform
clan.inform(F.name(caller.getName()) + " invited " + F.name(target.getName()) + " to join your Clan.", caller.getName());