Show if a IP is ip-banned on /seen <ip>

This commit is contained in:
KHobbits 2013-07-19 02:25:50 +01:00
parent 59515aed94
commit c1e39c7007
18 changed files with 27 additions and 0 deletions

View File

@ -54,6 +54,10 @@ public class Commandseen extends EssentialsCommand
seenIP(server, sender, args[0]);
return;
}
else if (FormatUtil.validIP(args[0]) && (server.getIPBans().contains(args[0]))) {
sender.sendMessage(_("isIpBanned", args[0]));
return;
}
else
{
throw new PlayerNotFoundException();
@ -132,6 +136,12 @@ public class Commandseen extends EssentialsCommand
private void seenIP(final Server server, final CommandSender sender, final String ipAddress) throws Exception
{
final UserMap userMap = ess.getUserMap();
if (server.getIPBans().contains(ipAddress))
{
sender.sendMessage(_("isIpBanned", ipAddress));
}
sender.sendMessage(_("runningPlayerMatch", ipAddress));
ess.runTaskAsynchronously(new Runnable()

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -527,3 +527,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.

View File

@ -522,3 +522,4 @@ localNoOne=
totalSellableAll=\u00a7aThe total worth of all sellable items and blocks is \u00a7c{1}\u00a7a.
totalSellableBlocks=\u00a7aThe total worth of all sellable blocks is \u00a7c{1}\u00a7a.
radiusTooBig=\u00a74Radius is too big! Maximum radius is {0}.
isIpBanned=\u00a76IP \u00a7c{0} \u00a76is banned.