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
commitb3fc7900009746ad2b5a007b045c0a9d3d015008 (patch)
tree25b50912a0f02b28cd7233b885a947457002cbe3
parent83f9209bcc3edb20d86975ae33e608005ece555b (diff)
downloadEssentials-b3fc7900009746ad2b5a007b045c0a9d3d015008.tar
Essentials-b3fc7900009746ad2b5a007b045c0a9d3d015008.tar.gz
Essentials-b3fc7900009746ad2b5a007b045c0a9d3d015008.tar.lz
Essentials-b3fc7900009746ad2b5a007b045c0a9d3d015008.tar.xz
Essentials-b3fc7900009746ad2b5a007b045c0a9d3d015008.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)