mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-11-24 03:05:17 +01:00
Force a player just registered by an admin to log again
This commit is contained in:
parent
5b98759b61
commit
8e90a5f9a8
@ -233,6 +233,7 @@ public class AdminCommand implements CommandExecutor {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
final String name = args[1].toLowerCase();
|
final String name = args[1].toLowerCase();
|
||||||
|
final String realName = args[1];
|
||||||
final String lowpass = args[2].toLowerCase();
|
final String lowpass = args[2].toLowerCase();
|
||||||
if (lowpass.contains("delete") || lowpass.contains("where") || lowpass.contains("insert") || lowpass.contains("modify") || lowpass.contains("from") || lowpass.contains("select") || lowpass.contains(";") || lowpass.contains("null") || !lowpass.matches(Settings.getPassRegex)) {
|
if (lowpass.contains("delete") || lowpass.contains("where") || lowpass.contains("insert") || lowpass.contains("modify") || lowpass.contains("from") || lowpass.contains("select") || lowpass.contains(";") || lowpass.contains("null") || !lowpass.matches(Settings.getPassRegex)) {
|
||||||
m.send(sender, "password_error");
|
m.send(sender, "password_error");
|
||||||
@ -269,6 +270,9 @@ public class AdminCommand implements CommandExecutor {
|
|||||||
m.send(sender, "error");
|
m.send(sender, "error");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
plugin.database.setUnlogged(name);
|
||||||
|
if (Bukkit.getPlayerExact(realName) != null)
|
||||||
|
Bukkit.getPlayerExact(realName).kickPlayer("An admin just registered you, please log again");
|
||||||
m.send(sender, "registered");
|
m.send(sender, "registered");
|
||||||
ConsoleLogger.info(name + " registered");
|
ConsoleLogger.info(name + " registered");
|
||||||
} catch (NoSuchAlgorithmException ex) {
|
} catch (NoSuchAlgorithmException ex) {
|
||||||
|
Loading…
Reference in New Issue
Block a user