summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorementalo <suror@gmx.co.uk>2011-07-16 01:05:11 +0100
committerementalo <suror@gmx.co.uk>2011-07-16 01:05:11 +0100
commit1696d7ae71c9aa8682d127b788067617e38fda60 (patch)
tree103ddc59ed0e678da2249ca598d5b2e17cdbeea0
parentad8ad8b574e3734269c2c0adba4dd52aa476c1bb (diff)
downloadEssentials-1696d7ae71c9aa8682d127b788067617e38fda60.tar
Essentials-1696d7ae71c9aa8682d127b788067617e38fda60.tar.gz
Essentials-1696d7ae71c9aa8682d127b788067617e38fda60.tar.lz
Essentials-1696d7ae71c9aa8682d127b788067617e38fda60.tar.xz
Essentials-1696d7ae71c9aa8682d127b788067617e38fda60.zip
Test #393 adding optional ban reason with tempban /tempban player time reason, also adding essentials.tempban.exempt
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandtempban.java7
-rw-r--r--Essentials/src/messages.properties1
-rw-r--r--Essentials/src/messages_da.properties1
-rw-r--r--Essentials/src/messages_de.properties1
-rw-r--r--Essentials/src/messages_en.properties1
-rw-r--r--Essentials/src/messages_fr.properties1
-rw-r--r--Essentials/src/messages_nl.properties1
7 files changed, 11 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java b/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java
index ffa63597d..291efd02d 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandtempban.java
@@ -20,12 +20,15 @@ public class Commandtempban extends EssentialsCommand
{
throw new NotEnoughArgumentsException();
}
-
final User player = getPlayer(server, args, 0, true);
+ if(player.isAuthorized("essentials.tempban.exempt"))
+ {
+ sender.sendMessage(Util.i18n("tempbanExempt"));
+ }
final String time = getFinalArg(args, 1);
final long banTimestamp = Util.parseDateDiff(time, true);
- final String banReason = Util.format("tempBanned", Util.formatDateDiff(banTimestamp));
+ final String banReason = (args.length == 3 && !args[2].isEmpty()) ? args[2].toString() + " - " + Util.formatDateDiff(banTimestamp) : Util.format("tempBanned", Util.formatDateDiff(banTimestamp));
player.setBanReason(banReason);
player.setBanTimeout(banTimestamp);
player.kickPlayer(banReason);
diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties
index a968d4153..cd7607c24 100644
--- a/Essentials/src/messages.properties
+++ b/Essentials/src/messages.properties
@@ -256,6 +256,7 @@ teleportationEnabled = \u00a77Teleportation enabled.
teleporting = \u00a77Teleporting...
teleportingPortal = \u00a77Teleporting via portal.
tempBanned = Temporarily banned from server for {0}
+tempbanExempt = \u00a77You may not tempban that player
thunder = You {0} thunder in your world
thunderDuration = You {0} thunder in your world for {1} seconds.
timeBeforeHeal = Time before next heal: {0}
diff --git a/Essentials/src/messages_da.properties b/Essentials/src/messages_da.properties
index e471b7dd0..bd0352289 100644
--- a/Essentials/src/messages_da.properties
+++ b/Essentials/src/messages_da.properties
@@ -258,6 +258,7 @@ teleportationEnabled = \u00a77Teleportering aktiveret.
teleporting = \u00a77Teleportere...
teleportingPortal = \u00a77Teleporterede via portal.
tempBanned = Midlertidigt bannet fra serveren for {0}
+tempbanExempt = \u00a77You may not tempban that player
thunder = Du {0} torden i din verden
thunderDuration = Du {0} torden i din verden i {1} sekunder.
timeBeforeHeal = Tid inden n\u00e6ste helbredelse: {0}
diff --git a/Essentials/src/messages_de.properties b/Essentials/src/messages_de.properties
index a01c0e211..cfc7f41e4 100644
--- a/Essentials/src/messages_de.properties
+++ b/Essentials/src/messages_de.properties
@@ -256,6 +256,7 @@ teleportationEnabled = \u00a77Teleportierung aktiviert.
teleporting = \u00a77Teleportiere...
teleportingPortal = \u00a77Teleportiere durch Portal.
tempBanned = Zeitlich gesperrt vom Server f\u00fcr {0}
+tempbanExempt = \u00a77You may not tempban that player
thunder = Du hast Donner in deiner Welt {0}.
thunderDuration = Du hast Donner in deiner Welt {0} f\u00fcr {1} Sekunden.
timeBeforeHeal = Zeit bis zur n\u00e4chsten Heilung: {0}
diff --git a/Essentials/src/messages_en.properties b/Essentials/src/messages_en.properties
index 7d838ed09..b8d479a78 100644
--- a/Essentials/src/messages_en.properties
+++ b/Essentials/src/messages_en.properties
@@ -256,6 +256,7 @@ teleportationEnabled = \u00a77Teleportation enabled.
teleporting = \u00a77Teleporting...
teleportingPortal = \u00a77Teleporting via portal.
tempBanned = Temporarily banned from server for {0}
+tempbanExempt = \u00a77You may not tempban that player
thunder = You {0} thunder in your world
thunderDuration = You {0} thunder in your world for {1} seconds.
timeBeforeHeal = Time before next heal: {0}
diff --git a/Essentials/src/messages_fr.properties b/Essentials/src/messages_fr.properties
index bbdd5888a..e5591cb96 100644
--- a/Essentials/src/messages_fr.properties
+++ b/Essentials/src/messages_fr.properties
@@ -256,6 +256,7 @@ teleportationEnabled = \u00a77T\u00e9l\u00e9portation activ\u00e9e.
teleporting = \u00a77T\u00e9l\u00e9poration en cours...
teleportingPortal = \u00a77T\u00e9l\u00e9portation via portail.
tempBanned = Banni temporairement du serveur pour {0}
+tempbanExempt = \u00a77You may not tempban that player
thunder = Vous avez {0} la foudre dans votre monde.
thunderDuration = Vous avez {0} la foudre dans le serveur {1} secondes.
timeBeforeHeal = Temps avant le prochain soin : {0}
diff --git a/Essentials/src/messages_nl.properties b/Essentials/src/messages_nl.properties
index 5ce098bdf..5091b6d42 100644
--- a/Essentials/src/messages_nl.properties
+++ b/Essentials/src/messages_nl.properties
@@ -257,6 +257,7 @@ teleportationEnabled = \u00a77Teleportatie ingeschakeld.
teleporting = \u00a77Bezig met teleporteren...
teleportingPortal = \u00a77Bezig met teleporteren via de portal.
tempBanned = Tijdelijk geband voor {0}
+tempbanExempt = \u00a77You may not tempban that player
thunder = Je {0} onweert de wereld
thunderDuration = Je {0} onweert de wereld voor {1} seconde.
timeBeforeHeal = Afkoeltijd tot de volgende heal: {0}