add early whitelist kick
This commit is contained in:
parent
0732d9edff
commit
a429447754
2 changed files with 9 additions and 0 deletions
|
@ -98,6 +98,7 @@ public class Proxy {
|
|||
private boolean epoll = false;
|
||||
private boolean register = true;
|
||||
private boolean checkCase = true;
|
||||
private boolean kickOnConnect = true;
|
||||
private String forwardHost = "127.0.0.1";
|
||||
private int forwardPort = 25565;
|
||||
private String proxyHost = "";
|
||||
|
@ -362,6 +363,10 @@ public class Proxy {
|
|||
public boolean isCheckingCase() {
|
||||
return this.checkCase;
|
||||
}
|
||||
|
||||
public boolean isKickingOnConnect() {
|
||||
return this.kickOnConnect;
|
||||
}
|
||||
|
||||
public int getMinimumPasswordLength() {
|
||||
return this.minPassLength;
|
||||
|
|
|
@ -54,6 +54,10 @@ public class LoginHandler implements Handler {
|
|||
this.disconnect("That username is already taken");
|
||||
return;
|
||||
}
|
||||
else if(this.proxy.isKickingOnConnect() && !this.proxy.canRegister() && this.proxy.getUser(this.username) == null) {
|
||||
this.disconnect("You are not whitelisted on this server");
|
||||
return;
|
||||
}
|
||||
this.state = LoginState.DONE;
|
||||
|
||||
if(this.proxy.getCompression() >= 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue