Made /saconfig clean a senior command

This commit is contained in:
JeromSar 2013-08-12 11:24:23 +02:00
parent 38b1035020
commit 696ec119c6

View File

@ -26,15 +26,15 @@ public class Command_saconfig extends TFM_Command
} }
else else
{ {
if (!senderIsConsole) if (!TFM_SuperadminList.isSeniorAdmin(sender))
{ {
playerMsg("This command may only be used from the console."); playerMsg(TotalFreedomMod.MSG_NO_PERMS);
return true; return true;
} }
if (args[0].equals("clean")) if (args[0].equals("clean"))
{ {
TFM_Util.adminAction(sender.getName(), "Cleaning superadmin list.", true); TFM_Util.adminAction(sender.getName(), "Cleaning superadmin list", true);
TFM_SuperadminList.cleanSuperadminList(true); TFM_SuperadminList.cleanSuperadminList(true);
playerMsg("Superadmins: " + StringUtils.join(TFM_SuperadminList.getSuperadminNames(), ", "), ChatColor.YELLOW); playerMsg("Superadmins: " + StringUtils.join(TFM_SuperadminList.getSuperadminNames(), ", "), ChatColor.YELLOW);
} }
@ -165,7 +165,7 @@ public class Command_saconfig extends TFM_Command
else if ("disabled".equals(reply)) else if ("disabled".equals(reply))
{ {
TFM_Util.playerMsg(sender, "Warning: Could not check if player has a twitter handle!"); TFM_Util.playerMsg(sender, "Warning: Could not check if player has a twitter handle!");
TFM_Util.playerMsg(sender, "TwitterBot has been temporarily disabled,, please wait until it get re-enabled", ChatColor.RED); TFM_Util.playerMsg(sender, "TwitterBot has been temporarily disabled, please wait until it gets re-enabled", ChatColor.RED);
} }
else if ("failed".equals(reply)) else if ("failed".equals(reply))
{ {