summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-02-09 22:11:46 +0000
committerKHobbits <rob@khobbits.co.uk>2012-02-09 22:11:46 +0000
commite6b4b61ed25957c470fa6e31113a91e24138305c (patch)
tree4e44822a64094010aa8ab3a38395afb335827e50
parent6c6e960aa08ce73efb67714b1714d6e954556bc4 (diff)
downloadEssentials-e6b4b61ed25957c470fa6e31113a91e24138305c.tar
Essentials-e6b4b61ed25957c470fa6e31113a91e24138305c.tar.gz
Essentials-e6b4b61ed25957c470fa6e31113a91e24138305c.tar.lz
Essentials-e6b4b61ed25957c470fa6e31113a91e24138305c.tar.xz
Essentials-e6b4b61ed25957c470fa6e31113a91e24138305c.zip
New Permission: essentials.sudo.exempt
If a user has this perm, they cannot be controlled.
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandsudo.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java
index 7f758ad2e..86394e502 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandsudo.java
@@ -30,7 +30,13 @@ public class Commandsudo extends EssentialsCommand
}
//TODO: Translate this.
- sender.sendMessage("Running the command as " + user.getDisplayName());
+ if (user.isAuthorized("essentials.sudo.exempt"))
+ {
+ throw new Exception("You cannot sudo this user");
+ }
+
+ //TODO: Translate this.
+ sender.sendMessage("Forcing " + user.getDisplayName() + " to run: /" + command + " " + arguments);
final PluginCommand execCommand = ess.getServer().getPluginCommand(command);
if (execCommand != null)