Start Re-Base: start from 5.3.4
This commit is contained in:
parent
91cb726c03
commit
4610904002
@ -69,9 +69,7 @@
|
|||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>3.2.0</version>
|
<version>3.2.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<additionalOptions>
|
<additionalOptions><additionalOption>-Xdoclint:none</additionalOption></additionalOptions>
|
||||||
<additionalOption>-Xdoclint:none</additionalOption>
|
|
||||||
</additionalOptions>
|
|
||||||
<show>public</show>
|
<show>public</show>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
@ -106,9 +104,9 @@
|
|||||||
|
|
||||||
<!-- MySQL Connector -->
|
<!-- MySQL Connector -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.mysql</groupId>
|
<groupId>mysql</groupId>
|
||||||
<artifactId>mysql-connector-j</artifactId>
|
<artifactId>mysql-connector-java</artifactId>
|
||||||
<version>8.3.0</version>
|
<version>8.0.22</version>
|
||||||
<scope>runtime</scope>
|
<scope>runtime</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
@ -36,8 +36,8 @@ public final class Emulator {
|
|||||||
private static final String CLASS_PATH = (System.getProperty("java.class.path") != null ? System.getProperty("java.class.path") : "Unknown");
|
private static final String CLASS_PATH = (System.getProperty("java.class.path") != null ? System.getProperty("java.class.path") : "Unknown");
|
||||||
|
|
||||||
public final static int MAJOR = 3;
|
public final static int MAJOR = 3;
|
||||||
public final static int MINOR = 5;
|
public final static int MINOR = 6;
|
||||||
public final static int BUILD = 1;
|
public final static int BUILD = 0;
|
||||||
public final static String PREVIEW = "";
|
public final static String PREVIEW = "";
|
||||||
|
|
||||||
public static final String version = "Arcturus Morningstar" + " " + MAJOR + "." + MINOR + "." + BUILD + " " + PREVIEW;
|
public static final String version = "Arcturus Morningstar" + " " + MAJOR + "." + MINOR + "." + BUILD + " " + PREVIEW;
|
||||||
@ -48,8 +48,8 @@ public final class Emulator {
|
|||||||
"██╔████╔██║██║ ██║██████╔╝██╔██╗ ██║██║██╔██╗ ██║██║ ███╗███████╗ ██║ ███████║██████╔╝\n" +
|
"██╔████╔██║██║ ██║██████╔╝██╔██╗ ██║██║██╔██╗ ██║██║ ███╗███████╗ ██║ ███████║██████╔╝\n" +
|
||||||
"██║╚██╔╝██║██║ ██║██╔══██╗██║╚██╗██║██║██║╚██╗██║██║ ██║╚════██║ ██║ ██╔══██║██╔══██╗\n" +
|
"██║╚██╔╝██║██║ ██║██╔══██╗██║╚██╗██║██║██║╚██╗██║██║ ██║╚════██║ ██║ ██╔══██║██╔══██╗\n" +
|
||||||
"██║ ╚═╝ ██║╚██████╔╝██║ ██║██║ ╚████║██║██║ ╚████║╚██████╔╝███████║ ██║ ██║ ██║██║ ██║\n" +
|
"██║ ╚═╝ ██║╚██████╔╝██║ ██║██║ ╚████║██║██║ ╚████║╚██████╔╝███████║ ██║ ██║ ██║██║ ██║\n" +
|
||||||
"╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝\n" ;
|
"╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝\n" +
|
||||||
|
"Still Rocking in 2024.\n";
|
||||||
|
|
||||||
public static String build = "";
|
public static String build = "";
|
||||||
public static boolean isReady = false;
|
public static boolean isReady = false;
|
||||||
@ -115,11 +115,13 @@ public final class Emulator {
|
|||||||
System.out.println("Warning, this is a beta build, this means that there may be unintended consequences so make sure you take regular backups while using this build. If you notice any issues you should make an issue on the Krews Git.");
|
System.out.println("Warning, this is a beta build, this means that there may be unintended consequences so make sure you take regular backups while using this build. If you notice any issues you should make an issue on the Krews Git.");
|
||||||
promptEnterKey();
|
promptEnterKey();
|
||||||
}
|
}
|
||||||
LOGGER.info("eek. Has it really been a year?");
|
System.out.println("");
|
||||||
|
LOGGER.warn("Arcturus Morningstar 3.x is no longer accepting merge requests. Please target MS4 branches if you wish to contribute.");
|
||||||
|
LOGGER.info("Follow our development at https://git.krews.org/morningstar/Arcturus-Community, ");
|
||||||
|
System.out.println("");
|
||||||
LOGGER.info("This project is for educational purposes only. This Emulator is an open-source fork of Arcturus created by TheGeneral.");
|
LOGGER.info("This project is for educational purposes only. This Emulator is an open-source fork of Arcturus created by TheGeneral.");
|
||||||
LOGGER.info("Version: {}", version);
|
LOGGER.info("Version: {}", version);
|
||||||
LOGGER.info("Build: {}", build);
|
LOGGER.info("Build: {}", build);
|
||||||
LOGGER.info("Follow our development at https://git.krews.org/morningstar/Arcturus-Community");
|
|
||||||
|
|
||||||
long startTime = System.nanoTime();
|
long startTime = System.nanoTime();
|
||||||
|
|
||||||
|
@ -22,7 +22,6 @@ class DatabasePool {
|
|||||||
DatabasePool() {
|
DatabasePool() {
|
||||||
// Private constructor for singleton pattern
|
// Private constructor for singleton pattern
|
||||||
}
|
}
|
||||||
|
|
||||||
public static synchronized DatabasePool getInstance() {
|
public static synchronized DatabasePool getInstance() {
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
instance = new DatabasePool();
|
instance = new DatabasePool();
|
||||||
|
@ -183,6 +183,10 @@ public class CatalogItem implements ISerialize, Runnable, Comparable<CatalogItem
|
|||||||
return this.orderNumber;
|
return this.orderNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setNeedsUpdate(boolean needsUpdate) {
|
||||||
|
this.needsUpdate = needsUpdate;
|
||||||
|
}
|
||||||
|
|
||||||
public synchronized void sellRare() {
|
public synchronized void sellRare() {
|
||||||
this.limitedSells++;
|
this.limitedSells++;
|
||||||
|
|
||||||
|
@ -674,9 +674,13 @@ public class CatalogManager {
|
|||||||
|
|
||||||
page = this.getCatalogPage(pageId);
|
page = this.getCatalogPage(pageId);
|
||||||
|
|
||||||
|
if (page == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
page.getCatalogItems().put(item.getId(), item);
|
page.getCatalogItems().put(item.getId(), item);
|
||||||
|
|
||||||
item.setPageId(pageId);
|
item.setPageId(pageId);
|
||||||
|
item.setNeedsUpdate(true);
|
||||||
|
|
||||||
item.run();
|
item.run();
|
||||||
return true;
|
return true;
|
||||||
@ -898,7 +902,9 @@ public class CatalogManager {
|
|||||||
boolean badgeFound = false;
|
boolean badgeFound = false;
|
||||||
|
|
||||||
for (int i = 0; i < amount; i++) {
|
for (int i = 0; i < amount; i++) {
|
||||||
|
if(item.isLimited()) {
|
||||||
habbo.getHabboStats().addLtdLog(item.getId(), Emulator.getIntUnixTimestamp());
|
habbo.getHabboStats().addLtdLog(item.getId(), Emulator.getIntUnixTimestamp());
|
||||||
|
}
|
||||||
|
|
||||||
for (Item baseItem : item.getBaseItems()) {
|
for (Item baseItem : item.getBaseItems()) {
|
||||||
for (int k = 0; k < item.getItemAmount(baseItem.getId()); k++) {
|
for (int k = 0; k < item.getItemAmount(baseItem.getId()); k++) {
|
||||||
|
@ -27,7 +27,7 @@ public class AddYoutubePlaylistCommand extends Command {
|
|||||||
int itemId;
|
int itemId;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
itemId = Integer.valueOf(params[1]);
|
itemId = Integer.parseInt(params[1]);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_add_youtube_playlist.no_base_item"));
|
gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_add_youtube_playlist.no_base_item"));
|
||||||
return true;
|
return true;
|
||||||
@ -45,7 +45,7 @@ public class AddYoutubePlaylistCommand extends Command {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Emulator.getGameEnvironment().getItemManager().getYoutubeManager().addPlaylistToItem(Integer.valueOf(params[1]), playlist);
|
Emulator.getGameEnvironment().getItemManager().getYoutubeManager().addPlaylistToItem(Integer.parseInt(params[1]), playlist);
|
||||||
|
|
||||||
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("INSERT INTO `youtube_playlists` (`item_id`, `playlist_id`) VALUES (?, ?)")) {
|
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("INSERT INTO `youtube_playlists` (`item_id`, `playlist_id`) VALUES (?, ?)")) {
|
||||||
statement.setInt(1, itemId);
|
statement.setInt(1, itemId);
|
||||||
|
@ -62,7 +62,7 @@ public class CommandHandler {
|
|||||||
|
|
||||||
|
|
||||||
public static boolean handleCommand(GameClient gameClient, String commandLine) {
|
public static boolean handleCommand(GameClient gameClient, String commandLine) {
|
||||||
if (gameClient != null) {
|
if (gameClient != null && commandLine != null) {
|
||||||
if (commandLine.startsWith(":")) {
|
if (commandLine.startsWith(":")) {
|
||||||
commandLine = commandLine.replaceFirst(":", "");
|
commandLine = commandLine.replaceFirst(":", "");
|
||||||
|
|
||||||
|
@ -95,20 +95,15 @@ public class YoutubeManager {
|
|||||||
final String playlistId = set.getString("playlist_id");
|
final String playlistId = set.getString("playlist_id");
|
||||||
|
|
||||||
youtubeDataLoaderPool.submit(() -> {
|
youtubeDataLoaderPool.submit(() -> {
|
||||||
ArrayList<YoutubePlaylist> playlists = this.playlists.getOrDefault(itemId, new ArrayList<>());
|
|
||||||
|
|
||||||
YoutubePlaylist playlist;
|
YoutubePlaylist playlist;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
playlist = this.getPlaylistDataById(playlistId);
|
playlist = this.getPlaylistDataById(playlistId);
|
||||||
if (playlist != null) {
|
if (playlist != null) {
|
||||||
playlists.add(playlist);
|
this.addPlaylistToItem(itemId, playlist);
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOGGER.error("Failed to load YouTube playlist {} ERROR: {}", playlistId, e);
|
LOGGER.error("Failed to load YouTube playlist {} ERROR: {}", playlistId, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.playlists.put(itemId, playlists);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,11 +16,12 @@ import java.sql.Connection;
|
|||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
public abstract class InteractionWired extends InteractionDefault {
|
public abstract class InteractionWired extends InteractionDefault {
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(InteractionWired.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(InteractionWired.class);
|
||||||
private long cooldown;
|
private long cooldown;
|
||||||
private TLongLongHashMap userExecutionCache = new TLongLongHashMap(3);
|
private final HashMap<Long,Long> userExecutionCache = new HashMap<>();
|
||||||
|
|
||||||
InteractionWired(ResultSet set, Item baseItem) throws SQLException {
|
InteractionWired(ResultSet set, Item baseItem) throws SQLException {
|
||||||
super(set, baseItem);
|
super(set, baseItem);
|
||||||
@ -76,8 +77,10 @@ public abstract class InteractionWired extends InteractionDefault {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void activateBox(Room room, RoomUnit roomUnit, long millis) {
|
public void activateBox(Room room, RoomUnit roomUnit, long millis) {
|
||||||
|
if(!room.isHideWired()) {
|
||||||
this.setExtradata(this.getExtradata().equals("1") ? "0" : "1");
|
this.setExtradata(this.getExtradata().equals("1") ? "0" : "1");
|
||||||
room.sendComposer(new ItemStateComposer(this).compose());
|
room.sendComposer(new ItemStateComposer(this).compose());
|
||||||
|
}
|
||||||
if (roomUnit != null) {
|
if (roomUnit != null) {
|
||||||
this.addUserExecutionCache(roomUnit.getId(), millis);
|
this.addUserExecutionCache(roomUnit.getId(), millis);
|
||||||
}
|
}
|
||||||
@ -112,7 +115,7 @@ public abstract class InteractionWired extends InteractionDefault {
|
|||||||
} else {
|
} else {
|
||||||
if (this.userExecutionCache.containsKey((long)roomUnitId)) {
|
if (this.userExecutionCache.containsKey((long)roomUnitId)) {
|
||||||
long lastTimestamp = this.userExecutionCache.get((long)roomUnitId);
|
long lastTimestamp = this.userExecutionCache.get((long)roomUnitId);
|
||||||
if (timestamp - lastTimestamp < 100L) {
|
if (timestamp - lastTimestamp < Math.max(100L, this.requiredCooldown())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,10 +125,16 @@ public class WiredTriggerRepeater extends InteractionWiredTrigger implements ICy
|
|||||||
@Override
|
@Override
|
||||||
public void cycle(Room room) {
|
public void cycle(Room room) {
|
||||||
this.counter += 500;
|
this.counter += 500;
|
||||||
if (this.counter >= this.repeatTime) {
|
long currentMillis = System.currentTimeMillis();
|
||||||
|
String Key = Double.toString(this.getX()) + Double.toString(this.getY());
|
||||||
|
|
||||||
|
room.repeatersLastTick.putIfAbsent(Key, currentMillis);
|
||||||
|
|
||||||
|
if (this.counter >= this.repeatTime && room.repeatersLastTick.get(Key) < currentMillis - 450) {
|
||||||
this.counter = 0;
|
this.counter = 0;
|
||||||
if (this.getRoomId() != 0) {
|
if (this.getRoomId() != 0) {
|
||||||
if (room.isLoaded()) {
|
if (room.isLoaded()) {
|
||||||
|
room.repeatersLastTick.put(Key, currentMillis);
|
||||||
WiredHandler.handle(this, null, room, new Object[]{this});
|
WiredHandler.handle(this, null, room, new Object[]{this});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -119,10 +119,16 @@ public class WiredTriggerRepeaterLong extends InteractionWiredTrigger implements
|
|||||||
@Override
|
@Override
|
||||||
public void cycle(Room room) {
|
public void cycle(Room room) {
|
||||||
this.counter += 500;
|
this.counter += 500;
|
||||||
if (this.counter >= this.repeatTime) {
|
long currentMillis = System.currentTimeMillis();
|
||||||
|
String Key = Double.toString(this.getX()) + Double.toString(this.getY());
|
||||||
|
|
||||||
|
room.repeatersLastTick.putIfAbsent(Key, currentMillis);
|
||||||
|
|
||||||
|
if (this.counter >= this.repeatTime && room.repeatersLastTick.get(Key) < currentMillis - 4950) {
|
||||||
this.counter = 0;
|
this.counter = 0;
|
||||||
if (this.getRoomId() != 0) {
|
if (this.getRoomId() != 0) {
|
||||||
if (room.isLoaded()) {
|
if (room.isLoaded()) {
|
||||||
|
room.repeatersLastTick.put(Key, currentMillis);
|
||||||
WiredHandler.handle(this, null, room, new Object[]{this});
|
WiredHandler.handle(this, null, room, new Object[]{this});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,6 +194,10 @@ public class WordFilter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public THashSet<WordFilterWord> getWords() {
|
||||||
|
return new THashSet<>(this.words);
|
||||||
|
}
|
||||||
|
|
||||||
public void addWord(WordFilterWord word) {
|
public void addWord(WordFilterWord word) {
|
||||||
this.words.add(word);
|
this.words.add(word);
|
||||||
}
|
}
|
||||||
|
@ -213,6 +213,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable {
|
|||||||
private TraxManager traxManager;
|
private TraxManager traxManager;
|
||||||
private boolean cycleOdd;
|
private boolean cycleOdd;
|
||||||
private long cycleTimestamp;
|
private long cycleTimestamp;
|
||||||
|
public Map<String, Long> repeatersLastTick = new HashMap<>();
|
||||||
|
|
||||||
public Room(ResultSet set) throws SQLException {
|
public Room(ResultSet set) throws SQLException {
|
||||||
this.id = set.getInt("id");
|
this.id = set.getInt("id");
|
||||||
|
@ -8,14 +8,19 @@ import com.eu.habbo.messages.ISerialize;
|
|||||||
import com.eu.habbo.messages.ServerMessage;
|
import com.eu.habbo.messages.ServerMessage;
|
||||||
import com.eu.habbo.messages.incoming.Incoming;
|
import com.eu.habbo.messages.incoming.Incoming;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.sql.PreparedStatement;
|
import java.sql.PreparedStatement;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class RoomChatMessage implements Runnable, ISerialize, DatabaseLoggable {
|
public class RoomChatMessage implements Runnable, ISerialize, DatabaseLoggable {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(RoomChatMessage.class);
|
||||||
private static final String QUERY = "INSERT INTO chatlogs_room (user_from_id, user_to_id, message, timestamp, room_id) VALUES (?, ?, ?, ?, ?)";
|
private static final String QUERY = "INSERT INTO chatlogs_room (user_from_id, user_to_id, message, timestamp, room_id) VALUES (?, ?, ?, ?, ?)";
|
||||||
|
|
||||||
private static final List<String> chatColors = Arrays.asList("@red@", "@cyan@", "@blue@", "@green@", "@purple@");
|
private static final List<String> chatColors = Arrays.asList("@red@", "@cyan@", "@blue@", "@green@", "@purple@");
|
||||||
public static int MAXIMUM_LENGTH = 100;
|
public static int MAXIMUM_LENGTH = 100;
|
||||||
//Configuration. Loaded from database & updated accordingly.
|
//Configuration. Loaded from database & updated accordingly.
|
||||||
@ -32,11 +37,10 @@ public class RoomChatMessage implements Runnable, ISerialize, DatabaseLoggable {
|
|||||||
private RoomChatMessageBubbles bubble;
|
private RoomChatMessageBubbles bubble;
|
||||||
private Habbo targetHabbo;
|
private Habbo targetHabbo;
|
||||||
private byte emotion;
|
private byte emotion;
|
||||||
private String RoomChatColour; //Added ChatColor
|
private String RoomChatColour;
|
||||||
|
; //Added ChatColor
|
||||||
|
|
||||||
public RoomChatMessage(MessageHandler message) {
|
public RoomChatMessage(MessageHandler message) {
|
||||||
|
|
||||||
if (message.packet.getMessageId() == Incoming.RoomUserWhisperEvent) {
|
if (message.packet.getMessageId() == Incoming.RoomUserWhisperEvent) {
|
||||||
String data = message.packet.readString();
|
String data = message.packet.readString();
|
||||||
this.targetHabbo = message.client.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(data.split(" ")[0]);
|
this.targetHabbo = message.client.getHabbo().getHabboInfo().getCurrentRoom().getHabbo(data.split(" ")[0]);
|
||||||
@ -44,14 +48,13 @@ public class RoomChatMessage implements Runnable, ISerialize, DatabaseLoggable {
|
|||||||
} else {
|
} else {
|
||||||
this.message = message.packet.readString();
|
this.message = message.packet.readString();
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.bubble = RoomChatMessageBubbles.getBubble(message.packet.readInt());
|
this.bubble = RoomChatMessageBubbles.getBubble(message.packet.readInt());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
this.bubble = RoomChatMessageBubbles.NORMAL;
|
this.bubble = RoomChatMessageBubbles.NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.RoomChatColour = message.packet.readString(); // Added for Room Chat Colour
|
this.RoomChatColour = message.packet.readString();
|
||||||
|
|
||||||
if (!message.client.getHabbo().hasPermission(Permission.ACC_ANYCHATCOLOR)) {
|
if (!message.client.getHabbo().hasPermission(Permission.ACC_ANYCHATCOLOR)) {
|
||||||
for (Integer i : RoomChatMessage.BANNED_BUBBLES) {
|
for (Integer i : RoomChatMessage.BANNED_BUBBLES) {
|
||||||
@ -138,6 +141,7 @@ public class RoomChatMessage implements Runnable, ISerialize, DatabaseLoggable {
|
|||||||
try {
|
try {
|
||||||
this.message = this.message.substring(0, RoomChatMessage.MAXIMUM_LENGTH - 1);
|
this.message = this.message.substring(0, RoomChatMessage.MAXIMUM_LENGTH - 1);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
LOGGER.error("Caught exception", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,8 +178,6 @@ public class RoomChatMessage implements Runnable, ISerialize, DatabaseLoggable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serialize(ServerMessage message) {
|
public void serialize(ServerMessage message) {
|
||||||
|
|
||||||
|
|
||||||
if (this.habbo != null && this.bubble.isOverridable()) {
|
if (this.habbo != null && this.bubble.isOverridable()) {
|
||||||
if (!this.habbo.hasPermission(Permission.ACC_ANYCHATCOLOR)) {
|
if (!this.habbo.hasPermission(Permission.ACC_ANYCHATCOLOR)) {
|
||||||
for (Integer i : RoomChatMessage.BANNED_BUBBLES) {
|
for (Integer i : RoomChatMessage.BANNED_BUBBLES) {
|
||||||
@ -199,10 +201,10 @@ public class RoomChatMessage implements Runnable, ISerialize, DatabaseLoggable {
|
|||||||
message.appendInt(this.getEmotion());
|
message.appendInt(this.getEmotion());
|
||||||
message.appendInt(this.getBubble().getType());
|
message.appendInt(this.getBubble().getType());
|
||||||
message.appendInt(0);
|
message.appendInt(0);
|
||||||
message.appendString(this.RoomChatColour); //Added packet for Room Chat Color
|
message.appendString(this.RoomChatColour); //Added packet for room chat
|
||||||
message.appendInt(this.getMessage().length());
|
message.appendInt(this.getMessage().length());
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
LOGGER.error("Caught exception", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,6 +227,7 @@ public class RoomChatMessage implements Runnable, ISerialize, DatabaseLoggable {
|
|||||||
if (muteTime > 0) {
|
if (muteTime > 0) {
|
||||||
this.habbo.mute(muteTime, false);
|
this.habbo.mute(muteTime, false);
|
||||||
} else {
|
} else {
|
||||||
|
LOGGER.error("Invalid hotel.wordfilter.automute defined in emulator_settings ({}).", muteTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +275,13 @@ public class RoomLayout {
|
|||||||
|
|
||||||
RoomTile doorTile = this.room.getLayout().getDoorTile();
|
RoomTile doorTile = this.room.getLayout().getDoorTile();
|
||||||
|
|
||||||
|
long startMillis = System.currentTimeMillis();
|
||||||
|
|
||||||
while (!openList.isEmpty()) {
|
while (!openList.isEmpty()) {
|
||||||
|
if (System.currentTimeMillis() - startMillis > Emulator.getConfig().getInt("pathfinder.execution_time.milli", 25) && Emulator.getConfig().getBoolean("pathfinder.max_execution_time.enabled", false)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
RoomTile current = this.lowestFInOpen(openList);
|
RoomTile current = this.lowestFInOpen(openList);
|
||||||
if (current.x == newTile.x && current.y == newTile.y) {
|
if (current.x == newTile.x && current.y == newTile.y) {
|
||||||
return this.calcPath(this.findTile(openList, oldTile.x, oldTile.y), current);
|
return this.calcPath(this.findTile(openList, oldTile.x, oldTile.y), current);
|
||||||
|
@ -294,6 +294,10 @@ public class RoomManager {
|
|||||||
public Room loadRoom(int id, boolean loadData) {
|
public Room loadRoom(int id, boolean loadData) {
|
||||||
Room room = null;
|
Room room = null;
|
||||||
|
|
||||||
|
if(id == 0) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.activeRooms.containsKey(id)) {
|
if (this.activeRooms.containsKey(id)) {
|
||||||
room = this.activeRooms.get(id);
|
room = this.activeRooms.get(id);
|
||||||
|
|
||||||
@ -414,7 +418,7 @@ public class RoomManager {
|
|||||||
|
|
||||||
public RoomLayout loadLayout(String name, Room room) {
|
public RoomLayout loadLayout(String name, Room room) {
|
||||||
RoomLayout layout = null;
|
RoomLayout layout = null;
|
||||||
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT * FROM room_models WHERE name LIKE ? LIMIT 1")) {
|
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT * FROM room_models WHERE name = ? LIMIT 1")) {
|
||||||
statement.setString(1, name);
|
statement.setString(1, name);
|
||||||
try (ResultSet set = statement.executeQuery()) {
|
try (ResultSet set = statement.executeQuery()) {
|
||||||
if (set.next()) {
|
if (set.next()) {
|
||||||
|
@ -118,10 +118,15 @@ public class Habbo implements Runnable {
|
|||||||
|
|
||||||
public boolean connect() {
|
public boolean connect() {
|
||||||
String ip = "";
|
String ip = "";
|
||||||
|
String ProxyIP = "";
|
||||||
|
|
||||||
if (!Emulator.getConfig().getBoolean("networking.tcp.proxy") && this.client.getChannel().remoteAddress() != null) {
|
if (!Emulator.getConfig().getBoolean("networking.tcp.proxy") && this.client.getChannel().remoteAddress() != null) {
|
||||||
SocketAddress address = this.client.getChannel().remoteAddress();
|
SocketAddress address = this.client.getChannel().remoteAddress();
|
||||||
ip = ((InetSocketAddress) address).getAddress().getHostAddress();
|
ip = ((InetSocketAddress) address).getAddress().getHostAddress();
|
||||||
|
ProxyIP = "- no proxy server used";
|
||||||
|
} else {
|
||||||
|
SocketAddress address = this.client.getChannel().remoteAddress();
|
||||||
|
ProxyIP = ((InetSocketAddress) address).getAddress().getHostAddress();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Emulator.getPluginManager().isRegistered(UserGetIPAddressEvent.class, true)) {
|
if (Emulator.getPluginManager().isRegistered(UserGetIPAddressEvent.class, true)) {
|
||||||
@ -135,6 +140,12 @@ public class Habbo implements Runnable {
|
|||||||
this.habboInfo.setIpLogin(ip);
|
this.habboInfo.setIpLogin(ip);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.client.getMachineId() == null || this.client.getMachineId().length() == 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.habboInfo.setMachineID(this.client.getMachineId());
|
||||||
|
|
||||||
if (Emulator.getGameEnvironment().getModToolManager().hasMACBan(this.client)) {
|
if (Emulator.getGameEnvironment().getModToolManager().hasMACBan(this.client)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -149,7 +160,8 @@ public class Habbo implements Runnable {
|
|||||||
this.messenger.connectionChanged(this, true, false);
|
this.messenger.connectionChanged(this, true, false);
|
||||||
|
|
||||||
Emulator.getGameEnvironment().getRoomManager().loadRoomsForHabbo(this);
|
Emulator.getGameEnvironment().getRoomManager().loadRoomsForHabbo(this);
|
||||||
LOGGER.info("{} logged in from IP {}", this.habboInfo.getUsername(), this.habboInfo.getIpLogin());
|
LOGGER.info("{} logged in from IP {} using proxyserver {}", this.habboInfo.getUsername(), this.habboInfo.getIpLogin(), ProxyIP);
|
||||||
|
LOGGER.info("{} client MachineId = {}", this.habboInfo.getUsername(), this.client.getMachineId());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -441,17 +453,22 @@ public class Habbo implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void clearCaches() {
|
public void clearCaches() {
|
||||||
int timestamp = Emulator.getIntUnixTimestamp();
|
int currentTimestamp = Emulator.getIntUnixTimestamp();
|
||||||
|
int twentyFourHoursInSeconds = 24 * 60 * 60; // 24 hours in seconds
|
||||||
|
|
||||||
THashMap<Integer, List<Integer>> newLog = new THashMap<>();
|
THashMap<Integer, List<Integer>> newLog = new THashMap<>();
|
||||||
|
|
||||||
for (Map.Entry<Integer, List<Integer>> ltdLog : this.habboStats.ltdPurchaseLog.entrySet()) {
|
for (Map.Entry<Integer, List<Integer>> ltdLog : this.habboStats.ltdPurchaseLog.entrySet()) {
|
||||||
|
List<Integer> filteredTimestamps = new ArrayList<>();
|
||||||
|
|
||||||
for (Integer time : ltdLog.getValue()) {
|
for (Integer time : ltdLog.getValue()) {
|
||||||
if (time > timestamp) {
|
if (currentTimestamp - time <= twentyFourHoursInSeconds) {
|
||||||
if (!newLog.containsKey(ltdLog.getKey())) {
|
filteredTimestamps.add(time);
|
||||||
newLog.put(ltdLog.getKey(), new ArrayList<>());
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
newLog.get(ltdLog.getKey()).add(time);
|
if (!filteredTimestamps.isEmpty()) {
|
||||||
}
|
newLog.put(ltdLog.getKey(), filteredTimestamps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ public class HabboStats implements Runnable {
|
|||||||
public THashSet<Subscription> subscriptions;
|
public THashSet<Subscription> subscriptions;
|
||||||
|
|
||||||
private HabboStats(ResultSet set, HabboInfo habboInfo) throws SQLException {
|
private HabboStats(ResultSet set, HabboInfo habboInfo) throws SQLException {
|
||||||
this.cache = new THashMap<>(0);
|
this.cache = new THashMap<>(1000);
|
||||||
this.achievementProgress = new THashMap<>(0);
|
this.achievementProgress = new THashMap<>(0);
|
||||||
this.achievementCache = new THashMap<>(0);
|
this.achievementCache = new THashMap<>(0);
|
||||||
this.recentPurchases = new THashMap<>(0);
|
this.recentPurchases = new THashMap<>(0);
|
||||||
|
@ -234,7 +234,7 @@ public class WiredHandler {
|
|||||||
executed = true;
|
executed = true;
|
||||||
if (!effect.requiresTriggeringUser() || (roomUnit != null && effect.requiresTriggeringUser())) {
|
if (!effect.requiresTriggeringUser() || (roomUnit != null && effect.requiresTriggeringUser())) {
|
||||||
Emulator.getThreading().run(() -> {
|
Emulator.getThreading().run(() -> {
|
||||||
if (room.isLoaded()) {
|
if (room.isLoaded() && room.getHabbos().size() > 0) {
|
||||||
try {
|
try {
|
||||||
if (!effect.execute(roomUnit, room, stuff)) return;
|
if (!effect.execute(roomUnit, room, stuff)) return;
|
||||||
effect.setCooldown(millis);
|
effect.setCooldown(millis);
|
||||||
|
@ -154,6 +154,18 @@ public class WiredHighscoreManager {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public HashMap<Integer, List<WiredHighscoreDataEntry>> getData() {
|
||||||
|
return this.data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<WiredHighscoreDataEntry> getEntriesForItemId(int itemId) {
|
||||||
|
return this.data.get(itemId);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEntriesForItemId(int itemId, List<WiredHighscoreDataEntry> entries) {
|
||||||
|
this.data.put(itemId, entries);
|
||||||
|
}
|
||||||
|
|
||||||
private long getTodayStartTimestamp() {
|
private long getTodayStartTimestamp() {
|
||||||
return LocalDateTime.now().with(LocalTime.MIDNIGHT).atZone(zoneId).toEpochSecond();
|
return LocalDateTime.now().with(LocalTime.MIDNIGHT).atZone(zoneId).toEpochSecond();
|
||||||
}
|
}
|
||||||
|
@ -2,12 +2,14 @@ package com.eu.habbo.messages.incoming.handshake;
|
|||||||
|
|
||||||
import com.eu.habbo.messages.NoAuthMessage;
|
import com.eu.habbo.messages.NoAuthMessage;
|
||||||
import com.eu.habbo.messages.incoming.MessageHandler;
|
import com.eu.habbo.messages.incoming.MessageHandler;
|
||||||
import com.eu.habbo.messages.outgoing.handshake.MachineIDComposer;
|
import org.slf4j.Logger;
|
||||||
import com.eu.habbo.util.HexUtils;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
@NoAuthMessage
|
@NoAuthMessage
|
||||||
public class MachineIDEvent extends MessageHandler {
|
public class MachineIDEvent extends MessageHandler {
|
||||||
|
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(MachineIDEvent.class);
|
||||||
|
|
||||||
private static final int HASH_LENGTH = 64;
|
private static final int HASH_LENGTH = 64;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -16,13 +18,12 @@ public class MachineIDEvent extends MessageHandler {
|
|||||||
String clientFingerprint = this.packet.readString();
|
String clientFingerprint = this.packet.readString();
|
||||||
String capabilities = this.packet.readString();
|
String capabilities = this.packet.readString();
|
||||||
|
|
||||||
// Update stored machine id if it doesn't match our requirements.
|
if (storedMachineId.length() > HASH_LENGTH) {
|
||||||
if (storedMachineId.startsWith("~") || storedMachineId.length() != HASH_LENGTH) {
|
storedMachineId = storedMachineId.substring(0, HASH_LENGTH);
|
||||||
storedMachineId = HexUtils.getRandom(HASH_LENGTH);
|
|
||||||
this.client.sendResponse(new MachineIDComposer(storedMachineId));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.client.setMachineId(storedMachineId);
|
this.client.setMachineId(storedMachineId);
|
||||||
}
|
|
||||||
|
|
||||||
|
LOGGER.debug("Setting client MachineId to {}", storedMachineId);
|
||||||
|
}
|
||||||
}
|
}
|
@ -11,6 +11,9 @@ import gnu.trove.procedure.TIntObjectProcedure;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class InventoryItemsComposer extends MessageComposer implements TIntObjectProcedure<HabboItem> {
|
public class InventoryItemsComposer extends MessageComposer implements TIntObjectProcedure<HabboItem> {
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(InventoryItemsComposer.class);
|
private static final Logger LOGGER = LoggerFactory.getLogger(InventoryItemsComposer.class);
|
||||||
|
|
||||||
@ -48,7 +51,7 @@ public class InventoryItemsComposer extends MessageComposer implements TIntObjec
|
|||||||
this.response.appendInt(habboItem.getId());
|
this.response.appendInt(habboItem.getId());
|
||||||
this.response.appendInt(habboItem.getBaseItem().getSpriteId());
|
this.response.appendInt(habboItem.getBaseItem().getSpriteId());
|
||||||
|
|
||||||
if (habboItem.getBaseItem().getName().equals("floor") || habboItem.getBaseItem().getName().equals("landscape") || habboItem.getBaseItem().getName().equals("wallpaper") || habboItem.getBaseItem().getName().equals("poster")) {
|
if (habboItem.getBaseItem().getName().equals("floor") || habboItem.getBaseItem().getName().equals("landscape") || habboItem.getBaseItem().getName().equals("song_disk") || habboItem.getBaseItem().getName().equals("wallpaper") || habboItem.getBaseItem().getName().equals("poster")) {
|
||||||
switch (habboItem.getBaseItem().getName()) {
|
switch (habboItem.getBaseItem().getName()) {
|
||||||
case "landscape":
|
case "landscape":
|
||||||
this.response.appendInt(4);
|
this.response.appendInt(4);
|
||||||
@ -62,10 +65,11 @@ public class InventoryItemsComposer extends MessageComposer implements TIntObjec
|
|||||||
case "poster":
|
case "poster":
|
||||||
this.response.appendInt(6);
|
this.response.appendInt(6);
|
||||||
break;
|
break;
|
||||||
|
case "song_disk":
|
||||||
|
this.response.appendInt(8);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
this.addExtraDataToResponse(habboItem);
|
||||||
this.response.appendInt(0);
|
|
||||||
this.response.appendString(habboItem.getExtradata());
|
|
||||||
} else {
|
} else {
|
||||||
if (habboItem.getBaseItem().getName().equals("gnome_box"))
|
if (habboItem.getBaseItem().getName().equals("gnome_box"))
|
||||||
this.response.appendInt(13);
|
this.response.appendInt(13);
|
||||||
@ -82,12 +86,25 @@ public class InventoryItemsComposer extends MessageComposer implements TIntObjec
|
|||||||
this.response.appendBoolean(true);
|
this.response.appendBoolean(true);
|
||||||
this.response.appendInt(-1);
|
this.response.appendInt(-1);
|
||||||
|
|
||||||
|
|
||||||
if (habboItem.getBaseItem().getType() == FurnitureType.FLOOR) {
|
if (habboItem.getBaseItem().getType() == FurnitureType.FLOOR) {
|
||||||
this.response.appendString("");
|
this.response.appendString("");
|
||||||
|
if(habboItem.getBaseItem().getName().equals("song_disk")) {
|
||||||
|
List<String> extraDataAsList = Arrays.asList(habboItem.getExtradata().split("\n"));
|
||||||
|
this.response.appendInt(Integer.valueOf(extraDataAsList.get(extraDataAsList.size() - 1)));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
this.response.appendInt(habboItem instanceof InteractionGift ? ((((InteractionGift) habboItem).getColorId() * 1000) + ((InteractionGift) habboItem).getRibbonId()) : 1);
|
this.response.appendInt(habboItem instanceof InteractionGift ? ((((InteractionGift) habboItem).getColorId() * 1000) + ((InteractionGift) habboItem).getRibbonId()) : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addExtraDataToResponse(HabboItem habboItem) {
|
||||||
|
this.response.appendInt(0);
|
||||||
|
this.response.appendString(habboItem.getExtradata());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -8,6 +8,8 @@ import com.eu.habbo.messages.outgoing.MessageComposer;
|
|||||||
import com.eu.habbo.messages.outgoing.Outgoing;
|
import com.eu.habbo.messages.outgoing.Outgoing;
|
||||||
import gnu.trove.set.hash.THashSet;
|
import gnu.trove.set.hash.THashSet;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
public class UpdateStackHeightComposer extends MessageComposer {
|
public class UpdateStackHeightComposer extends MessageComposer {
|
||||||
private int x;
|
private int x;
|
||||||
private int y;
|
private int y;
|
||||||
@ -34,6 +36,7 @@ public class UpdateStackHeightComposer extends MessageComposer {
|
|||||||
//TODO: maybe do this another way? doesn't seem to be very clean but gets the job done
|
//TODO: maybe do this another way? doesn't seem to be very clean but gets the job done
|
||||||
this.response.init(Outgoing.UpdateStackHeightComposer);
|
this.response.init(Outgoing.UpdateStackHeightComposer);
|
||||||
if (this.updateTiles != null) {
|
if (this.updateTiles != null) {
|
||||||
|
this.updateTiles.removeIf(Objects::isNull);
|
||||||
// prevent overflow. Byte max value is 127
|
// prevent overflow. Byte max value is 127
|
||||||
if(this.updateTiles.size() > 127) {
|
if(this.updateTiles.size() > 127) {
|
||||||
RoomTile[] tiles = this.updateTiles.toArray(new RoomTile[updateTiles.size()]);
|
RoomTile[] tiles = this.updateTiles.toArray(new RoomTile[updateTiles.size()]);
|
||||||
|
@ -7,11 +7,18 @@ import com.eu.habbo.threading.runnables.ChannelReadHandler;
|
|||||||
import io.netty.channel.ChannelHandler;
|
import io.netty.channel.ChannelHandler;
|
||||||
import io.netty.channel.ChannelHandlerContext;
|
import io.netty.channel.ChannelHandlerContext;
|
||||||
import io.netty.channel.ChannelInboundHandlerAdapter;
|
import io.netty.channel.ChannelInboundHandlerAdapter;
|
||||||
|
import io.netty.handler.codec.DecoderException;
|
||||||
import io.netty.handler.codec.TooLongFrameException;
|
import io.netty.handler.codec.TooLongFrameException;
|
||||||
|
import io.netty.handler.codec.UnsupportedMessageTypeException;
|
||||||
|
import io.netty.handler.ssl.NotSslRecordException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import javax.net.ssl.SSLException;
|
||||||
|
import javax.net.ssl.SSLHandshakeException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.security.KeyManagementException;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
|
||||||
@ChannelHandler.Sharable
|
@ChannelHandler.Sharable
|
||||||
public class GameMessageHandler extends ChannelInboundHandlerAdapter {
|
public class GameMessageHandler extends ChannelInboundHandlerAdapter {
|
||||||
@ -60,13 +67,34 @@ public class GameMessageHandler extends ChannelInboundHandlerAdapter {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Emulator.getConfig().getBoolean("debug.mode")) {
|
if (Emulator.getConfig().getBoolean("debug.mode")) {
|
||||||
if (cause instanceof TooLongFrameException) {
|
if (cause instanceof NotSslRecordException) {
|
||||||
LOGGER.error("Disconnecting client, reason: \"" + cause.getMessage() + "\".");
|
LOGGER.error("Plaintext received instead of ssl, closing channel");
|
||||||
} else {
|
}
|
||||||
LOGGER.error("Disconnecting client, exception in GameMessageHander.", cause);
|
else if (cause instanceof DecoderException) {
|
||||||
|
LOGGER.error("Plaintext received instead of ssl, closing channel");
|
||||||
|
}
|
||||||
|
else if (cause instanceof TooLongFrameException) {
|
||||||
|
LOGGER.error("Disconnecting client, reason " + cause.getMessage());
|
||||||
|
}
|
||||||
|
else if (cause instanceof SSLHandshakeException) {
|
||||||
|
LOGGER.error("URL Request error from source " + ctx.channel().remoteAddress());
|
||||||
|
}
|
||||||
|
else if (cause instanceof NoSuchAlgorithmException) {
|
||||||
|
LOGGER.error("Invalid SSL algorithm, only TLSv1.2 supported in the request");
|
||||||
|
}
|
||||||
|
else if (cause instanceof KeyManagementException) {
|
||||||
|
LOGGER.error("Invalid SSL algorithm, only TLSv1.2 supported in the request");
|
||||||
|
}
|
||||||
|
else if (cause instanceof UnsupportedMessageTypeException) {
|
||||||
|
LOGGER.error("There was an illegal SSL request from (X-forwarded-for/CF-Connecting-IP has not being injected yet!) " + ctx.channel().remoteAddress());
|
||||||
|
}
|
||||||
|
else if (cause instanceof SSLException) {
|
||||||
|
LOGGER.error("SSL Problem: "+ cause.getMessage() + cause);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
LOGGER.error("Disconnecting client, exception in GameMessageHandler.", cause);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ctx.channel().close();
|
ctx.channel().close();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user