mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 00:40:52 +01:00
Merge branch 'dev' of https://git.krews.org/morningstar/Arcturus-Community into dev
This commit is contained in:
commit
e40f772e38
@ -21,7 +21,7 @@ import com.eu.habbo.messages.outgoing.generic.alerts.MessagesForYouComposer;
|
|||||||
import com.eu.habbo.messages.outgoing.habboway.nux.NewUserIdentityComposer;
|
import com.eu.habbo.messages.outgoing.habboway.nux.NewUserIdentityComposer;
|
||||||
import com.eu.habbo.messages.outgoing.handshake.DebugConsoleComposer;
|
import com.eu.habbo.messages.outgoing.handshake.DebugConsoleComposer;
|
||||||
import com.eu.habbo.messages.outgoing.handshake.SecureLoginOKComposer;
|
import com.eu.habbo.messages.outgoing.handshake.SecureLoginOKComposer;
|
||||||
import com.eu.habbo.messages.outgoing.handshake.SessionRightsComposer;
|
import com.eu.habbo.messages.outgoing.handshake.AvailabilityStatusMessageComposer;
|
||||||
import com.eu.habbo.messages.outgoing.handshake.PingComposer;
|
import com.eu.habbo.messages.outgoing.handshake.PingComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.InventoryAchievementsComposer;
|
import com.eu.habbo.messages.outgoing.inventory.InventoryAchievementsComposer;
|
||||||
import com.eu.habbo.messages.outgoing.inventory.InventoryRefreshComposer;
|
import com.eu.habbo.messages.outgoing.inventory.InventoryRefreshComposer;
|
||||||
@ -59,6 +59,7 @@ public class SecureLoginEvent extends MessageHandler {
|
|||||||
|
|
||||||
if (Emulator.getConfig().getBoolean("encryption.forced", false) && Emulator.getCrypto().isEnabled() && !this.client.isHandshakeFinished()) {
|
if (Emulator.getConfig().getBoolean("encryption.forced", false) && Emulator.getCrypto().isEnabled() && !this.client.isHandshakeFinished()) {
|
||||||
Emulator.getGameServer().getGameClientManager().disposeClient(this.client);
|
Emulator.getGameServer().getGameClientManager().disposeClient(this.client);
|
||||||
|
LOGGER.warn("Encryption is forced and TLS Handshake isn't finished! Closed connection...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,11 +67,13 @@ public class SecureLoginEvent extends MessageHandler {
|
|||||||
|
|
||||||
if (Emulator.getPluginManager().fireEvent(new SSOAuthenticationEvent(sso)).isCancelled()) {
|
if (Emulator.getPluginManager().fireEvent(new SSOAuthenticationEvent(sso)).isCancelled()) {
|
||||||
Emulator.getGameServer().getGameClientManager().disposeClient(this.client);
|
Emulator.getGameServer().getGameClientManager().disposeClient(this.client);
|
||||||
|
LOGGER.info("SSO Authentication is cancelled by a plugin. Closed connection...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sso.isEmpty()) {
|
if (sso.isEmpty()) {
|
||||||
Emulator.getGameServer().getGameClientManager().disposeClient(this.client);
|
Emulator.getGameServer().getGameClientManager().disposeClient(this.client);
|
||||||
|
LOGGER.warn("Client is trying to connect without SSO ticket! Closed connection...");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,7 +120,7 @@ public class SecureLoginEvent extends MessageHandler {
|
|||||||
messages.add(new UserClothesComposer(this.client.getHabbo()).compose());
|
messages.add(new UserClothesComposer(this.client.getHabbo()).compose());
|
||||||
messages.add(new NewUserIdentityComposer(habbo).compose());
|
messages.add(new NewUserIdentityComposer(habbo).compose());
|
||||||
messages.add(new UserPermissionsComposer(this.client.getHabbo()).compose());
|
messages.add(new UserPermissionsComposer(this.client.getHabbo()).compose());
|
||||||
messages.add(new SessionRightsComposer().compose());
|
messages.add(new AvailabilityStatusMessageComposer(true, false, true).compose());
|
||||||
messages.add(new PingComposer().compose());
|
messages.add(new PingComposer().compose());
|
||||||
messages.add(new DebugConsoleComposer(Emulator.debugging).compose());
|
messages.add(new DebugConsoleComposer(Emulator.debugging).compose());
|
||||||
messages.add(new UserAchievementScoreComposer(this.client.getHabbo()).compose());
|
messages.add(new UserAchievementScoreComposer(this.client.getHabbo()).compose());
|
||||||
@ -216,6 +219,7 @@ public class SecureLoginEvent extends MessageHandler {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Emulator.getGameServer().getGameClientManager().disposeClient(this.client);
|
Emulator.getGameServer().getGameClientManager().disposeClient(this.client);
|
||||||
|
LOGGER.warn("Someone tried to login with a non-existing SSO token! Closed connection...");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Emulator.getGameServer().getGameClientManager().disposeClient(this.client);
|
Emulator.getGameServer().getGameClientManager().disposeClient(this.client);
|
||||||
|
@ -84,7 +84,7 @@ public class Outgoing {
|
|||||||
public final static int RoomScoreComposer = 482;
|
public final static int RoomScoreComposer = 482;
|
||||||
public final static int DoorbellAddUserComposer = 2309;
|
public final static int DoorbellAddUserComposer = 2309;
|
||||||
public final static int SecureLoginOKComposer = 2491;
|
public final static int SecureLoginOKComposer = 2491;
|
||||||
public final static int SessionRightsComposer = 2033;
|
public final static int AvailabilityStatusMessageComposer = 2033;
|
||||||
public final static int GuildMemberUpdateComposer = 265;
|
public final static int GuildMemberUpdateComposer = 265;
|
||||||
public final static int RoomFloorItemsComposer = 1778;
|
public final static int RoomFloorItemsComposer = 1778;
|
||||||
public final static int InventoryItemsComposer = 994;
|
public final static int InventoryItemsComposer = 994;
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.eu.habbo.messages.outgoing.handshake;
|
||||||
|
|
||||||
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
|
import com.eu.habbo.messages.outgoing.MessageComposer;
|
||||||
|
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||||
|
|
||||||
|
public class AvailabilityStatusMessageComposer extends MessageComposer {
|
||||||
|
private final boolean isOpen;
|
||||||
|
private final boolean isShuttingDown;
|
||||||
|
private final boolean isAuthenticHabbo;
|
||||||
|
|
||||||
|
public AvailabilityStatusMessageComposer(boolean isOpen, boolean isShuttingDown, boolean isAuthenticHabbo) {
|
||||||
|
this.isOpen = isOpen;
|
||||||
|
this.isShuttingDown = isShuttingDown;
|
||||||
|
this.isAuthenticHabbo = isAuthenticHabbo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ServerMessage composeInternal() {
|
||||||
|
this.response.init(Outgoing.AvailabilityStatusMessageComposer);
|
||||||
|
|
||||||
|
this.response.appendBoolean(isOpen);//isOpen
|
||||||
|
this.response.appendBoolean(isShuttingDown);//onShutdown
|
||||||
|
this.response.appendBoolean(isAuthenticHabbo);//isAuthenticHabbo
|
||||||
|
return this.response;
|
||||||
|
}
|
||||||
|
}
|
@ -1,20 +0,0 @@
|
|||||||
package com.eu.habbo.messages.outgoing.handshake;
|
|
||||||
|
|
||||||
import com.eu.habbo.messages.ServerMessage;
|
|
||||||
import com.eu.habbo.messages.outgoing.MessageComposer;
|
|
||||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
|
||||||
|
|
||||||
public class SessionRightsComposer extends MessageComposer {
|
|
||||||
private static final boolean unknownBooleanOne = true; //true
|
|
||||||
private static final boolean unknownBooleanTwo = false;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected ServerMessage composeInternal() {
|
|
||||||
this.response.init(Outgoing.SessionRightsComposer);
|
|
||||||
|
|
||||||
this.response.appendBoolean(unknownBooleanOne);
|
|
||||||
this.response.appendBoolean(true);
|
|
||||||
this.response.appendBoolean(true);
|
|
||||||
return this.response;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user