/gadmin: return false if required args are not present. Resolves #220

This commit is contained in:
unknown 2014-06-28 12:00:16 +02:00
parent d193686c79
commit 2f055fbecb
3 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Sat Jun 28 11:45:35 CEST 2014
build.number=887
#Sat Jun 28 11:59:25 CEST 2014
build.number=888

View File

@ -1,6 +1,6 @@
#
# TotalFreedomMod banning config
# Warning: modification of this file is not recomended
# Warning: modification of this file is not recommended
#
# Format:
# Ip: [IP-address / UUID]:[Last login name]:[Expiry unix timestamp (0 = never)][Banned by]:[Reason]

View File

@ -25,7 +25,7 @@ public class Command_gadmin extends TFM_Command
return false;
}
String mode = args[0].toLowerCase();
final String mode = args[0].toLowerCase();
if (mode.equals("list"))
{
@ -42,7 +42,14 @@ public class Command_gadmin extends TFM_Command
ChatColor.stripColor(player.getDisplayName()),
hash));
}
else if (hash.equalsIgnoreCase(args[1]))
if (args.length < 2)
{
return false;
}
if (hash.equalsIgnoreCase(args[1]))
{
if (mode.equals("kick"))
{