Merge master into 'move-convert-command'

This commit is contained in:
ljacqu 2016-02-14 22:32:12 +01:00
commit ecc3048f52
46 changed files with 384 additions and 177 deletions

View File

@ -1,12 +1,11 @@
<!-- AUTO-GENERATED FILE! Do not edit this directly --> <!-- AUTO-GENERATED FILE! Do not edit this directly -->
<!-- File auto-generated on Sat Dec 26 14:05:00 CET 2015. See commands/commands.tpl.md --> <!-- File auto-generated on Sun Feb 14 19:00:30 CET 2016. See commands/commands.tpl.md -->
## AuthMe Commands ## AuthMe Commands
You can use the following commands to use the features of AuthMe. Mandatory arguments are marked with `< >` You can use the following commands to use the features of AuthMe. Mandatory arguments are marked with `< >`
brackets; optional arguments are enclosed in square brackets (`[ ]`). brackets; optional arguments are enclosed in square brackets (`[ ]`).
- **/authme**: The main AuthMeReloaded command. The root for all admin commands. - **/authme**: The main AuthMeReloaded command. The root for all admin commands.
- **/authme help** [query]: View detailed help pages about AuthMeReloaded commands.
- **/authme register** &lt;player> &lt;password>: Register the specified player with the specified password. - **/authme register** &lt;player> &lt;password>: Register the specified player with the specified password.
<br />Requires `authme.admin.register` <br />Requires `authme.admin.register`
- **/authme unregister** &lt;player>: Unregister the specified player. - **/authme unregister** &lt;player>: Unregister the specified player.
@ -19,9 +18,9 @@ brackets; optional arguments are enclosed in square brackets (`[ ]`).
<br />Requires `authme.admin.lastlogin` <br />Requires `authme.admin.lastlogin`
- **/authme accounts** [player]: Display all accounts of a player by his player name or IP. - **/authme accounts** [player]: Display all accounts of a player by his player name or IP.
<br />Requires `authme.admin.accounts` <br />Requires `authme.admin.accounts`
- **/authme getemail** [player]: Display the email address of the specified player if set. - **/authme email** [player]: Display the email address of the specified player if set.
<br />Requires `authme.admin.getemail` <br />Requires `authme.admin.getemail`
- **/authme chgemail** &lt;player> &lt;email>: Change the email address of the specified player. - **/authme setemail** &lt;player> &lt;email>: Change the email address of the specified player.
<br />Requires `authme.admin.changemail` <br />Requires `authme.admin.changemail`
- **/authme getip** &lt;player>: Get the IP address of the specified online player. - **/authme getip** &lt;player>: Get the IP address of the specified online player.
<br />Requires `authme.admin.getip` <br />Requires `authme.admin.getip`
@ -35,7 +34,7 @@ brackets; optional arguments are enclosed in square brackets (`[ ]`).
<br />Requires `authme.admin.setfirstspawn` <br />Requires `authme.admin.setfirstspawn`
- **/authme purge** &lt;days>: Purge old AuthMeReloaded data longer than the specified amount of days ago. - **/authme purge** &lt;days>: Purge old AuthMeReloaded data longer than the specified amount of days ago.
<br />Requires `authme.admin.purge` <br />Requires `authme.admin.purge`
- **/authme resetpos** &lt;player>: Purge the last know position of the specified player. - **/authme resetpos** &lt;player/*>: Purge the last know position of the specified player or all of them.
<br />Requires `authme.admin.purgelastpos` <br />Requires `authme.admin.purgelastpos`
- **/authme purgebannedplayers**: Purge all AuthMeReloaded data for banned players. - **/authme purgebannedplayers**: Purge all AuthMeReloaded data for banned players.
<br />Requires `authme.admin.purgebannedplayers` <br />Requires `authme.admin.purgebannedplayers`
@ -44,33 +43,38 @@ brackets; optional arguments are enclosed in square brackets (`[ ]`).
- **/authme reload**: Reload the AuthMeReloaded plugin. - **/authme reload**: Reload the AuthMeReloaded plugin.
<br />Requires `authme.admin.reload` <br />Requires `authme.admin.reload`
- **/authme version**: Show detailed information about the installed AuthMeReloaded version, the developers, contributors, and license. - **/authme version**: Show detailed information about the installed AuthMeReloaded version, the developers, contributors, and license.
- **/authme help** [query]: View detailed help for /authme commands.
- **/login** &lt;password>: Command to log in using AuthMeReloaded. - **/login** &lt;password>: Command to log in using AuthMeReloaded.
<br />Requires `authme.player.login` <br />Requires `authme.player.login`
- **/login help** [query]: View detailed help pages about AuthMeReloaded login commands. - **/login help** [query]: View detailed help for /login commands.
- **/logout**: Command to logout using AuthMeReloaded. - **/logout**: Command to logout using AuthMeReloaded.
<br />Requires `authme.player.logout` <br />Requires `authme.player.logout`
- **/logout help** [query]: View detailed help pages about AuthMeReloaded logout commands. - **/logout help** [query]: View detailed help for /logout commands.
- **/register** &lt;password> [verifyPassword]: Command to register using AuthMeReloaded. - **/register** [password] [verifyPassword]: Command to register using AuthMeReloaded.
<br />Requires `authme.player.register` <br />Requires `authme.player.register`
- **/register help** [query]: View detailed help pages about AuthMeReloaded register commands. - **/register help** [query]: View detailed help for /register commands.
- **/unreg** &lt;password>: Command to unregister using AuthMeReloaded. - **/unreg** &lt;password>: Command to unregister using AuthMeReloaded.
<br />Requires `authme.player.unregister` <br />Requires `authme.player.unregister`
- **/unreg help** [query]: View detailed help pages about AuthMeReloaded unregister commands. - **/unreg help** [query]: View detailed help for /unreg commands.
- **/changepassword** &lt;oldPassword> &lt;newPassword>: Command to change your password using AuthMeReloaded. - **/changepassword** &lt;oldPassword> &lt;newPassword>: Command to change your password using AuthMeReloaded.
<br />Requires `authme.player.changepassword` <br />Requires `authme.player.changepassword`
- **/changepassword help** [query]: View detailed help pages about AuthMeReloaded changepassword commands. - **/changepassword help** [query]: View detailed help for /changepassword commands.
- **/email**: The AuthMeReloaded Email command base. - **/email**: The AuthMeReloaded Email command base.
- **/email help** [query]: View detailed help pages about AuthMeReloaded email commands.
- **/email add** &lt;email> &lt;verifyEmail>: Add a new email address to your account. - **/email add** &lt;email> &lt;verifyEmail>: Add a new email address to your account.
<br />Requires `authme.player.email.add` <br />Requires `authme.player.email.add`
- **/email change** &lt;oldEmail> &lt;newEmail>: Change an email address of your account. - **/email change** &lt;oldEmail> &lt;newEmail>: Change an email address of your account.
<br />Requires `authme.player.email.change` <br />Requires `authme.player.email.change`
- **/email recover** &lt;email>: Recover your account using an Email address by sending a mail containing a new password. - **/email recover** &lt;email>: Recover your account using an Email address by sending a mail containing a new password.
<br />Requires `authme.player.email.recover` <br />Requires `authme.player.email.recover`
- **/email help** [query]: View detailed help for /email commands.
- **/captcha** &lt;captcha>: Captcha command for AuthMeReloaded. - **/captcha** &lt;captcha>: Captcha command for AuthMeReloaded.
<br />Requires `authme.player.captcha` <br />Requires `authme.player.captcha`
- **/captcha help** [query]: View detailed help pages about AuthMeReloaded captcha commands. - **/captcha help** [query]: View detailed help for /captcha commands.
- **/authme converter** &lt;job>: Converter command for AuthMeReloaded. - **/converter** &lt;job>: Converter command for AuthMeReloaded.
<br />Requires `authme.admin.converter` <br />Requires `authme.admin.converter`
- **/authme converter help** [query]: View detailed help pages about AuthMeReloaded converter commands. - **/converter help** [query]: View detailed help for /converter commands.
---
This page was automatically generated on the [AuthMe-Team/AuthMeReloaded repository](https://github.com/AuthMe-Team/AuthMeReloaded/tree/master/docs/) on Sun Feb 14 19:00:30 CET 2016

View File

@ -1,5 +1,5 @@
<!-- AUTO-GENERATED FILE! Do not edit this directly --> <!-- AUTO-GENERATED FILE! Do not edit this directly -->
<!-- File auto-generated on Thu Dec 31 13:41:44 CET 2015. See hashmethods/hash_algorithms.tpl.md --> <!-- File auto-generated on Sun Feb 14 19:00:32 CET 2016. See hashmethods/hash_algorithms.tpl.md -->
## Hash Algorithms ## Hash Algorithms
AuthMe supports the following hash algorithms for storing your passwords safely. AuthMe supports the following hash algorithms for storing your passwords safely.
@ -12,6 +12,7 @@ BCRYPT2Y | Recommended | 60 | | | Text | 22 |
CRAZYCRYPT1 | Do not use | 128 | | | Username | | CRAZYCRYPT1 | Do not use | 128 | | | Username | |
DOUBLEMD5 | Do not use | 32 | | | None | | DOUBLEMD5 | Do not use | 32 | | | None | |
IPB3 | Acceptable | 32 | | | Text | 5 | Y IPB3 | Acceptable | 32 | | | Text | 5 | Y
IPB4 | Does not work | 60 | | | Text | 22 | Y
JOOMLA | Recommended | 65 | | | Text | 32 | JOOMLA | Recommended | 65 | | | Text | 32 |
MD5 | Do not use | 32 | | | None | | MD5 | Do not use | 32 | | | None | |
MD5VB | Acceptable | 56 | | | Text | 16 | MD5VB | Acceptable | 56 | | | Text | 16 |
@ -27,11 +28,13 @@ SHA1 | Do not use | 40 | | | None | |
SHA256 | Recommended | 86 | | | Text | 16 | SHA256 | Recommended | 86 | | | Text | 16 |
SHA512 | Do not use | 128 | | | None | | SHA512 | Do not use | 128 | | | None | |
SMF | Do not use | 40 | | | Username | | SMF | Do not use | 40 | | | Username | |
TWO_FACTOR | Does not work | 16 | | | None | |
WBB3 | Acceptable | 40 | | | Text | 40 | Y WBB3 | Acceptable | 40 | | | Text | 40 | Y
WBB4 | Does not work | 60 | | | Text | 8 | WBB4 | Recommended | 60 | | | Text | 8 |
WHIRLPOOL | Do not use | 128 | | | None | | WHIRLPOOL | Do not use | 128 | | | None | |
WORDPRESS | Do not use | 34 | | | Text | 9 | WORDPRESS | Acceptable | 34 | | | Text | 9 |
XAUTH | Recommended | 140 | | | Text | 12 | XAUTH | Recommended | 140 | | | Text | 12 |
XFBCRYPT | | 60 | | | | |
CUSTOM | | | | | | | | CUSTOM | | | | | | | |
<!-- AUTO-GENERATED FILE! Do not edit this directly --> <!-- AUTO-GENERATED FILE! Do not edit this directly -->
@ -76,3 +79,7 @@ If this column is empty when the salt type is "Text", it typically means the sal
##### Separate ##### Separate
If denoted with a **y**, it means that the salt is stored in a separate column in the database. This is neither good If denoted with a **y**, it means that the salt is stored in a separate column in the database. This is neither good
or bad. or bad.
---
This page was automatically generated on the [AuthMe-Team/AuthMeReloaded repository](https://github.com/AuthMe-Team/AuthMeReloaded/tree/master/docs/) on Sun Feb 14 19:00:32 CET 2016

View File

@ -1,5 +1,5 @@
<!-- AUTO-GENERATED FILE! Do not edit this directly --> <!-- AUTO-GENERATED FILE! Do not edit this directly -->
<!-- File auto-generated on Sun Feb 14 14:11:28 CET 2016. See permissions/permission_nodes.tpl.md --> <!-- File auto-generated on Sun Feb 14 19:00:34 CET 2016. See permissions/permission_nodes.tpl.md -->
## AuthMe Permission Nodes ## AuthMe Permission Nodes
The following are the permission nodes that are currently supported by the latest dev builds. The following are the permission nodes that are currently supported by the latest dev builds.
@ -42,3 +42,7 @@ The following are the permission nodes that are currently supported by the lates
- **authme.player.unregister** Command permission to unregister. - **authme.player.unregister** Command permission to unregister.
- **authme.vip** Permission node to identify VIP users. - **authme.vip** Permission node to identify VIP users.
---
This page was automatically generated on the [AuthMe-Team/AuthMeReloaded repository](https://github.com/AuthMe-Team/AuthMeReloaded/tree/master/docs/) on Sun Feb 14 19:00:34 CET 2016

View File

@ -170,6 +170,7 @@
<pattern>org.mcstats</pattern> <pattern>org.mcstats</pattern>
<shadedPattern>fr.xephi.authme</shadedPattern> <shadedPattern>fr.xephi.authme</shadedPattern>
</relocation> </relocation>
<!--
<relocation> <relocation>
<pattern>org.apache</pattern> <pattern>org.apache</pattern>
<shadedPattern>fr.xephi.authme.libs.apache</shadedPattern> <shadedPattern>fr.xephi.authme.libs.apache</shadedPattern>
@ -186,6 +187,7 @@
<pattern>com.sun</pattern> <pattern>com.sun</pattern>
<shadedPattern>fr.xephi.authme.libs.sun</shadedPattern> <shadedPattern>fr.xephi.authme.libs.sun</shadedPattern>
</relocation> </relocation>
-->
<relocation> <relocation>
<pattern>com.zaxxer.hikari</pattern> <pattern>com.zaxxer.hikari</pattern>
<shadedPattern>fr.xephi.authme.libs.hikari</shadedPattern> <shadedPattern>fr.xephi.authme.libs.hikari</shadedPattern>
@ -223,6 +225,7 @@
<pattern>org.mcstats</pattern> <pattern>org.mcstats</pattern>
<shadedPattern>fr.xephi.authme</shadedPattern> <shadedPattern>fr.xephi.authme</shadedPattern>
</relocation> </relocation>
<!--
<relocation> <relocation>
<pattern>org.apache</pattern> <pattern>org.apache</pattern>
<shadedPattern>fr.xephi.authme.libs.apache</shadedPattern> <shadedPattern>fr.xephi.authme.libs.apache</shadedPattern>
@ -239,6 +242,7 @@
<pattern>com.sun</pattern> <pattern>com.sun</pattern>
<shadedPattern>fr.xephi.authme.libs.sun</shadedPattern> <shadedPattern>fr.xephi.authme.libs.sun</shadedPattern>
</relocation> </relocation>
-->
<relocation> <relocation>
<pattern>com.zaxxer.hikari</pattern> <pattern>com.zaxxer.hikari</pattern>
<shadedPattern>fr.xephi.authme.libs.hikari</shadedPattern> <shadedPattern>fr.xephi.authme.libs.hikari</shadedPattern>

View File

@ -164,16 +164,14 @@ public class SQLite implements DataSource {
rs = pst.executeQuery(); rs = pst.executeQuery();
if (rs.next()) { if (rs.next()) {
return buildAuthFromResultSet(rs); return buildAuthFromResultSet(rs);
} else {
return null;
} }
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return null;
} finally { } finally {
close(rs); close(rs);
close(pst); close(pst);
} }
return null;
} }
@Override @Override
@ -210,8 +208,7 @@ public class SQLite implements DataSource {
pst.executeUpdate(); pst.executeUpdate();
} }
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return false;
} finally { } finally {
close(pst); close(pst);
} }
@ -241,13 +238,13 @@ public class SQLite implements DataSource {
pst.setString(2, user); pst.setString(2, user);
} }
pst.executeUpdate(); pst.executeUpdate();
return true;
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return false;
} finally { } finally {
close(pst); close(pst);
} }
return true; return false;
} }
@Override @Override
@ -260,29 +257,25 @@ public class SQLite implements DataSource {
pst.setString(3, auth.getRealName()); pst.setString(3, auth.getRealName());
pst.setString(4, auth.getNickname()); pst.setString(4, auth.getNickname());
pst.executeUpdate(); pst.executeUpdate();
return true;
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return false;
} finally { } finally {
close(pst); close(pst);
} }
return true; return false;
} }
@Override @Override
public int purgeDatabase(long until) { public int purgeDatabase(long until) {
PreparedStatement pst = null; String sql = "DELETE FROM " + tableName + " WHERE " + col.LAST_LOGIN + "<?;";
try { try (PreparedStatement pst = con.prepareStatement(sql)) {
pst = con.prepareStatement("DELETE FROM " + tableName + " WHERE " + col.LAST_LOGIN + "<?;");
pst.setLong(1, until); pst.setLong(1, until);
return pst.executeUpdate(); return pst.executeUpdate();
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return 0;
} finally {
close(pst);
} }
return 0;
} }
@Override @Override
@ -299,12 +292,12 @@ public class SQLite implements DataSource {
} }
return list; return list;
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return new ArrayList<>();
} finally { } finally {
close(rs); close(rs);
close(pst); close(pst);
} }
return new ArrayList<>();
} }
@Override @Override
@ -314,13 +307,13 @@ public class SQLite implements DataSource {
pst = con.prepareStatement("DELETE FROM " + tableName + " WHERE " + col.NAME + "=?;"); pst = con.prepareStatement("DELETE FROM " + tableName + " WHERE " + col.NAME + "=?;");
pst.setString(1, user); pst.setString(1, user);
pst.executeUpdate(); pst.executeUpdate();
return true;
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return false;
} finally { } finally {
close(pst); close(pst);
} }
return true; return false;
} }
@Override @Override
@ -334,13 +327,13 @@ public class SQLite implements DataSource {
pst.setString(4, auth.getWorld()); pst.setString(4, auth.getWorld());
pst.setString(5, auth.getNickname()); pst.setString(5, auth.getNickname());
pst.executeUpdate(); pst.executeUpdate();
return true;
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return false;
} finally { } finally {
close(pst); close(pst);
} }
return true; return false;
} }
@Override @Override
@ -358,29 +351,26 @@ public class SQLite implements DataSource {
} }
return countIp; return countIp;
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return 0;
} finally { } finally {
close(rs); close(rs);
close(pst); close(pst);
} }
return 0;
} }
@Override @Override
public boolean updateEmail(PlayerAuth auth) { public boolean updateEmail(PlayerAuth auth) {
PreparedStatement pst = null; String sql = "UPDATE " + tableName + " SET " + col.EMAIL + "=? WHERE " + col.NAME + "=?;";
try { try (PreparedStatement pst = con.prepareStatement(sql)) {
pst = con.prepareStatement("UPDATE " + tableName + " SET " + col.EMAIL + "=? WHERE " + col.NAME + "=?;");
pst.setString(1, auth.getEmail()); pst.setString(1, auth.getEmail());
pst.setString(2, auth.getNickname()); pst.setString(2, auth.getNickname());
pst.executeUpdate(); pst.executeUpdate();
return true;
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return false;
} finally {
close(pst);
} }
return true; return false;
} }
@Override @Override
@ -388,7 +378,7 @@ public class SQLite implements DataSource {
try { try {
con.close(); con.close();
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
} }
} }
@ -401,7 +391,7 @@ public class SQLite implements DataSource {
try { try {
st.close(); st.close();
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
} }
} }
} }
@ -411,7 +401,7 @@ public class SQLite implements DataSource {
try { try {
rs.close(); rs.close();
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
} }
} }
} }
@ -420,24 +410,24 @@ public class SQLite implements DataSource {
public List<String> getAllAuthsByName(PlayerAuth auth) { public List<String> getAllAuthsByName(PlayerAuth auth) {
PreparedStatement pst = null; PreparedStatement pst = null;
ResultSet rs = null; ResultSet rs = null;
List<String> countIp = new ArrayList<>(); List<String> names = new ArrayList<>();
try { try {
// TODO ljacqu 20160214: Use SELECT name if only the name is required
pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE " + col.IP + "=?;"); pst = con.prepareStatement("SELECT * FROM " + tableName + " WHERE " + col.IP + "=?;");
pst.setString(1, auth.getIp()); pst.setString(1, auth.getIp());
rs = pst.executeQuery(); rs = pst.executeQuery();
while (rs.next()) { while (rs.next()) {
countIp.add(rs.getString(col.NAME)); names.add(rs.getString(col.NAME));
} }
return countIp; return names;
} catch (SQLException ex) { } catch (SQLException ex) {
logSqlException(ex); logSqlException(ex);
return new ArrayList<>();
} catch (NullPointerException npe) {
return new ArrayList<>();
} finally { } finally {
close(rs); close(rs);
close(pst); close(pst);
} }
return new ArrayList<>();
} }
@Override @Override
@ -454,14 +444,12 @@ public class SQLite implements DataSource {
} }
return countIp; return countIp;
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return new ArrayList<>();
} catch (NullPointerException npe) {
return new ArrayList<>();
} finally { } finally {
close(rs); close(rs);
close(pst); close(pst);
} }
return new ArrayList<>();
} }
@Override @Override
@ -478,14 +466,12 @@ public class SQLite implements DataSource {
} }
return countEmail; return countEmail;
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return new ArrayList<>(); } finally {
} catch (NullPointerException npe) {
return new ArrayList<>();
} finally {
close(rs); close(rs);
close(pst); close(pst);
} }
return new ArrayList<>();
} }
@Override @Override
@ -520,8 +506,7 @@ public class SQLite implements DataSource {
if (rs.next()) if (rs.next())
return (rs.getInt(col.IS_LOGGED) == 1); return (rs.getInt(col.IS_LOGGED) == 1);
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return false;
} finally { } finally {
close(rs); close(rs);
close(pst); close(pst);
@ -538,7 +523,7 @@ public class SQLite implements DataSource {
pst.setString(2, user); pst.setString(2, user);
pst.executeUpdate(); pst.executeUpdate();
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
} finally { } finally {
close(pst); close(pst);
} }
@ -554,7 +539,7 @@ public class SQLite implements DataSource {
pst.setString(2, user); pst.setString(2, user);
pst.executeUpdate(); pst.executeUpdate();
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
} finally { } finally {
close(pst); close(pst);
} }
@ -569,7 +554,7 @@ public class SQLite implements DataSource {
pst.setInt(2, 1); pst.setInt(2, 1);
pst.executeUpdate(); pst.executeUpdate();
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
} finally { } finally {
close(pst); close(pst);
} }
@ -577,22 +562,20 @@ public class SQLite implements DataSource {
@Override @Override
public int getAccountsRegistered() { public int getAccountsRegistered() {
int result = 0;
PreparedStatement pst = null; PreparedStatement pst = null;
ResultSet rs; ResultSet rs;
try { try {
pst = con.prepareStatement("SELECT COUNT(*) FROM " + tableName + ";"); pst = con.prepareStatement("SELECT COUNT(*) FROM " + tableName + ";");
rs = pst.executeQuery(); rs = pst.executeQuery();
if (rs != null && rs.next()) { if (rs != null && rs.next()) {
result = rs.getInt(1); return rs.getInt(1);
} }
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return result;
} finally { } finally {
close(pst); close(pst);
} }
return result; return 0;
} }
@Override @Override
@ -604,7 +587,7 @@ public class SQLite implements DataSource {
pst.setString(2, oldOne); pst.setString(2, oldOne);
pst.executeUpdate(); pst.executeUpdate();
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
} finally { } finally {
close(pst); close(pst);
} }
@ -623,8 +606,7 @@ public class SQLite implements DataSource {
auths.add(auth); auths.add(auth);
} }
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return auths;
} finally { } finally {
close(pst); close(pst);
} }
@ -644,8 +626,7 @@ public class SQLite implements DataSource {
auths.add(auth); auths.add(auth);
} }
} catch (SQLException ex) { } catch (SQLException ex) {
ConsoleLogger.showError(ex.getMessage()); logSqlException(ex);
return auths;
} finally { } finally {
close(pst); close(pst);
} }
@ -669,8 +650,7 @@ public class SQLite implements DataSource {
} }
private static void logSqlException(SQLException e) { private static void logSqlException(SQLException e) {
ConsoleLogger.showError("Error while executing SQL statement: " + StringUtils.formatException(e)); ConsoleLogger.logException("Error while executing SQL statement:", e);
ConsoleLogger.writeStackTrace(e);
} }
private PlayerAuth buildAuthFromResultSet(ResultSet row) throws SQLException { private PlayerAuth buildAuthFromResultSet(ResultSet row) throws SQLException {

View File

@ -46,8 +46,7 @@ public class SendMailSSL {
try { try {
email = initializeMail(auth, settings); email = initializeMail(auth, settings);
} catch (EmailException e) { } catch (EmailException e) {
ConsoleLogger.showError("Failed to create email with the given settings: " ConsoleLogger.logException("Failed to create email with the given settings:", e);
+ StringUtils.formatException(e));
return; return;
} }
@ -59,8 +58,8 @@ public class SendMailSSL {
file = generateImage(auth, plugin, newPass); file = generateImage(auth, plugin, newPass);
content = embedImageIntoEmailContent(file, email, content); content = embedImageIntoEmailContent(file, email, content);
} catch (IOException | EmailException e) { } catch (IOException | EmailException e) {
ConsoleLogger.showError("Unable to send new password as image for email " + auth.getEmail() ConsoleLogger.logException(
+ ": " + StringUtils.formatException(e)); "Unable to send new password as image for email " + auth.getEmail() + ":", e);
} }
} }
@ -114,15 +113,14 @@ public class SendMailSSL {
email.setHtmlMsg(content); email.setHtmlMsg(content);
email.setTextMsg(content); email.setTextMsg(content);
} catch (EmailException e) { } catch (EmailException e) {
ConsoleLogger.showError("Your email.html config contains an error and cannot be sent: " ConsoleLogger.logException("Your email.html config contains an error and cannot be sent:", e);
+ StringUtils.formatException(e));
return false; return false;
} }
try { try {
email.send(); email.send();
return true; return true;
} catch (EmailException e) { } catch (EmailException e) {
ConsoleLogger.showError("Failed to send a mail to " + email.getToAddresses() + ": " + e.getMessage()); ConsoleLogger.logException("Failed to send a mail to " + email.getToAddresses() + ":", e);
return false; return false;
} }
} }

View File

@ -125,7 +125,9 @@ public enum MessageKey {
EMAIL_ALREADY_USED_ERROR("email_already_used"), EMAIL_ALREADY_USED_ERROR("email_already_used"),
TWO_FACTOR_CREATE("two_factor_create", "%code", "%url"); TWO_FACTOR_CREATE("two_factor_create", "%code", "%url"),
NOT_OWNER_ERROR("not_owner_error");
private String key; private String key;
private String[] tags; private String[] tags;

View File

@ -70,7 +70,7 @@ public class AsynchronousJoin {
@Override @Override
public void run() { public void run() {
AuthMePlayerListener.causeByAuthMe.putIfAbsent(name, true); AuthMePlayerListener.causeByAuthMe.putIfAbsent(name, true);
player.kickPlayer("You are not the owner of this account. Please try another name!"); player.kickPlayer(m.retrieveSingle(MessageKey.NOT_OWNER_ERROR));
if (Settings.banUnsafeIp) if (Settings.banUnsafeIp)
plugin.getServer().banIP(ip); plugin.getServer().banIP(ip);
} }

View File

@ -53,3 +53,11 @@ email_send: '[AuthMe] Изпраен е имейл !'
country_banned: Твоята държава е забранена в този сървър! country_banned: Твоята държава е забранена в този сървър!
antibot_auto_enabled: '[AuthMe] AntiBotMod автоматично включен, открита е потенциална атака!' antibot_auto_enabled: '[AuthMe] AntiBotMod автоматично включен, открита е потенциална атака!'
antibot_auto_disabled: '[AuthMe] AntiBotMod автоматично изключване след %m Минути.' antibot_auto_disabled: '[AuthMe] AntiBotMod автоматично изключване след %m Минути.'
# TODO email_already_used: '&4The email address is already being used'
# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...'
# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO invalid_session: '&cYour IP has been changed and your session data has expired!'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -59,4 +59,7 @@ email_exists: '&cUm email de recuperação já foi enviado! Você pode reenviar
country_banned: '&4Seu país foi banido do servidor! Your country is banned from this server!' country_banned: '&4Seu país foi banido do servidor! Your country is banned from this server!'
antibot_auto_enabled: '&4[AntiBotService] AntiBot ativado devido ao grande número de conexões!' antibot_auto_enabled: '&4[AntiBotService] AntiBot ativado devido ao grande número de conexões!'
antibot_auto_disabled: '&2[AntiBotService] AntiBot desativado após %m minutos!' antibot_auto_disabled: '&2[AntiBotService] AntiBot desativado após %m minutos!'
# TODO two_factor_create: Missing tag %url
two_factor_create: '&2Seu código secreto é %code' two_factor_create: '&2Seu código secreto é %code'
# TODO email_already_used: '&4The email address is already being used'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -53,3 +53,10 @@ email_send: '[AuthMe] Email pro obnoveni hesla odeslan!'
country_banned: 'Vase zeme je na tomto serveru zakazana' country_banned: 'Vase zeme je na tomto serveru zakazana'
antibot_auto_enabled: '[AuthMe] AntiBotMod automaticky spusten z duvodu masivnich pripojeni!' antibot_auto_enabled: '[AuthMe] AntiBotMod automaticky spusten z duvodu masivnich pripojeni!'
antibot_auto_disabled: '[AuthMe] AntiBotMod automaticky ukoncen po %m minutach, doufejme v konec invaze' antibot_auto_disabled: '[AuthMe] AntiBotMod automaticky ukoncen po %m minutach, doufejme v konec invaze'
# TODO email_already_used: '&4The email address is already being used'
# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...'
# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -57,4 +57,7 @@ country_banned: '&4Dein Land ist gesperrt'
antibot_auto_enabled: '&4[AntiBotService] AntiBotMod wurde aufgrund hoher Netzauslastung automatisch aktiviert!' antibot_auto_enabled: '&4[AntiBotService] AntiBotMod wurde aufgrund hoher Netzauslastung automatisch aktiviert!'
antibot_auto_disabled: '&2[AntiBotService] AntiBotMod wurde nach %m Minuten deaktiviert, hoffentlich ist die Invasion vorbei' antibot_auto_disabled: '&2[AntiBotService] AntiBotMod wurde nach %m Minuten deaktiviert, hoffentlich ist die Invasion vorbei'
kick_antibot: 'AntiBotMod ist aktiviert! Bitte warte einige Minuten, bevor du dich mit dem Server verbindest' kick_antibot: 'AntiBotMod ist aktiviert! Bitte warte einige Minuten, bevor du dich mit dem Server verbindest'
# TODO two_factor_create: Missing tag %url
two_factor_create: '&2Dein geheimer Code ist %code' two_factor_create: '&2Dein geheimer Code ist %code'
# TODO email_already_used: '&4The email address is already being used'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -59,3 +59,4 @@ antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number
antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!' antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!'
email_already_used: '&4The email address is already being used' email_already_used: '&4The email address is already being used'
two_factor_create: '&2Your secret code is %code. You can scan it from here %url' two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -54,4 +54,10 @@ email_send: '[AuthMe] Correo de recuperación enviado !'
country_banned: 'Tu país ha sido baneado de este servidor!' country_banned: 'Tu país ha sido baneado de este servidor!'
antibot_auto_enabled: '[AuthMe] AntiBotMod activado automáticamente debido a conexiones masivas!' antibot_auto_enabled: '[AuthMe] AntiBotMod activado automáticamente debido a conexiones masivas!'
antibot_auto_disabled: '[AuthMe] AntiBotMod desactivado automáticamente luego de %m minutos. Esperamos que haya terminado' antibot_auto_disabled: '[AuthMe] AntiBotMod desactivado automáticamente luego de %m minutos. Esperamos que haya terminado'
# TODO email_already_used: '&4The email address is already being used'
# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...'
# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -47,3 +47,16 @@ email_confirm: '[AuthMe] Konfirmatu zure emaila !'
email_changed: '[AuthMe] Emaila aldatua!' email_changed: '[AuthMe] Emaila aldatua!'
email_send: '[AuthMe] Berreskuratze emaila bidalita !' email_send: '[AuthMe] Berreskuratze emaila bidalita !'
country_banned: '[AuthMe] Zure herrialdea blokeatuta dago zerbitzari honetan' country_banned: '[AuthMe] Zure herrialdea blokeatuta dago zerbitzari honetan'
# TODO email_already_used: '&4The email address is already being used'
# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...'
# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!'
# TODO invalid_session: '&cYour IP has been changed and your session data has expired!'
# TODO wrong_captcha: '&cWrong captcha, please type "/captcha THE_CAPTCHA" into the chat!'
# TODO usage_captcha: '&3To login you have to solve a captcha code, please use the command "/captcha <theCaptcha>"'
# TODO antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!'
# TODO valid_captcha: '&2Captcha code solved correctly!'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -50,3 +50,13 @@ email_added: '[AuthMe] Sähköposti lisätty!'
email_confirm: '[AuthMe] Vahvistuta sähköposti!' email_confirm: '[AuthMe] Vahvistuta sähköposti!'
email_changed: '[AuthMe] Sähköposti vaihdettu!' email_changed: '[AuthMe] Sähköposti vaihdettu!'
email_send: '[AuthMe] Palautus sähköposti lähetetty!' email_send: '[AuthMe] Palautus sähköposti lähetetty!'
# TODO email_already_used: '&4The email address is already being used'
# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...'
# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO country_banned: '&4Your country is banned from this server!'
# TODO antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!'
# TODO antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -58,4 +58,7 @@ antibot_auto_enabled: '[AuthMe] AntiBotMod a été activé automatiquement à ca
antibot_auto_disabled: '[AuthMe] AntiBotMod a été désactivé automatiquement après %m minutes, espérons que l''invasion soit arrêtée!' antibot_auto_disabled: '[AuthMe] AntiBotMod a été désactivé automatiquement après %m minutes, espérons que l''invasion soit arrêtée!'
kick_antibot: 'AntiBotMod est activé ! Veuillez attendre quelques minutes avant de joindre le serveur.' kick_antibot: 'AntiBotMod est activé ! Veuillez attendre quelques minutes avant de joindre le serveur.'
email_exists: '&cUn email de restauration a déjà été envoyé ! Vous pouvez le jeter et vous en faire envoyez un nouveau en utilisant :' email_exists: '&cUn email de restauration a déjà été envoyé ! Vous pouvez le jeter et vous en faire envoyez un nouveau en utilisant :'
# TODO two_factor_create: Missing tag %url
two_factor_create: '&2Votre code secret est %code' two_factor_create: '&2Votre code secret est %code'
# TODO email_already_used: '&4The email address is already being used'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -55,3 +55,10 @@ country_banned: 'O teu país está bloqueado neste servidor'
antibot_auto_enabled: '[AuthMe] AntiBotMod conectouse automáticamente debido a conexións masivas!' antibot_auto_enabled: '[AuthMe] AntiBotMod conectouse automáticamente debido a conexións masivas!'
antibot_auto_disabled: '[AuthMe] AntiBotMod desactivouse automáticamente despois de %m minutos, antibot_auto_disabled: '[AuthMe] AntiBotMod desactivouse automáticamente despois de %m minutos,
esperemos que a invasión se detivera' esperemos que a invasión se detivera'
# TODO email_already_used: '&4The email address is already being used'
# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...'
# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -37,7 +37,7 @@ name_len: '&4A felhasználó neved túl hosszú, vagy túl rövid! Válassz más
regex: '&4A felhasználóneved nem használható karaktereket tartalmaz. Elfogadott karakterek: REG_EX' regex: '&4A felhasználóneved nem használható karaktereket tartalmaz. Elfogadott karakterek: REG_EX'
add_email: '&3Kérlek add hozzá a felhasználódhoz az email címedet "/email add <Email címed> <Email címed ismét>"' add_email: '&3Kérlek add hozzá a felhasználódhoz az email címedet "/email add <Email címed> <Email címed ismét>"'
recovery_email: '&3Ha elfelejtetted a jelszavad, használd az: "/email recovery <regisztrált Email címed>"' recovery_email: '&3Ha elfelejtetted a jelszavad, használd az: "/email recovery <regisztrált Email címed>"'
usage_captcha: '&3A bejelentkezéshez CAPTCHA szükséges, kérem használd a következő parancsot "/captcha <Captcha>"' usage_captcha: '&3A bejelentkezéshez CAPTCHA szükséges, kérem használd a következő parancsot "/captcha <theCaptcha>"'
wrong_captcha: '&cHibás captcha, kérlek írd be a következő parancsot "/captcha THE_CAPTCHA" a chat-be!' wrong_captcha: '&cHibás captcha, kérlek írd be a következő parancsot "/captcha THE_CAPTCHA" a chat-be!'
valid_captcha: '&2Captcha sikeresen feloldva!' valid_captcha: '&2Captcha sikeresen feloldva!'
kick_forvip: '&3VIP játékos csatlakozott a szerverhez!' kick_forvip: '&3VIP játékos csatlakozott a szerverhez!'
@ -57,3 +57,6 @@ country_banned: '&4Az országod tiltólistán van ezen a szerveren!'
antibot_auto_enabled: '&4[AntiBot] Az AntiBot védelem bekapcsolt a nagy számú hálózati kapcsolat miatt!' antibot_auto_enabled: '&4[AntiBot] Az AntiBot védelem bekapcsolt a nagy számú hálózati kapcsolat miatt!'
antibot_auto_disabled: '&2[AntiBot] Az AntiBot kikapcsol %m múlva!' antibot_auto_disabled: '&2[AntiBot] Az AntiBot kikapcsol %m múlva!'
kick_antibot: 'Az AntiBot védelem bekapcsolva! Kérünk várj pár másodpercet a csatlakozáshoz.' kick_antibot: 'Az AntiBot védelem bekapcsolva! Kérünk várj pár másodpercet a csatlakozáshoz.'
# TODO email_already_used: '&4The email address is already being used'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -53,3 +53,10 @@ email_send: '&2Email pemulihan akun telah dikirim! Silahkan periksa kotak masuk
email_exists: '&cEmail pemulihan sudah dikirim! kamu bisa membatalkan dan mengirimkan yg baru dengan command dibawah:' email_exists: '&cEmail pemulihan sudah dikirim! kamu bisa membatalkan dan mengirimkan yg baru dengan command dibawah:'
antibot_auto_enabled: '&4[AntiBotService] AntiBot diaktifkan dikarenakan banyak koneksi yg diterima!' antibot_auto_enabled: '&4[AntiBotService] AntiBot diaktifkan dikarenakan banyak koneksi yg diterima!'
antibot_auto_disabled: '&2[AntiBotService] AntiBot dimatikan setelah %m menit!' antibot_auto_disabled: '&2[AntiBotService] AntiBot dimatikan setelah %m menit!'
# TODO email_already_used: '&4The email address is already being used'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO country_banned: '&4Your country is banned from this server!'
# TODO usage_unreg: '&cUsage: /unregister <password>'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'
# TODO usage_reg: '&cUsage: /register <password> <ConfirmPassword>'

View File

@ -59,3 +59,5 @@ antibot_auto_enabled: 'Il servizio di AntiBot è stato automaticamente abilitato
antibot_auto_disabled: "Il servizio di AntiBot è stato automaticamente disabilitato dopo %m Minuti, sperando che l'attacco sia finito!" antibot_auto_disabled: "Il servizio di AntiBot è stato automaticamente disabilitato dopo %m Minuti, sperando che l'attacco sia finito!"
kick_antibot: 'Il servizio di AntiBot è attualmente attivo! Devi aspettare qualche minuto prima di poter entrare nel server.' kick_antibot: 'Il servizio di AntiBot è attualmente attivo! Devi aspettare qualche minuto prima di poter entrare nel server.'
two_factor_create: '&2Il tuo codice segreto è: &f%code&n&2Puoi anche scannerizzare il codice QR da qui: &f%url' two_factor_create: '&2Il tuo codice segreto è: &f%code&n&2Puoi anche scannerizzare il codice QR da qui: &f%url'
# TODO email_already_used: '&4The email address is already being used'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -1,7 +1,6 @@
# Korean translate by wolfwork # # Korean translate by wolfwork #
# wolfdate25@gmail.com # # wolfdate25@gmail.com #
# 16.08.2014 Thanks for use # # 16.08.2014 Thanks for use #
unknown_user: '&f사용자가 데이터베이스에 존재하지 않습니다' unknown_user: '&f사용자가 데이터베이스에 존재하지 않습니다'
unsafe_spawn: '&f당신이 종료한 위치는 안전하지 않았습니다, 세계의 소환지점으로 이동합니다' unsafe_spawn: '&f당신이 종료한 위치는 안전하지 않았습니다, 세계의 소환지점으로 이동합니다'
not_logged_in: '&c접속되어있지 않습니다!' not_logged_in: '&c접속되어있지 않습니다!'
@ -58,3 +57,9 @@ email_exists: '[AuthMe] 당신의 계정에 이미 이메일이 존재합니다.
country_banned: '당신의 국가는 이 서버에서 차단당했습니다' country_banned: '당신의 국가는 이 서버에서 차단당했습니다'
antibot_auto_enabled: '[AuthMe] 봇차단모드가 연결 개수 때문에 자동적으로 활성화됩니다!' antibot_auto_enabled: '[AuthMe] 봇차단모드가 연결 개수 때문에 자동적으로 활성화됩니다!'
antibot_auto_disabled: '[AuthMe] 봇차단모드가 %m 분 후에 자동적으로 비활성화됩니다' antibot_auto_disabled: '[AuthMe] 봇차단모드가 %m 분 후에 자동적으로 비활성화됩니다'
# TODO email_already_used: '&4The email address is already being used'
# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...'
# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -40,3 +40,23 @@ wrong_captcha: '&cNeteisinga Captcha, naudokite : /captcha THE_CAPTCHA'
valid_captcha: '&cJusu captcha Teisinga!' valid_captcha: '&cJusu captcha Teisinga!'
kick_forvip: '&cA VIP prisijunge i pilna serveri!' kick_forvip: '&cA VIP prisijunge i pilna serveri!'
kick_fullserver: '&cServeris yra pilnas, Atsiprasome.' kick_fullserver: '&cServeris yra pilnas, Atsiprasome.'
# TODO email_already_used: '&4The email address is already being used'
# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...'
# TODO usage_email_change: '&cUsage: /email change <oldEmail> <newEmail>'
# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...'
# TODO new_email_invalid: '&cInvalid new email, try again!'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO email_send: '&2Recovery email sent successfully! Please check your email inbox!'
# TODO usage_email_recovery: '&cUsage: /email recovery <Email>'
# TODO email_confirm: '&cPlease confirm your email address!'
# TODO old_email_invalid: '&cInvalid old email, try again!'
# TODO email_changed: '&2Email address changed correctly!'
# TODO antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!'
# TODO email_added: '&2Email address successfully added to your account!'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO country_banned: '&4Your country is banned from this server!'
# TODO antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!'
# TODO usage_email_add: '&cUsage: /email add <email> <confirmEmail>'
# TODO email_invalid: '&cInvalid email address, try again!'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -15,7 +15,7 @@ user_regged: '&cGebruikersnaam is al geregistreerd'
usage_reg: '&cGebruik: /register <wachtwoord> <herhaalWachtwoord>' usage_reg: '&cGebruik: /register <wachtwoord> <herhaalWachtwoord>'
max_reg: Je hebt de maximale registraties van jouw account overschreden. max_reg: Je hebt de maximale registraties van jouw account overschreden.
no_perm: '&cGeen toegang!' no_perm: '&cGeen toegang!'
error: Error: neem contact op met een administrator! error: 'Error: neem contact op met een administrator!'
login_msg: '&cLog in met "/login <wachtwoord>"' login_msg: '&cLog in met "/login <wachtwoord>"'
reg_msg: '&cRegistreer met "/register <wachtwoord> <herhaalWachtwoord>"' reg_msg: '&cRegistreer met "/register <wachtwoord> <herhaalWachtwoord>"'
usage_unreg: '&cGebruik: /unregister password' usage_unreg: '&cGebruik: /unregister password'
@ -30,7 +30,7 @@ same_nick: Er is al iemand met jou gebruikersnaam online.
registered: '&cSuccesvol geregistreerd!' registered: '&cSuccesvol geregistreerd!'
pass_len: Je gekozen wachtwoord voldoet niet aan de minimum of maximum lengte pass_len: Je gekozen wachtwoord voldoet niet aan de minimum of maximum lengte
reload: Configuratie en database is opnieuw opgestard reload: Configuratie en database is opnieuw opgestard
timeout: Login time-out: het duurde telang voor je je inlogde. timeout: 'Login time-out: het duurde telang voor je je inlogde.'
usage_changepassword: 'Gebruik: /changepassword <oudWachtwoord> <nieuwWachtwoord>' usage_changepassword: 'Gebruik: /changepassword <oudWachtwoord> <nieuwWachtwoord>'
name_len: '&cJe gebruikersnaam is te kort' name_len: '&cJe gebruikersnaam is te kort'
regex: '&cJouw gebruikersnaam bevat illegale tekens. Toegestaane karakters: REG_EX' regex: '&cJouw gebruikersnaam bevat illegale tekens. Toegestaane karakters: REG_EX'
@ -55,4 +55,9 @@ country_banned: 'Jouw land is geband op deze server'
antibot_auto_enabled: '[AuthMe] AntiBotMod automatisch aangezet vanewge veel verbindingen!' antibot_auto_enabled: '[AuthMe] AntiBotMod automatisch aangezet vanewge veel verbindingen!'
antibot_auto_disabled: '[AuthMe] AntiBotMod automatisch uitgezet na %m minuten, hopelijk is de invasie gestopt' antibot_auto_disabled: '[AuthMe] AntiBotMod automatisch uitgezet na %m minuten, hopelijk is de invasie gestopt'
kick_antibot: 'AntiBot is aangezet! Wacht alsjeblieft enkele minuten voor je met de server verbindt.' kick_antibot: 'AntiBot is aangezet! Wacht alsjeblieft enkele minuten voor je met de server verbindt.'
# TODO two_factor_create: Missing tag %url
two_factor_create: '&2Je geheime code is %code' two_factor_create: '&2Je geheime code is %code'
# TODO email_already_used: '&4The email address is already being used'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO reg_email_msg: '&3Please, register to the server with the command "/register <email> <confirmEmail>"'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -50,3 +50,13 @@ email_added: '[AuthMe] Email dodany!'
email_confirm: '[AuthMe] Potwierdz swoj email!' email_confirm: '[AuthMe] Potwierdz swoj email!'
email_changed: '[AuthMe] Email zmieniony!' email_changed: '[AuthMe] Email zmieniony!'
email_send: '[AuthMe] Email z odzyskaniem wyslany!' email_send: '[AuthMe] Email z odzyskaniem wyslany!'
# TODO email_already_used: '&4The email address is already being used'
# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...'
# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO country_banned: '&4Your country is banned from this server!'
# TODO antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!'
# TODO antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -54,3 +54,10 @@ email_send: 'Nova palavra-passe enviada para o seu email!'
country_banned: 'O seu país está banido deste servidor' country_banned: 'O seu país está banido deste servidor'
antibot_auto_enabled: '[AuthMe] AntiBotMod activado automaticamente devido a um aumento anormal de tentativas de ligação!' antibot_auto_enabled: '[AuthMe] AntiBotMod activado automaticamente devido a um aumento anormal de tentativas de ligação!'
antibot_auto_disabled: '[AuthMe] AntiBotMod desactivado automaticamente após %m minutos, esperamos que a invasão tenha parado' antibot_auto_disabled: '[AuthMe] AntiBotMod desactivado automaticamente após %m minutos, esperamos que a invasão tenha parado'
# TODO email_already_used: '&4The email address is already being used'
# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...'
# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -55,3 +55,8 @@ email_send: '[AuthMe] Письмо с инструкциями для восст
country_banned: 'Вход с IP-адресов вашей страны воспрещен на этом сервере' country_banned: 'Вход с IP-адресов вашей страны воспрещен на этом сервере'
antibot_auto_enabled: '&a[AuthMe] AntiBot-режим автоматически включен из-за большого количества входов!' antibot_auto_enabled: '&a[AuthMe] AntiBot-режим автоматически включен из-за большого количества входов!'
antibot_auto_disabled: '&a[AuthMe] AntiBot-режим автоматичски отключен после %m мин. Надеюсь атака закончилась' antibot_auto_disabled: '&a[AuthMe] AntiBot-режим автоматичски отключен после %m мин. Надеюсь атака закончилась'
# TODO email_already_used: '&4The email address is already being used'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -1,7 +1,6 @@
# Slovak translate by Judzi # # Slovak translate by Judzi #
# www.judzi.eu | judzi@cs-gaming.eu # # www.judzi.eu | judzi@cs-gaming.eu #
# 02.02.2013 - 4:35 AM - Thanks for use # # 02.02.2013 - 4:35 AM - Thanks for use #
logged_in: '&cAktuálne si uz prihláseny!' logged_in: '&cAktuálne si uz prihláseny!'
not_logged_in: '&cNie si este prihláseny!' not_logged_in: '&cNie si este prihláseny!'
reg_disabled: '&cRegistrácia nie je povolená' reg_disabled: '&cRegistrácia nie je povolená'
@ -39,4 +38,28 @@ name_len: '&cTvoje meno je velmi krátke alebo dlhé'
regex: '&cTvoje meno obsahuje zakázané znaky. Povolené znaky: REG_EX' regex: '&cTvoje meno obsahuje zakázané znaky. Povolené znaky: REG_EX'
add_email: '&cPridaj svoj e-mail príkazom "/email add email zopakujEmail"' add_email: '&cPridaj svoj e-mail príkazom "/email add email zopakujEmail"'
recovery_email: '&cZabudol si heslo? Pouzi príkaz /email recovery <tvojEmail>' recovery_email: '&cZabudol si heslo? Pouzi príkaz /email recovery <tvojEmail>'
# TODO email_already_used: '&4The email address is already being used'
# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...'
# TODO usage_email_change: '&cUsage: /email change <oldEmail> <newEmail>'
# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...'
# TODO new_email_invalid: '&cInvalid new email, try again!'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO email_send: '&2Recovery email sent successfully! Please check your email inbox!'
# TODO email_confirm: '&cPlease confirm your email address!'
# TODO usage_captcha: '&3To login you have to solve a captcha code, please use the command "/captcha <theCaptcha>"'
# TODO usage_email_recovery: '&cUsage: /email recovery <Email>'
# TODO email_changed: '&2Email address changed correctly!'
# TODO old_email_invalid: '&cInvalid old email, try again!'
# TODO antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!'
# TODO kick_fullserver: '&4The server is full, try again later!'
# TODO email_added: '&2Email address successfully added to your account!'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO country_banned: '&4Your country is banned from this server!'
# TODO antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!'
# TODO email_invalid: '&cInvalid email address, try again!'
# TODO kick_forvip: '&3A VIP player has joined the server when it was full!'
# TODO usage_email_add: '&cUsage: /email add <email> <confirmEmail>'
# TODO wrong_captcha: '&cWrong captcha, please type "/captcha THE_CAPTCHA" into the chat!'
# TODO valid_captcha: '&2Captcha code solved correctly!'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -53,3 +53,10 @@ email_send: '[AuthMe] Kurtarma postasi gonderildi !'
country_banned: 'Ulken bu serverdan banlandi !' country_banned: 'Ulken bu serverdan banlandi !'
antibot_auto_enabled: '[AuthMe] AntiBotMode otomatik olarak etkinlestirildi!' antibot_auto_enabled: '[AuthMe] AntiBotMode otomatik olarak etkinlestirildi!'
antibot_auto_disabled: '[AuthMe] AntiBotMode %m dakika sonra otomatik olarak isgal yuzundan devredisi birakildi' antibot_auto_disabled: '[AuthMe] AntiBotMode %m dakika sonra otomatik olarak isgal yuzundan devredisi birakildi'
# TODO email_already_used: '&4The email address is already being used'
# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...'
# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -54,4 +54,10 @@ email_changed: '[AuthMe] &2Email змінено!'
email_send: '[AuthMe] Лист для відновлення надіслано на ваш Email!' email_send: '[AuthMe] Лист для відновлення надіслано на ваш Email!'
country_banned: 'Сервер не доступний для вашої країни | Your country is banned from this server' country_banned: 'Сервер не доступний для вашої країни | Your country is banned from this server'
antibot_auto_enabled: '[AuthMe] AntiBotMod автоматично увімкнений (забагато одначасних з`єднань)!' antibot_auto_enabled: '[AuthMe] AntiBotMod автоматично увімкнений (забагато одначасних з`єднань)!'
# TODO antibot_auto_disabled: Missing tag %m
antibot_auto_disabled: '[AuthMe] AntiBotMod автоматично вимкнувся, сподіваємось атака зупинена' antibot_auto_disabled: '[AuthMe] AntiBotMod автоматично вимкнувся, сподіваємось атака зупинена'
# TODO email_already_used: '&4The email address is already being used'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -36,6 +36,7 @@ regex: '&cTên đăng nhập của bạn có chứa kí tự đặc biệt khôn
add_email: '&cVui lòng thêm địa chỉ email cho tài khoản với lệnh: /email add email-của-bạn nhập-lại-email-của-bạn' add_email: '&cVui lòng thêm địa chỉ email cho tài khoản với lệnh: /email add email-của-bạn nhập-lại-email-của-bạn'
recovery_email: '&cQuên mật khẩu? Hãy dùng lệnh /email recovery <email-của-bạn>' recovery_email: '&cQuên mật khẩu? Hãy dùng lệnh /email recovery <email-của-bạn>'
usage_captcha: '&cBạn cần nhập mã xác nhận: /captcha <theCaptcha>' usage_captcha: '&cBạn cần nhập mã xác nhận: /captcha <theCaptcha>'
# TODO wrong_captcha: Missing tag THE_CAPTCHA
wrong_captcha: '&cSai mã xác nhận, nhập lại: /captcha <mã-xác-nhận>' wrong_captcha: '&cSai mã xác nhận, nhập lại: /captcha <mã-xác-nhận>'
valid_captcha: '&aMã xác nhận hợp lệ!' valid_captcha: '&aMã xác nhận hợp lệ!'
kick_forvip: '&cNgười chơi VIP đã vào server hiện đang full!' kick_forvip: '&cNgười chơi VIP đã vào server hiện đang full!'
@ -53,3 +54,10 @@ email_send: '[AuthMe] Đã gửi email khôi phục mật khẩu tới bạn !'
country_banned: 'Rất tiếc, quốc gia của bạn không được phép gia nhập server' country_banned: 'Rất tiếc, quốc gia của bạn không được phép gia nhập server'
antibot_auto_enabled: '[AuthMe] AntiBot đã được kích hoạt vì lượng người chơi kết nối vượt quá giới hạn!' antibot_auto_enabled: '[AuthMe] AntiBot đã được kích hoạt vì lượng người chơi kết nối vượt quá giới hạn!'
antibot_auto_disabled: '[AuthMe] AntiBot tự huỷ kích hoạt sau %m phút, hi vọng lượng kết nối sẽ giảm bớt' antibot_auto_disabled: '[AuthMe] AntiBot tự huỷ kích hoạt sau %m phút, hi vọng lượng kết nối sẽ giảm bớt'
# TODO email_already_used: '&4The email address is already being used'
# TODO password_error_nick: '&cYou can''t use your name as password, please choose another one...'
# TODO password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -42,6 +42,7 @@ add_email: '&8[&6用戶系統&8] &b請為你的帳戶立即添加電郵地址
bad_database_email: '&8[&6用戶系統&8] 此指令只適用於使用MySQL或SQLite之伺服器。' bad_database_email: '&8[&6用戶系統&8] 此指令只適用於使用MySQL或SQLite之伺服器。'
recovery_email: '&8[&6用戶系統&8] &c忘記密碼 請使用這個的指令來更新密碼: 《 /email recovery <電郵地址> 》' recovery_email: '&8[&6用戶系統&8] &c忘記密碼 請使用這個的指令來更新密碼: 《 /email recovery <電郵地址> 》'
usage_captcha: '&8[&6用戶系統&8] &c用法 《 /captcha <theCaptcha> 》' usage_captcha: '&8[&6用戶系統&8] &c用法 《 /captcha <theCaptcha> 》'
# TODO wrong_captcha: Missing tag THE_CAPTCHA
wrong_captcha: '&8[&6用戶系統&8] &c你輸入了錯誤的驗證碼請使用 《 /captcha <驗證碼> 》 再次輸入。' wrong_captcha: '&8[&6用戶系統&8] &c你輸入了錯誤的驗證碼請使用 《 /captcha <驗證碼> 》 再次輸入。'
valid_captcha: '&8[&6用戶系統&8] &c你所輸入的驗證碼是無效的 ' valid_captcha: '&8[&6用戶系統&8] &c你所輸入的驗證碼是無效的 '
kick_forvip: '&c因為有VIP玩家登入了伺服器。' kick_forvip: '&c因為有VIP玩家登入了伺服器。'
@ -59,3 +60,8 @@ email_send: '&8[&6用戶系統&8] 忘記密碼信件已寄出,請查收。'
country_banned: '&8[&6用戶系統&8] 本伺服器已停止對你的國家提供遊戲服務。' country_banned: '&8[&6用戶系統&8] 本伺服器已停止對你的國家提供遊戲服務。'
antibot_auto_enabled: '&8[&6用戶系統&8] 防止機械人程序已因應現時大量不尋常的連線而啟用。' antibot_auto_enabled: '&8[&6用戶系統&8] 防止機械人程序已因應現時大量不尋常的連線而啟用。'
antibot_auto_disabled: '&8[&6用戶系統&8] 防止機械人程序檢查到不正常連接數已減少,並於 %m 分鐘後停止運作。' antibot_auto_disabled: '&8[&6用戶系統&8] 防止機械人程序檢查到不正常連接數已減少,並於 %m 分鐘後停止運作。'
# TODO email_already_used: '&4The email address is already being used'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO email_exists: '&cA recovery email was already sent! You can discard it and send a new one using the command below:'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -59,3 +59,8 @@ email_send: '已寄出忘記密碼信件。'
country_banned: '你的國家已被本伺服器封禁。' country_banned: '你的國家已被本伺服器封禁。'
antibot_auto_enabled: '防止機械人程序因大量不尋常連線而啟用。' antibot_auto_enabled: '防止機械人程序因大量不尋常連線而啟用。'
antibot_auto_disabled: '防止機械人程序將於 %m 分鐘後停止運作。' antibot_auto_disabled: '防止機械人程序將於 %m 分鐘後停止運作。'
email_already_used: '&4邮箱已被使用'
kick_antibot: '[AuthMe] 防机器人程序已启用 !请稍等几分钟後才再次进入服务器'
email_exists: '&c恢复邮件已发送 ! 你可以丢弃它然後使用以下的指令来发送新的邮件:'
two_factor_create: '&2你的代码是 %code你可以使用 %url 来扫描'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -37,10 +37,12 @@ reload: '&b【AuthMe】&6已重新讀取設定檔及資料庫'
timeout: '&b【AuthMe】&6超過登入時間請稍後再試一次' timeout: '&b【AuthMe】&6超過登入時間請稍後再試一次'
usage_changepassword: '&b【AuthMe】&6用法: &c"/changepassword <舊密碼> <新密碼>"' usage_changepassword: '&b【AuthMe】&6用法: &c"/changepassword <舊密碼> <新密碼>"'
name_len: '&b【AuthMe】&6你的暱稱 太長 / 太短 了!' name_len: '&b【AuthMe】&6你的暱稱 太長 / 太短 了!'
# TODO regex: Missing tag REG_EX
regex: '&b【AuthMe】&6暱稱裡包含不能使用的字符' regex: '&b【AuthMe】&6暱稱裡包含不能使用的字符'
add_email: '&b【AuthMe】&6請使用 &c"/email add <你的Email> <再次輸入你的Email>" &6來添加 Email' add_email: '&b【AuthMe】&6請使用 &c"/email add <你的Email> <再次輸入你的Email>" &6來添加 Email'
recovery_email: '&b【AuthMe】&6忘記密碼了嗎? 使用 &c"/email recovery <你的Email>"' recovery_email: '&b【AuthMe】&6忘記密碼了嗎? 使用 &c"/email recovery <你的Email>"'
usage_captcha: '&b【AuthMe】&6請用 &c"/captcha <theCaptcha>" &6來輸入你的驗證碼' usage_captcha: '&b【AuthMe】&6請用 &c"/captcha <theCaptcha>" &6來輸入你的驗證碼'
# TODO wrong_captcha: Missing tag THE_CAPTCHA
wrong_captcha: '&b【AuthMe】&6錯誤的驗證碼' wrong_captcha: '&b【AuthMe】&6錯誤的驗證碼'
valid_captcha: '&b【AuthMe】&6驗證碼無效!' valid_captcha: '&b【AuthMe】&6驗證碼無效!'
kick_forvip: '&b【AuthMe】&6你已經被請出。&c原因 : 有 VIP 玩家登入伺服器' kick_forvip: '&b【AuthMe】&6你已經被請出。&c原因 : 有 VIP 玩家登入伺服器'
@ -59,3 +61,7 @@ email_exists: '&b【AuthMe】&6這個帳戶已經有設定電子郵件了'
country_banned: '&b【AuthMe】&6你所在的地區無法進入此伺服器' country_banned: '&b【AuthMe】&6你所在的地區無法進入此伺服器'
antibot_auto_enabled: '&b【AuthMe】&6AntiBotMod已自動啟用!' antibot_auto_enabled: '&b【AuthMe】&6AntiBotMod已自動啟用!'
antibot_auto_disabled: '&b【AuthMe】&6AntiBotMod將會於 &c%m &6分鐘後自動關閉' antibot_auto_disabled: '&b【AuthMe】&6AntiBotMod將會於 &c%m &6分鐘後自動關閉'
# TODO email_already_used: '&4The email address is already being used'
# TODO kick_antibot: 'AntiBot protection mode is enabled! You have to wait some minutes before joining the server.'
# TODO two_factor_create: '&2Your secret code is %code. You can scan it from here %url'
# TODO not_owner_error: 'You are not the owner of this account. Please try another name!'

View File

@ -5,9 +5,9 @@ import java.io.File;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException; import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Scanner; import java.util.Scanner;
import java.util.TreeMap;
/** /**
* Runner for executing tool tasks. * Runner for executing tool tasks.
@ -25,7 +25,7 @@ public final class ToolsRunner {
public static void main(String... args) { public static void main(String... args) {
// Collect tasks and show them // Collect tasks and show them
File toolsFolder = new File(ToolsConstants.TOOLS_SOURCE_ROOT); File toolsFolder = new File(ToolsConstants.TOOLS_SOURCE_ROOT);
Map<String, ToolTask> tasks = new HashMap<>(); Map<String, ToolTask> tasks = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);
collectTasksInDirectory(toolsFolder, tasks); collectTasksInDirectory(toolsFolder, tasks);
listAllTasks(tasks); listAllTasks(tasks);

View File

@ -1,12 +1,12 @@
package commands; package commands;
import com.google.common.collect.ImmutableMap;
import fr.xephi.authme.command.CommandArgumentDescription; import fr.xephi.authme.command.CommandArgumentDescription;
import fr.xephi.authme.command.CommandDescription; import fr.xephi.authme.command.CommandDescription;
import fr.xephi.authme.command.CommandInitializer; import fr.xephi.authme.command.CommandInitializer;
import fr.xephi.authme.command.CommandPermissions; import fr.xephi.authme.command.CommandPermissions;
import fr.xephi.authme.command.CommandUtils; import fr.xephi.authme.command.CommandUtils;
import fr.xephi.authme.permission.PermissionNode; import fr.xephi.authme.permission.PermissionNode;
import utils.ANewMap;
import utils.FileUtils; import utils.FileUtils;
import utils.TagReplacer; import utils.TagReplacer;
import utils.ToolTask; import utils.ToolTask;
@ -38,19 +38,18 @@ public class CommandPageCreater implements ToolTask {
FileUtils.generateFileFromTemplate( FileUtils.generateFileFromTemplate(
ToolsConstants.TOOLS_SOURCE_ROOT + "commands/commands.tpl.md", ToolsConstants.TOOLS_SOURCE_ROOT + "commands/commands.tpl.md",
OUTPUT_FILE, OUTPUT_FILE,
ANewMap.with("commands", commandsResult.toString()).build()); ImmutableMap.of("commands", commandsResult.toString()));
System.out.println("Wrote to '" + OUTPUT_FILE + "' with " + baseCommands.size() + " base commands."); System.out.println("Wrote to '" + OUTPUT_FILE + "' with " + baseCommands.size() + " base commands.");
} }
private static void addCommandsInfo(StringBuilder sb, Collection<CommandDescription> commands, private static void addCommandsInfo(StringBuilder sb, Collection<CommandDescription> commands,
final String template) { final String template) {
for (CommandDescription command : commands) { for (CommandDescription command : commands) {
Map<String, String> tags = ANewMap Map<String, String> tags = ImmutableMap.of(
.with("command", CommandUtils.constructCommandPath(command)) "command", CommandUtils.constructCommandPath(command),
.and("description", command.getDetailedDescription()) "description", command.getDetailedDescription(),
.and("arguments", formatArguments(command.getArguments())) "arguments", formatArguments(command.getArguments()),
.and("permissions", formatPermissions(command.getCommandPermissions())) "permissions", formatPermissions(command.getCommandPermissions()));
.build();
sb.append(TagReplacer.applyReplacements(template, tags)); sb.append(TagReplacer.applyReplacements(template, tags));
if (!command.getChildren().isEmpty()) { if (!command.getChildren().isEmpty()) {

View File

@ -6,3 +6,5 @@ You can use the following commands to use the features of AuthMe. Mandatory argu
brackets; optional arguments are enclosed in square brackets (`[ ]`). brackets; optional arguments are enclosed in square brackets (`[ ]`).
{commands} {commands}
{gen_footer}

View File

@ -0,0 +1,46 @@
package docs;
import com.google.common.collect.ImmutableSet;
import commands.CommandPageCreater;
import hashmethods.HashAlgorithmsDescriptionTask;
import permissions.PermissionsListWriter;
import utils.ToolTask;
import java.util.Scanner;
import java.util.Set;
/**
* Task that runs all tasks which update files in the docs folder.
*/
public class UpdateDocsTask implements ToolTask {
private final Set<Class<? extends ToolTask>> TASKS = ImmutableSet.of(
CommandPageCreater.class, HashAlgorithmsDescriptionTask.class, PermissionsListWriter.class);
@Override
public String getTaskName() {
return "updateDocs";
}
@Override
public void execute(Scanner scanner) {
for (Class<? extends ToolTask> taskClass : TASKS) {
try {
ToolTask task = instantiateTask(taskClass);
System.out.println("\nRunning " + task.getTaskName() + "\n-------------------");
task.execute(scanner);
} catch (UnsupportedOperationException e) {
System.err.println("Error running task of class '" + taskClass + "'");
e.printStackTrace();
}
}
}
private static ToolTask instantiateTask(Class<? extends ToolTask> clazz) {
try {
return clazz.newInstance();
} catch (IllegalAccessException | InstantiationException e) {
throw new UnsupportedOperationException(e);
}
}
}

View File

@ -16,7 +16,7 @@ import java.util.Set;
import static com.google.common.collect.Sets.newHashSet; import static com.google.common.collect.Sets.newHashSet;
/** /**
* Gathers information on {@link fr.xephi.authme.security.crypts.EncryptionMethod} implementations based on * Gathers information on {@link EncryptionMethod} implementations based on
* the annotations in {@link fr.xephi.authme.security.crypts.description}. * the annotations in {@link fr.xephi.authme.security.crypts.description}.
*/ */
public class EncryptionMethodInfoGatherer { public class EncryptionMethodInfoGatherer {

View File

@ -1,9 +1,9 @@
package hashmethods; package hashmethods;
import com.google.common.collect.ImmutableMap;
import fr.xephi.authme.security.HashAlgorithm; import fr.xephi.authme.security.HashAlgorithm;
import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.util.WrapperMock; import fr.xephi.authme.util.WrapperMock;
import utils.ANewMap;
import utils.FileUtils; import utils.FileUtils;
import utils.TagReplacer; import utils.TagReplacer;
import utils.ToolTask; import utils.ToolTask;
@ -36,7 +36,7 @@ public class HashAlgorithmsDescriptionTask implements ToolTask {
final String methodRows = constructMethodRows(descriptions); final String methodRows = constructMethodRows(descriptions);
// Write to the docs file // Write to the docs file
Map<String, String> tags = ANewMap.with("method_rows", methodRows).build(); Map<String, String> tags = ImmutableMap.of("method_rows", methodRows);
FileUtils.generateFileFromTemplate(CUR_FOLDER + "hash_algorithms.tpl.md", OUTPUT_FILE, tags); FileUtils.generateFileFromTemplate(CUR_FOLDER + "hash_algorithms.tpl.md", OUTPUT_FILE, tags);
} }
@ -45,14 +45,14 @@ public class HashAlgorithmsDescriptionTask implements ToolTask {
StringBuilder result = new StringBuilder(); StringBuilder result = new StringBuilder();
for (Map.Entry<HashAlgorithm, MethodDescription> entry : descriptions.entrySet()) { for (Map.Entry<HashAlgorithm, MethodDescription> entry : descriptions.entrySet()) {
MethodDescription description = entry.getValue(); MethodDescription description = entry.getValue();
Map<String, String> tags = ANewMap Map<String, String> tags = ImmutableMap.<String, String>builder()
.with("name", asString(entry.getKey())) .put("name", asString(entry.getKey()))
.and("recommendation", asString(description.getUsage())) .put("recommendation", asString(description.getUsage()))
.and("hash_length", asString(description.getHashLength())) .put("hash_length", asString(description.getHashLength()))
.and("ascii_restricted", asString(description.isAsciiRestricted())) .put("ascii_restricted", asString(description.isAsciiRestricted()))
.and("salt_type", asString(description.getSaltType())) .put("salt_type", asString(description.getSaltType()))
.and("salt_length", asString(description.getSaltLength())) .put("salt_length", asString(description.getSaltLength()))
.and("separate_salt", asString(description.hasSeparateSalt())) .put("separate_salt", asString(description.hasSeparateSalt()))
.build(); .build();
result.append(TagReplacer.applyReplacements(rowTemplate, tags)); result.append(TagReplacer.applyReplacements(rowTemplate, tags));
} }

View File

@ -51,3 +51,5 @@ If this column is empty when the salt type is "Text", it typically means the sal
##### Separate ##### Separate
If denoted with a **y**, it means that the salt is stored in a separate column in the database. This is neither good If denoted with a **y**, it means that the salt is stored in a separate column in the database. This is neither good
or bad. or bad.
{gen_footer}

View File

@ -1,6 +1,6 @@
package permissions; package permissions;
import utils.ANewMap; import com.google.common.collect.ImmutableMap;
import utils.FileUtils; import utils.FileUtils;
import utils.TagReplacer; import utils.TagReplacer;
import utils.ToolTask; import utils.ToolTask;
@ -31,8 +31,8 @@ public class PermissionsListWriter implements ToolTask {
boolean writeToFile = false; boolean writeToFile = false;
if (includeDescription) { if (includeDescription) {
System.out.println("Write to file? [Enter 'y' for yes]"); System.out.println("Write to file? [Enter 'n' for no]");
writeToFile = matches("y", scanner); writeToFile = !matches("n", scanner);
} }
if (!includeDescription) { if (!includeDescription) {
@ -47,7 +47,7 @@ public class PermissionsListWriter implements ToolTask {
private static void generateAndWriteFile() { private static void generateAndWriteFile() {
final String permissionsTagValue = generatePermissionsList(); final String permissionsTagValue = generatePermissionsList();
Map<String, String> tags = ANewMap.with("permissions", permissionsTagValue).build(); Map<String, String> tags = ImmutableMap.of("permissions", permissionsTagValue);
FileUtils.generateFileFromTemplate( FileUtils.generateFileFromTemplate(
ToolsConstants.TOOLS_SOURCE_ROOT + "permissions/permission_nodes.tpl.md", PERMISSIONS_OUTPUT_FILE, tags); ToolsConstants.TOOLS_SOURCE_ROOT + "permissions/permission_nodes.tpl.md", PERMISSIONS_OUTPUT_FILE, tags);
System.out.println("Wrote to '" + PERMISSIONS_OUTPUT_FILE + "'"); System.out.println("Wrote to '" + PERMISSIONS_OUTPUT_FILE + "'");
@ -62,10 +62,9 @@ public class PermissionsListWriter implements ToolTask {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
for (Map.Entry<String, String> entry : permissions.entrySet()) { for (Map.Entry<String, String> entry : permissions.entrySet()) {
Map<String, String> tags = ANewMap Map<String, String> tags = ImmutableMap.of(
.with("node", entry.getKey()) "node", entry.getKey(),
.and("description", entry.getValue()) "description", entry.getValue());
.build();
sb.append(TagReplacer.applyReplacements(template, tags)); sb.append(TagReplacer.applyReplacements(template, tags));
} }
return sb.toString(); return sb.toString();

View File

@ -5,3 +5,5 @@
The following are the permission nodes that are currently supported by the latest dev builds. The following are the permission nodes that are currently supported by the latest dev builds.
{permissions} {permissions}
{gen_footer}

View File

@ -1,36 +0,0 @@
package utils;
import java.util.HashMap;
import java.util.Map;
/**
* A map builder for the lazy.
* <p />
* Sample usage:
* <code>
* Map&lt;String, Integer> map = ANewMap
* .with("test", 123)
* .and("text", 938)
* .and("abc", 456)
* .build();
* </code>
*/
public class ANewMap<K, V> {
private Map<K, V> map = new HashMap<>();
public static <K, V> ANewMap<K, V> with(K key, V value) {
ANewMap<K, V> instance = new ANewMap<>();
return instance.and(key, value);
}
public ANewMap<K, V> and(K key, V value) {
map.put(key, value);
return this;
}
public Map<K, V> build() {
return map;
}
}

View File

@ -11,8 +11,10 @@ import java.util.regex.Pattern;
* Class responsible for replacing template tags to actual content. * Class responsible for replacing template tags to actual content.
* For all files, the following tags are defined: * For all files, the following tags are defined:
* <ul> * <ul>
* <li>{gen_date} the generation date</li> * <li>{gen_date} the generation date</li>
* <li>{gen_warning} - warning not to edit the generated file directly</li> * <li>{gen_warning} - warning not to edit the generated file directly</li>
* <li>{gen_footer} - info footer with a link to the dev repo so users can find the most up-to-date
* version (in case the page is viewed on a fork)</li>
* </ul> * </ul>
*/ */
public class TagReplacer { public class TagReplacer {
@ -47,9 +49,13 @@ public class TagReplacer {
* @return The filled template * @return The filled template
*/ */
public static String applyReplacements(String template) { public static String applyReplacements(String template) {
String curDate = new Date().toString();
return template return template
.replace("{gen_date}", new Date().toString()) .replace("{gen_date}", curDate)
.replace("{gen_warning}", "AUTO-GENERATED FILE! Do not edit this directly"); .replace("{gen_warning}", "AUTO-GENERATED FILE! Do not edit this directly")
.replace("{gen_footer}", "---\n\nThis page was automatically generated on the"
+ " [AuthMe-Team/AuthMeReloaded repository](" + ToolsConstants.DOCS_FOLDER_URL + ")"
+ " on " + curDate);
} }
private static String replaceOptionalTag(String text, String tagName, String tagValue) { private static String replaceOptionalTag(String text, String tagName, String tagValue) {

View File

@ -14,6 +14,8 @@ public final class ToolsConstants {
public static final String TOOLS_SOURCE_ROOT = "src/tools/"; public static final String TOOLS_SOURCE_ROOT = "src/tools/";
public static final String DOCS_FOLDER = TOOLS_SOURCE_ROOT + "docs/"; public static final String DOCS_FOLDER = "docs/";
public static final String DOCS_FOLDER_URL = "https://github.com/AuthMe-Team/AuthMeReloaded/tree/master/docs/";
} }