mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-28 05:05:14 +01:00
Add a case checker option
This commit is contained in:
parent
f40d75e4aa
commit
1e5a29a502
@ -135,6 +135,13 @@ public class AsynchronousLogin {
|
||||
m.send(player, MessageKey.ACCOUNT_NOT_ACTIVATED);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (Settings.preventOtherCase && !player.getName().equals(pAuth.getRealName()))
|
||||
{
|
||||
// TODO: Add a message like : MessageKey.INVALID_NAME_CASE
|
||||
m.send(player, MessageKey.USERNAME_ALREADY_ONLINE_ERROR);
|
||||
return null;
|
||||
}
|
||||
AuthMeAsyncPreLoginEvent event = new AuthMeAsyncPreLoginEvent(player);
|
||||
Bukkit.getServer().getPluginManager().callEvent(event);
|
||||
if (!event.canLogin())
|
||||
|
@ -73,7 +73,7 @@ public final class Settings {
|
||||
enableProtection, enableAntiBot, recallEmail, useWelcomeMessage,
|
||||
broadcastWelcomeMessage, forceRegKick, forceRegLogin,
|
||||
checkVeryGames, delayJoinLeaveMessages, noTeleport, applyBlindEffect,
|
||||
customAttributes, generateImage, isRemoveSpeedEnabled;
|
||||
customAttributes, generateImage, isRemoveSpeedEnabled, preventOtherCase;
|
||||
public static String helpHeader, getNickRegex, getUnloggedinGroup, getMySQLHost,
|
||||
getMySQLPort, getMySQLUsername, getMySQLPassword, getMySQLDatabase,
|
||||
getMySQLTablename, getMySQLColumnName, getMySQLColumnPassword,
|
||||
@ -294,6 +294,7 @@ public final class Settings {
|
||||
forceRegisterCommandsAsConsole = configFile.getStringList("settings.forceRegisterCommandsAsConsole");
|
||||
customAttributes = configFile.getBoolean("Hooks.customAttributes");
|
||||
generateImage = configFile.getBoolean("Email.generateImage", false);
|
||||
preventOtherCase = configFile.getBoolean("settings.preventOtherCase", false);
|
||||
|
||||
// Load the welcome message
|
||||
getWelcomeMessage();
|
||||
@ -713,6 +714,12 @@ public final class Settings {
|
||||
changes = true;
|
||||
}
|
||||
|
||||
if (!contains("settings.preventOtherCase"))
|
||||
{
|
||||
set("settings.preventOtherCase", false);
|
||||
changes = true;
|
||||
}
|
||||
|
||||
if (contains("Email.mailText"))
|
||||
{
|
||||
set("Email.mailText", null);
|
||||
|
@ -259,6 +259,9 @@ settings:
|
||||
delayJoinLeaveMessages: true
|
||||
# Do we need to add potion effect Blinding before login/register ?
|
||||
applyBlindEffect: false
|
||||
# Do we need to prevent people to login without another case ?
|
||||
# Xephi is registered, also Xephi can login, but not XEPHI/xephi/XePhI
|
||||
preventOtherCase: false
|
||||
ExternalBoardOptions:
|
||||
# MySQL column for the salt , needed for some forum/cms support
|
||||
mySQLColumnSalt: ''
|
||||
|
Loading…
Reference in New Issue
Block a user