[FIX] Assess denied и witch

This commit is contained in:
Gravit 2019-03-10 18:48:46 +07:00
parent 94d677fe1e
commit be4c2f4b07
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
6 changed files with 7 additions and 7 deletions

View file

@ -28,7 +28,7 @@ public void reply() throws IOException {
debug("Username: %s, Server ID: %s", username, serverID);
Client clientData = server.sessionManager.getClient(session);
if (!clientData.isAuth || clientData.type != Client.Type.SERVER) {
requestError("Assess denied");
requestError("Access denied");
return;
}
// Try check server with auth handler

View file

@ -26,7 +26,7 @@ public void reply() throws IOException {
String serverID = VerifyHelper.verifyServerID(input.readASCII(SerializeLimits.MAX_SERVERID)); // With minus sign
Client clientData = server.sessionManager.getClient(session);
if (!clientData.isAuth || clientData.type != Client.Type.USER) {
requestError("Assess denied");
requestError("Access denied");
return;
}
// Try join server with auth handler

View file

@ -25,7 +25,7 @@ public void reply() throws IOException {
input.readBoolean();
if (client.type == Client.Type.USER && !client.checkSign) {
LogHelper.warning("User session: %d ip %s try get profiles", session, ip);
requestError("Assess denied");
requestError("Access denied");
return;
}
writeNoError(output);

View file

@ -39,7 +39,7 @@ public void reply() throws IOException {
}
Client clientData = server.sessionManager.getClient(session);
if (!clientData.isAuth || clientData.type != Client.Type.USER || clientData.profile == null) {
requestError("Assess denied");
requestError("Access denied");
return;
}
if (!clientData.permissions.canAdmin) {

View file

@ -19,7 +19,7 @@ public String getType() {
@Override
public void execute(WebSocketService service, ChannelHandlerContext ctx, Client client) throws Exception {
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;
}
if (!client.permissions.canAdmin) {

View file

@ -44,9 +44,9 @@ public static void main(String[] arguments) throws IOException, InterruptedExcep
if (!process.isAlive()) {
int errorcode = process.exitValue();
if (errorcode != 0)
LogHelper.error("Process exit witch error code: %d", errorcode);
LogHelper.error("Process exitwith error code: %d", errorcode);
else
LogHelper.info("Process exit witch code 0");
LogHelper.info("Process exitwith code 0");
} else {
LogHelper.debug("Process started success");
}