mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 09:01:08 +03:00
[FIX] Assess denied и witch
This commit is contained in:
parent
94d677fe1e
commit
be4c2f4b07
6 changed files with 7 additions and 7 deletions
|
@ -28,7 +28,7 @@ public void reply() throws IOException {
|
||||||
debug("Username: %s, Server ID: %s", username, serverID);
|
debug("Username: %s, Server ID: %s", username, serverID);
|
||||||
Client clientData = server.sessionManager.getClient(session);
|
Client clientData = server.sessionManager.getClient(session);
|
||||||
if (!clientData.isAuth || clientData.type != Client.Type.SERVER) {
|
if (!clientData.isAuth || clientData.type != Client.Type.SERVER) {
|
||||||
requestError("Assess denied");
|
requestError("Access denied");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Try check server with auth handler
|
// Try check server with auth handler
|
||||||
|
|
|
@ -26,7 +26,7 @@ public void reply() throws IOException {
|
||||||
String serverID = VerifyHelper.verifyServerID(input.readASCII(SerializeLimits.MAX_SERVERID)); // With minus sign
|
String serverID = VerifyHelper.verifyServerID(input.readASCII(SerializeLimits.MAX_SERVERID)); // With minus sign
|
||||||
Client clientData = server.sessionManager.getClient(session);
|
Client clientData = server.sessionManager.getClient(session);
|
||||||
if (!clientData.isAuth || clientData.type != Client.Type.USER) {
|
if (!clientData.isAuth || clientData.type != Client.Type.USER) {
|
||||||
requestError("Assess denied");
|
requestError("Access denied");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Try join server with auth handler
|
// Try join server with auth handler
|
||||||
|
|
|
@ -25,7 +25,7 @@ public void reply() throws IOException {
|
||||||
input.readBoolean();
|
input.readBoolean();
|
||||||
if (client.type == Client.Type.USER && !client.checkSign) {
|
if (client.type == Client.Type.USER && !client.checkSign) {
|
||||||
LogHelper.warning("User session: %d ip %s try get profiles", session, ip);
|
LogHelper.warning("User session: %d ip %s try get profiles", session, ip);
|
||||||
requestError("Assess denied");
|
requestError("Access denied");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
writeNoError(output);
|
writeNoError(output);
|
||||||
|
|
|
@ -39,7 +39,7 @@ public void reply() throws IOException {
|
||||||
}
|
}
|
||||||
Client clientData = server.sessionManager.getClient(session);
|
Client clientData = server.sessionManager.getClient(session);
|
||||||
if (!clientData.isAuth || clientData.type != Client.Type.USER || clientData.profile == null) {
|
if (!clientData.isAuth || clientData.type != Client.Type.USER || clientData.profile == null) {
|
||||||
requestError("Assess denied");
|
requestError("Access denied");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!clientData.permissions.canAdmin) {
|
if (!clientData.permissions.canAdmin) {
|
||||||
|
|
|
@ -19,7 +19,7 @@ public String getType() {
|
||||||
@Override
|
@Override
|
||||||
public void execute(WebSocketService service, ChannelHandlerContext ctx, Client client) throws Exception {
|
public void execute(WebSocketService service, ChannelHandlerContext ctx, Client client) throws Exception {
|
||||||
if (!client.isAuth || client.type != Client.Type.USER || client.profile == null) {
|
if (!client.isAuth || client.type != Client.Type.USER || client.profile == null) {
|
||||||
service.sendObject(ctx,new ErrorRequestEvent("Assess denied"));
|
service.sendObject(ctx,new ErrorRequestEvent("Access denied"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!client.permissions.canAdmin) {
|
if (!client.permissions.canAdmin) {
|
||||||
|
|
|
@ -44,9 +44,9 @@ public static void main(String[] arguments) throws IOException, InterruptedExcep
|
||||||
if (!process.isAlive()) {
|
if (!process.isAlive()) {
|
||||||
int errorcode = process.exitValue();
|
int errorcode = process.exitValue();
|
||||||
if (errorcode != 0)
|
if (errorcode != 0)
|
||||||
LogHelper.error("Process exit witch error code: %d", errorcode);
|
LogHelper.error("Process exitwith error code: %d", errorcode);
|
||||||
else
|
else
|
||||||
LogHelper.info("Process exit witch code 0");
|
LogHelper.info("Process exitwith code 0");
|
||||||
} else {
|
} else {
|
||||||
LogHelper.debug("Process started success");
|
LogHelper.debug("Process started success");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue