diff --git a/NewAuthMeConf/advanced.yml b/PROTOTYPE AREA (future stuff and etc...)/NewConfiguration/advanced.yml similarity index 100% rename from NewAuthMeConf/advanced.yml rename to PROTOTYPE AREA (future stuff and etc...)/NewConfiguration/advanced.yml diff --git a/NewAuthMeConf/database.yml b/PROTOTYPE AREA (future stuff and etc...)/NewConfiguration/database.yml similarity index 100% rename from NewAuthMeConf/database.yml rename to PROTOTYPE AREA (future stuff and etc...)/NewConfiguration/database.yml diff --git a/PROTOTYPE AREA (future stuff and etc...)/NewConfiguration/emailSystem.yml b/PROTOTYPE AREA (future stuff and etc...)/NewConfiguration/emailSystem.yml new file mode 100644 index 00000000..48c9b59a --- /dev/null +++ b/PROTOTYPE AREA (future stuff and etc...)/NewConfiguration/emailSystem.yml @@ -0,0 +1,40 @@ +emailSystem: + # Do you want to replace the Password registration with an Email registration method? + enableEmailRegistration: false + # Do you want to enable the double check of the email address during a player registration? + # When it's true, registration require that kind of command: + # /register + doubleEmailCheck: true + # Like maxRegPerIp but with emails + maxRegPerEmail: 1 + # Do you want to recall players to add an email to their accounts? + recallPlayers: true + # Delay in minute for the recall scheduler + delayRecall: 5 + + passwordRecovery: + # Recovery password length + RecoveryPasswordLength: 8 + # Recovery Email subject + mailSubject: 'Your new AuthMe Password' + # Recovery Email text + mailText: 'Dear ,

This is your new AuthMe password for the server

:



Do not forget to change password after login!
/changepassword newPassword' + + smtpOptions: + # SMTP server host + mailSMTP: smtp.gmail.com + # SMTP server port + mailPort: 465 + # Email account that sends the mails + mailAccount: '' + # Email account's password + mailPassword: '' + # Custom SenderName, that replace the mailAccount name in the emails + mailSenderName: '' + + emailSecurity: + # Blacklisted domains for emails + emailBlacklist: + - 10minutemail.com + # Do you like a Whitelist instead of a Blacklist? + blacklistAsWhitelist: false diff --git a/NewAuthMeConf/forcedActions.yml b/PROTOTYPE AREA (future stuff and etc...)/NewConfiguration/forcedActions.yml similarity index 100% rename from NewAuthMeConf/forcedActions.yml rename to PROTOTYPE AREA (future stuff and etc...)/NewConfiguration/forcedActions.yml diff --git a/NewAuthMeConf/general.yml b/PROTOTYPE AREA (future stuff and etc...)/NewConfiguration/general.yml similarity index 75% rename from NewAuthMeConf/general.yml rename to PROTOTYPE AREA (future stuff and etc...)/NewConfiguration/general.yml index 1db49e34..c1d290c2 100644 --- a/NewAuthMeConf/general.yml +++ b/PROTOTYPE AREA (future stuff and etc...)/NewConfiguration/general.yml @@ -23,53 +23,11 @@ registration: minUsernameLength: 4 # Regex syntax allowed in player's username allowedNicknameCharacters: '[a-zA-Z0-9_]*' - # Do you want to kick players after a successful registration? # Do not use this option with the loginAfterRegister feature below! kickAfterRegistration: false # Do you want to force the player to login after a successful registration? loginAfterRegister: false - - emailSystem: - # Do you want to replace the Password registration with an Email registration method? - enableEmailRegistration: false - # Do you want to enable the double check of the email address during a player registration? - # When it's true, registration require that kind of command: - # /register - doubleEmailCheck: true - # Like maxRegPerIp but with emails - maxRegPerEmail: 1 - # Do you want to recall players to add an email to their accounts? - recallPlayers: true - # Delay in minute for the recall scheduler - delayRecall: 5 - - passwordRecovery: - # Recovery password length - RecoveryPasswordLength: 8 - # Recovery Email subject - mailSubject: 'Your new AuthMe Password' - # Recovery Email text - mailText: 'Dear ,

This is your new AuthMe password for the server

:



Do not forget to change password after login!
/changepassword newPassword' - - smtpOptions: - # SMTP server host - mailSMTP: smtp.gmail.com - # SMTP server port - mailPort: 465 - # Email account that sends the mails - mailAccount: '' - # Email account's password - mailPassword: '' - # Custom SenderName, that replace the mailAccount name in the emails - mailSenderName: '' - - emailSecurity: - # Blacklisted domains for emails - emailBlacklist: - - 10minutemail.com - # Do you like a Whitelist instead of a Blacklist? - blacklistAsWhitelist: false login: # How many players per IP can join the server concurrently? diff --git a/PROTOTYPE AREA (future stuff and etc...)/converters.txt b/PROTOTYPE AREA (future stuff and etc...)/converters.txt new file mode 100644 index 00000000..0290f672 --- /dev/null +++ b/PROTOTYPE AREA (future stuff and etc...)/converters.txt @@ -0,0 +1,21 @@ +_________________________________________________________________________________ +> < +> WARNING: Conversions can't be undone! DO ALWAYS A BACKUP BEFORE!!! < +> < +_________________________________________________________________________________ +> AuthMe Reloaded converters description file < +_________________________________________________________________________________ + +Built-in converters (Into the Plugin's core module): + Old File Backend ("file") >>> SQLite ("/authme converter flatfiletosqlite") THIS CONVERTER WILL BE REMOVED FROM THE CORE IN FUTURE VERSIONS!!! + +Converters in the Converters module (Into the Converters module avariable at: NEED LINK): + SQlite >>> MySql ("/authme converter sqlitetomysql") + MySql >>> Redis ("/authme converter mysqltoredis") + Rakamak >>> SQlite ("/authme converter rakamaktosqlite [databasefile.rak] [(ip-mode) (ipdatabasefle.rak)]") + CrazyLogin >>> SQlite ("/authme converter crazylogintosqlite [databasefile.db]") + xAuth (Min version 2.6) >>> SQlite ("/authme converter xauthtosqlite") NOTE: xAUTH MUST BE INSTALLED AND CONFIGURED IN THE SERVER, it works with all the xAuth backends! + +Discontinued Converters (use an old AuthMe version like 3.4): + RoyalAuth >>> SQlite + vAuth >>> SQlite diff --git a/README.md b/README.md index 87962af3..fc70c520 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@
-

+

The most used authentication plugin for CraftBukkit/Spigot!


#####Development tools: @@ -20,9 +20,11 @@ McStats: http://mcstats.org/plugin/AuthMe - + - + + +
diff --git a/src/main/java/fr/xephi/authme/process/quit/AsyncronousQuit.java b/src/main/java/fr/xephi/authme/process/quit/AsyncronousQuit.java index 953a3c71..0bd00118 100644 --- a/src/main/java/fr/xephi/authme/process/quit/AsyncronousQuit.java +++ b/src/main/java/fr/xephi/authme/process/quit/AsyncronousQuit.java @@ -10,7 +10,6 @@ import fr.xephi.authme.AuthMe; import fr.xephi.authme.Utils; import fr.xephi.authme.cache.auth.PlayerAuth; import fr.xephi.authme.cache.auth.PlayerCache; -import fr.xephi.authme.cache.backup.FileCache; import fr.xephi.authme.cache.limbo.LimboCache; import fr.xephi.authme.cache.limbo.LimboPlayer; import fr.xephi.authme.datasource.DataSource; @@ -25,7 +24,6 @@ public class AsyncronousQuit { protected Player p; protected Utils utils = Utils.getInstance(); private String name; - private FileCache playerBackup; private ItemStack[] armor = null; private ItemStack[] inv = null; private boolean isOp = false; @@ -39,7 +37,6 @@ public class AsyncronousQuit { this.plugin = plugin; this.database = database; this.name = p.getName().toLowerCase(); - this.playerBackup = new FileCache(plugin); this.isKick = isKick; } diff --git a/src/main/java/fr/xephi/authme/settings/Messages.java b/src/main/java/fr/xephi/authme/settings/Messages.java index b98bd7fc..bf88b15d 100644 --- a/src/main/java/fr/xephi/authme/settings/Messages.java +++ b/src/main/java/fr/xephi/authme/settings/Messages.java @@ -1,12 +1,9 @@ package fr.xephi.authme.settings; import java.io.File; -import java.io.InputStream; - import org.bukkit.command.CommandSender; import org.bukkit.configuration.file.YamlConfiguration; -import fr.xephi.authme.AuthMe; import fr.xephi.authme.ConsoleLogger; public class Messages extends CustomConfiguration { @@ -27,13 +24,11 @@ public class Messages extends CustomConfiguration { * @param filename * The filename to open */ - @SuppressWarnings("deprecation") public final void loadDefaults(File file) { - InputStream stream = AuthMe.getInstance().getResource(file.getName()); - if (stream == null) + if (!file.exists()) return; - setDefaults(YamlConfiguration.loadConfiguration(stream)); + setDefaults(YamlConfiguration.loadConfiguration(file)); } /** diff --git a/src/main/java/fr/xephi/authme/settings/Settings.java b/src/main/java/fr/xephi/authme/settings/Settings.java index ae53fdac..abd5e45f 100644 --- a/src/main/java/fr/xephi/authme/settings/Settings.java +++ b/src/main/java/fr/xephi/authme/settings/Settings.java @@ -7,7 +7,6 @@ import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; -import java.io.InputStream; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -102,7 +101,7 @@ public final class Settings extends YamlConfiguration { if (exists()) { load(); } else { - loadDefaults(file.getName()); + loadDefaults(file); load(); } configFile = (YamlConfiguration) plugin.getConfig(); @@ -672,7 +671,7 @@ public final class Settings extends YamlConfiguration { public final void reload() { load(); - loadDefaults(file.getName()); + loadDefaults(file); } /** @@ -704,13 +703,11 @@ public final class Settings extends YamlConfiguration { * @param filename * The filename to open */ - @SuppressWarnings("deprecation") - public final void loadDefaults(String filename) { - InputStream stream = plugin.getResource(filename); - if (stream == null) + public final void loadDefaults(File file) { + if (!file.exists()) return; - setDefaults(YamlConfiguration.loadConfiguration(stream)); + setDefaults(YamlConfiguration.loadConfiguration(file)); } /** diff --git a/src/main/resources/messages_de.yml b/src/main/resources/messages_de.yml index 4e104df7..ed3d965f 100644 --- a/src/main/resources/messages_de.yml +++ b/src/main/resources/messages_de.yml @@ -13,12 +13,12 @@ user_regged: '&cBenutzername ist schon vergeben' usage_reg: '&cBenutze: /register ' max_reg: '&fDu hast die maximale Anzahl an Accounts erreicht' no_perm: '&cKeine Rechte' -password_error_nick: '&fYou can''t use your name as password' -password_error_unsafe: '&fYou can''t use unsafe passwords' +password_error_nick: '&fDu kannst nicht deinen Namen als Passwort nutzen!' +password_error_unsafe: '&fDu kannst nicht unsichere Passwörter nutzen!' error: '&fEin Fehler ist aufgetreten. Bitte kontaktiere einen Admin' login_msg: '&cBitte logge dich ein mit "/login "' reg_msg: '&cBitte registriere dich mit "/register "' -reg_email_msg: '&cPlease register with "/register "' +reg_email_msg: '&cBitte registriere dich mit "/register "' usage_unreg: '&cBenutze: /unregister ' pwd_changed: '&cPasswort geändert!' user_unknown: '&cBenutzername nicht registriert' @@ -29,30 +29,30 @@ logged_in: '&cBereits eingeloggt!' logout: '&cErfolgreich ausgeloggt' same_nick: '&fSelber Name spielt bereits' registered: '&cErfolgreich registriert!' -pass_len: '&fDein Passwort ist zu kurz oder zu langg' +pass_len: '&fDein Passwort ist zu kurz oder zu lang' reload: '&fKonfiguration und Datenbank neu geladen' timeout: '&fZeitüberschreitung beim Login' usage_changepassword: '&fBenutze: /changepassword ' name_len: '&cDein Nickname ist zu kurz oder zu lang' regex: '&cDein Nichname enthält nicht erlaubte Zeichen. Zulässige Zeichen: REG_EX' add_email: '&cBitte hinterlege Deine E-Mail Adresse: /email add ' -bad_database_email: '[AuthMe] Der /email Befehl ist nur mit MySQL und SQLite kompatibel. Bitte kontaktieren einen Admin' -recovery_email: '&cPasswort vergessen? Nutze "/email recovery " für ein neues Passwort' -usage_captcha: '&cBenutze: /captcha ' +bad_database_email: '[AuthMe] Der /email Befehl ist nur mit MySQL und SQLite kompatibel. Bitte kontaktiere einen Administrator!' +recovery_email: '&cPasswort vergessen? Nutze "/email recovery " für ein neues Passwort' +usage_captcha: '&cBenutze: /captcha ' wrong_captcha: '&cFalsches Captcha, bitte nutze: /captcha ' valid_captcha: '&cDas Captcha ist korrekt!' kick_forvip: '&cEin VIP Spieler hat den vollen Server betreten!' kick_fullserver: '&cDer Server ist momentan voll, Sorry!' -usage_email_add: '&fUsage: /email add ' -usage_email_change: '&fUsage: /email change ' -usage_email_recovery: '&fUsage: /email recovery ' -new_email_invalid: '[AuthMe] New email invalid!' -old_email_invalid: '[AuthMe] Old email invalid!' -email_invalid: '[AuthMe] Invalid Email' -email_added: '[AuthMe] Email Added !' -email_confirm: '[AuthMe] Confirm your Email !' -email_changed: '[AuthMe] Email Change !' -email_send: '[AuthMe] Recovery Email Send !' -country_banned: 'Your country is banned from this server' -antibot_auto_enabled: '[AuthMe] AntiBotMod automatically enabled due to massive connections!' -antibot_auto_disabled: '[AuthMe] AntiBotMod automatically disabled after %m Minutes, hope invasion stopped' +usage_email_add: '&fBenutzung: /email add ' +usage_email_change: '&fBenutzung: /email change ' +usage_email_recovery: '&fBenutzung: /email recovery ' +new_email_invalid: '[AuthMe] Die neue Email ist ungültig!' +old_email_invalid: '[AuthMe] Die alte Email ist ungültig!' +email_invalid: '[AuthMe] Ungültige Email' +email_added: '[AuthMe] Email hinzugefügt!' +email_confirm: '[AuthMe] Bitte bestätige deine Email!' +email_changed: '[AuthMe] Email aktualisiert!' +email_send: '[AuthMe] Wiederherstellungs-Email wurde gesendet !' +country_banned: 'Dein Land ist gesperrt' +antibot_auto_enabled: '[AuthMe] AntiBotMod wurde aufgrund hoher Netzauslastung automatisch aktiviert!' +antibot_auto_disabled: '[AuthMe] AntiBotMod wurde nach %m Minuten deaktiviert, hoffentlich ist die Invasion vorbei' diff --git a/src/main/resources/messages_en.yml b/src/main/resources/messages_en.yml index 25099ef8..8f07d88b 100644 --- a/src/main/resources/messages_en.yml +++ b/src/main/resources/messages_en.yml @@ -1,59 +1,59 @@ -unknown_user: '&fThe requested user is not in the database' -unsafe_spawn: '&fYour quit location was unsafe, teleporting you to world spawn' +unknown_user: '&cCan''t find the requested user in the database!' +unsafe_spawn: '&cYour quit location was unsafe, you have been teleported to the world''s spawnpoint.' not_logged_in: '&cYou''re not logged in!' -reg_voluntarily: '&fYou can register your nickname with the command "/register "' +reg_voluntarily: 'You can register yourself to the server with the command "/register "' usage_log: '&cUsage: /login ' -wrong_pwd: '&cWrong password' +wrong_pwd: '&cWrong password!' unregistered: '&cSuccessfully unregistered!' -reg_disabled: '&cRegistration is disabled' -valid_session: '&cSession login' -login: '&cSuccessful login!' -vb_nonActiv: '&fYour account isn''t activated yet, check your emails!' -user_regged: '&cYou have already registered this username' +reg_disabled: '&cIn-game registration is disabled!' +valid_session: '&2Logged-in due to Session Reconnection.' +login: '&2Successful login!' +vb_nonActiv: '&cYour account isn''t activated yet, please check your emails!' +user_regged: '&cYou already have registered this username!' usage_reg: '&cUsage: /register ' -max_reg: '&fYou have exceeded the max number of registrations for your account' -no_perm: '&cYou don''t have the permission to execute this command' -error: '&fAn error occurred; Please contact the admin' -login_msg: '&cPlease login with "/login "' -reg_msg: '&cPlease register with "/register "' -reg_email_msg: '&cPlease register with "/register "' +max_reg: '&cYou have exceeded the maximum number of registrations for your connection!' +no_perm: '&4You don''t have the permission to perform this action!' +error: '&4An unexpected error occurred, please contact an Administrator!' +login_msg: '&cPlease, login with the command "/login "' +reg_msg: '&3Please, register to the server with the command "/register "' +reg_email_msg: '&3Please, register to the server with the command "/register "' usage_unreg: '&cUsage: /unregister ' -pwd_changed: '&cPassword changed!' -user_unknown: '&cUsername not registered' -password_error: '&fPassword doesn''t match' -password_error_nick: '&fYou can''t use your name as password, please choose another one' -password_error_unsafe: '&fThe chosen password is not safe, please choose another one' -invalid_session: '&fSession datas doesn''t match. Please wait until the end of the current session' -reg_only: '&fRegistered players only! Please visit http://example.com to register' +pwd_changed: '&2Password changed successfully!' +user_unknown: '&cThis user isn''t registered!' +password_error: '&cPasswords didn''t match, check them again!' +password_error_nick: '&cYou can''t use your name as password, please choose another one...' +password_error_unsafe: '&cThe chosen password isn''t safe, please choose another one...' +invalid_session: '&cYour IP has been changed and your session data has expired!' +reg_only: '&4Only registered users can join the server! Please visit http://example.com to register yourself!' logged_in: '&cYou''re already logged in!' -logout: '&cSuccessfully logged out' -same_nick: '&fThe same nick is already playing on the server' -registered: '&cSuccessfully registered!' -pass_len: '&fYour password didn''t reach the minimum length or exceeded the max length' -reload: '&fConfiguration and database has been reloaded' -timeout: '&fLogin timeout, please try again' -usage_changepassword: '&fUsage: /changepassword ' -name_len: '&cYour nickname is either too short or too long' -regex: '&cYour nickname contains illegal characters. Allowed chars: REG_EX' -add_email: '&cPlease add your email with: /email add ' -bad_database_email: '[AuthMe] This /email command is only available with MySQL and SQLite, contact an admin' -recovery_email: '&cForgot your password? Please use /email recovery ' -usage_captcha: '&cWe need you to type a captcha, please type: /captcha ' -wrong_captcha: '&cWrong Captcha, please type: /captcha THE_CAPTCHA' -valid_captcha: '&cYour captcha is valid!' -kick_forvip: '&cA VIP Player has joined the server when full!' -kick_fullserver: '&cThe server is full, try again later' -usage_email_add: '&fUsage: /email add ' -usage_email_change: '&fUsage: /email change ' -usage_email_recovery: '&fUsage: /email recovery ' -new_email_invalid: '[AuthMe] New email invalid!' -old_email_invalid: '[AuthMe] Old email invalid!' -email_invalid: '[AuthMe] Invalid email' -email_added: '[AuthMe] Email Added!' -email_confirm: '[AuthMe] Confirm your email!' -email_changed: '[AuthMe] Email changed!' -email_send: '[AuthMe] Recovery email sent!' -email_exists: '[AuthMe] An email already exists on your account. You can change it using the command below' -country_banned: 'Your country is banned from this server' -antibot_auto_enabled: '[AuthMe] AntiBotMod automatically enabled due to the number of connections!' -antibot_auto_disabled: '[AuthMe] AntiBotMod automatically disabled after %m minutes' +logout: '&2Logged-out successfully!' +same_nick: '&4The same username is already playing on the server!' +registered: '&2Successfully registered!' +pass_len: '&cYour password is too short or too long! Please try with another one!' +reload: '&2Configuration and database have been reloaded correctly!' +timeout: '&4Login timeout exceeded, you have been kicked from the server, please try again!' +usage_changepassword: '&cUsage: /changepassword ' +name_len: '&4Your username is either too short or too long!' +regex: '&4Your username contains illegal characters. Allowed chars: REG_EX' +add_email: '&3Please add your email to your account with the command "/email add "' +bad_database_email: '&4The /email command is available only with MySQL and SQLite databases, please contact an Admin!' #This should be removed! +recovery_email: '&3Forgot your password? Please use the command "/email recovery "' +usage_captcha: '&3To login you have to solve a captcha code, please use the command "/captcha "' +wrong_captcha: '&cWrong Captcha, please type "/captcha THE_CAPTCHA" into the chat!' +valid_captcha: '&2Captcha code solved correctly!' +kick_forvip: '&3A VIP Player has joined the server when it was full!' +kick_fullserver: '&4The server is full, try again later!' +usage_email_add: '&cUsage: /email add ' +usage_email_change: '&cUsage: /email change ' +usage_email_recovery: '&cUsage: /email recovery ' +new_email_invalid: '&cInvalid New Email, try again!' +old_email_invalid: '&cInvalid Old Email, try again!' +email_invalid: '&cInvalid Email address, try again!' +email_added: '&2Email address successfully added to your account!' +email_confirm: '&cPlease confirm your email address!' +email_changed: '&2Email address changed correctly!' +email_send: '&2Recovery email sent correctly! Check your email inbox!' +email_exists: '&cA recovery email was already sent! You can discart it and send a new one using the command below:' +country_banned: '&4Your country is banned from this server!' +antibot_auto_enabled: '&4[AntiBotService] AntiBot enabled due to the huge number of connections!' +antibot_auto_disabled: '&2[AntiBotService] AntiBot disabled disabled after %m minutes!'