diff --git a/docs/commands.md b/docs/commands.md
index edb4a3b94..00f4f8c61 100644
--- a/docs/commands.md
+++ b/docs/commands.md
@@ -1,5 +1,5 @@
-
+
## AuthMe Commands
You can use the following commands to use the features of AuthMe. Mandatory arguments are marked with `< >`
@@ -32,7 +32,7 @@ brackets; optional arguments are enclosed in square brackets (`[ ]`).
Requires `authme.admin.firstspawn`
- **/authme setfirstspawn**: Change the first player's spawn to your current position.
Requires `authme.admin.setfirstspawn`
-- **/authme purge** <days>: Purge old AuthMeReloaded data longer than the specified amount of days ago.
+- **/authme purge** <days> [all]: Purge old AuthMeReloaded data longer than the specified amount of days ago.
Requires `authme.admin.purge`
- **/authme resetpos** <player/*>: Purge the last know position of the specified player or all of them.
Requires `authme.admin.purgelastpos`
@@ -66,7 +66,7 @@ brackets; optional arguments are enclosed in square brackets (`[ ]`).
Requires `authme.player.email.add`
- **/email change** <oldEmail> <newEmail>: Change an email address of your account.
Requires `authme.player.email.change`
-- **/email recover** <email>: Recover your account using an Email address by sending a mail containing a new password.
+- **/email recover** <email> [code]: Recover your account using an Email address by sending a mail containing a new password.
Requires `authme.player.email.recover`
- **/email help** [query]: View detailed help for /email commands.
- **/captcha** <captcha>: Captcha command for AuthMeReloaded.
@@ -76,4 +76,4 @@ brackets; optional arguments are enclosed in square brackets (`[ ]`).
---
-This page was automatically generated on the [AuthMe-Team/AuthMeReloaded repository](https://github.com/AuthMe-Team/AuthMeReloaded/tree/master/docs/) on Wed Jun 22 17:39:14 EDT 2016
+This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sat Oct 01 23:33:39 CEST 2016
diff --git a/docs/hash_algorithms.md b/docs/hash_algorithms.md
index 8c141a27e..e7fd0ae36 100644
--- a/docs/hash_algorithms.md
+++ b/docs/hash_algorithms.md
@@ -1,5 +1,5 @@
-
+
## Hash Algorithms
AuthMe supports the following hash algorithms for storing your passwords safely.
@@ -17,7 +17,7 @@ JOOMLA | Recommended | 65 | | | Text | 32 |
MD5 | Do not use | 32 | | | None | |
MD5VB | Acceptable | 56 | | | Text | 16 |
MYBB | Acceptable | 32 | | | Text | 8 | Y
-PBKDF2 | Does not work | 328 | | | Text | 12 |
+PBKDF2 | Does not work | 332 | | | Text | 12 |
PBKDF2DJANGO | Acceptable | 77 | Y | | Text | 12 |
PHPBB | Acceptable | 34 | | | Text | 16 |
PHPFUSION | Do not use | 64 | Y | | | | Y
@@ -82,4 +82,4 @@ or bad.
---
-This page was automatically generated on the [AuthMe-Team/AuthMeReloaded repository](https://github.com/AuthMe-Team/AuthMeReloaded/tree/master/docs/) on Wed Jun 22 17:39:16 EDT 2016
+This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sat Oct 01 23:42:20 CEST 2016
diff --git a/docs/permission_nodes.md b/docs/permission_nodes.md
index e501736cd..9acaa7131 100644
--- a/docs/permission_nodes.md
+++ b/docs/permission_nodes.md
@@ -1,11 +1,12 @@
-
+
## AuthMe Permission Nodes
The following are the permission nodes that are currently supported by the latest dev builds.
- **authme.admin.*** – Give access to all admin commands.
- **authme.admin.accounts** – Administrator command to see all accounts associated with a user.
+- **authme.admin.antibotmessages** – Administrator command to reload the plugin configuration.
- **authme.admin.changemail** – Administrator command to set or change the email address of a user.
- **authme.admin.changepassword** – Administrator command to change the password of a user.
- **authme.admin.converter** – Administrator command to convert old or other data to AuthMe data.
@@ -46,4 +47,4 @@ The following are the permission nodes that are currently supported by the lates
---
-This page was automatically generated on the [AuthMe-Team/AuthMeReloaded repository](https://github.com/AuthMe-Team/AuthMeReloaded/tree/master/docs/) on Wed Jun 22 17:39:29 EDT 2016
+This page was automatically generated on the [AuthMe/AuthMeReloaded repository](https://github.com/AuthMe/AuthMeReloaded/tree/master/docs/) on Sat Oct 01 23:34:27 CEST 2016
diff --git a/src/test/java/fr/xephi/authme/AntiBotTest.java b/src/test/java/fr/xephi/authme/AntiBotTest.java
index d00bca63d..2b46bab10 100644
--- a/src/test/java/fr/xephi/authme/AntiBotTest.java
+++ b/src/test/java/fr/xephi/authme/AntiBotTest.java
@@ -2,6 +2,7 @@ package fr.xephi.authme;
import fr.xephi.authme.output.MessageKey;
import fr.xephi.authme.output.Messages;
+import fr.xephi.authme.permission.AdminPermission;
import fr.xephi.authme.permission.PermissionsManager;
import fr.xephi.authme.permission.PlayerStatePermission;
import fr.xephi.authme.settings.Settings;
@@ -15,6 +16,7 @@ import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
+import java.util.Arrays;
import java.util.List;
import static fr.xephi.authme.util.BukkitService.TICKS_PER_MINUTE;
@@ -115,20 +117,25 @@ public class AntiBotTest {
@Test
public void shouldActivateAntiBot() {
// given
- given(messages.retrieve(MessageKey.ANTIBOT_AUTO_ENABLED_MESSAGE))
- .willReturn(new String[]{"Test line #1", "Test line #2"});
int duration = 300;
given(settings.getProperty(ProtectionSettings.ANTIBOT_DURATION)).willReturn(duration);
AntiBot antiBot = createListeningAntiBot();
+ List onlinePlayers = Arrays.asList(mock(Player.class), mock(Player.class), mock(Player.class));
+ given(bukkitService.getOnlinePlayers()).willReturn((List) onlinePlayers);
+ given(permissionsManager.hasPermission(onlinePlayers.get(0), AdminPermission.ANTIBOT_MESSAGES)).willReturn(true);
+ given(permissionsManager.hasPermission(onlinePlayers.get(1), AdminPermission.ANTIBOT_MESSAGES)).willReturn(false);
+ given(permissionsManager.hasPermission(onlinePlayers.get(2), AdminPermission.ANTIBOT_MESSAGES)).willReturn(true);
// when
antiBot.activateAntiBot();
// then
assertThat(antiBot.getAntiBotStatus(), equalTo(AntiBot.AntiBotStatus.ACTIVE));
- ArgumentCaptor captor = ArgumentCaptor.forClass(String.class);
- verify(messages, times(2)).send(captor.capture());
- assertThat(captor.getAllValues(), contains("Test line #1", "Test line #2"));
+ verify(bukkitService).getOnlinePlayers();
+ verify(permissionsManager, times(3)).hasPermission(any(Player.class), eq(AdminPermission.ANTIBOT_MESSAGES));
+ verify(messages).send(onlinePlayers.get(0), MessageKey.ANTIBOT_AUTO_ENABLED_MESSAGE);
+ verify(messages, never()).send(onlinePlayers.get(1), MessageKey.ANTIBOT_AUTO_ENABLED_MESSAGE);
+ verify(messages).send(onlinePlayers.get(2), MessageKey.ANTIBOT_AUTO_ENABLED_MESSAGE);
long expectedTicks = duration * TICKS_PER_MINUTE;
verify(bukkitService).scheduleSyncDelayedTask(any(Runnable.class), eq(expectedTicks));
}
diff --git a/src/test/java/tools/hashmethods/EncryptionMethodInfoGatherer.java b/src/test/java/tools/hashmethods/EncryptionMethodInfoGatherer.java
index 23fa6d6b2..057f14bbb 100644
--- a/src/test/java/tools/hashmethods/EncryptionMethodInfoGatherer.java
+++ b/src/test/java/tools/hashmethods/EncryptionMethodInfoGatherer.java
@@ -152,7 +152,7 @@ public class EncryptionMethodInfoGatherer {
// By passing some bogus "package" to the constructor, the injector will throw if it needs to
// instantiate any dependency other than what we provide.
- Injector injector = new InjectorBuilder().addDefaultHandlers("!!No package!!").create();
+ Injector injector = new InjectorBuilder().addDefaultHandlers("fr.xephi.authme.security.crypts").create();
injector.register(Settings.class, settings);
return injector;
}