Remove redundant messaging. Fixes #276

When informing faction members, if the command sender is part of the
faction, do not send another message to him because he has already been
informed.
This commit is contained in:
Nick Porillo 2015-02-19 10:49:38 -05:00 committed by drtshock
parent 1d00a0aa54
commit 0aea7c6b9d
1 changed files with 5 additions and 1 deletions

View File

@ -38,10 +38,14 @@ public class CmdPermanentPower extends FCommand {
change = TL.COMMAND_PERMANENTPOWER_GRANT.toString();
}
// Inform sender
msg(TL.COMMAND_PERMANENTPOWER_SUCCESS, change, targetFaction.describeTo(fme));
// Inform all players
// Inform all other players
for (FPlayer fplayer : targetFaction.getFPlayersWhereOnline(true)) {
if(fplayer == fme) {
continue;
}
String blame = (fme == null ? TL.GENERIC_SERVERADMIN.toString() : fme.describeTo(fplayer, true));
fplayer.msg(TL.COMMAND_PERMANENTPOWER_FACTION, blame, change);
}