From 7106026b732f7bca26d7fa458dceff92e49a0629 Mon Sep 17 00:00:00 2001 From: Snaiker Date: Fri, 5 Mar 2021 22:33:12 +0000 Subject: [PATCH] Hide mail --- .../java/com/eu/habbo/habbohotel/modtool/ModToolManager.java | 2 +- .../messages/outgoing/modtool/ModToolUserInfoComposer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/modtool/ModToolManager.java b/src/main/java/com/eu/habbo/habbohotel/modtool/ModToolManager.java index 9bb9f5da..2a65ba4a 100644 --- a/src/main/java/com/eu/habbo/habbohotel/modtool/ModToolManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/modtool/ModToolManager.java @@ -54,7 +54,7 @@ public class ModToolManager { if (userId <= 0) return; - try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT users.*, users_settings.*, permissions.rank_name, permissions.id as rank_id FROM users INNER JOIN users_settings ON users.id = users_settings.user_id INNER JOIN permissions ON permissions.id = users.rank WHERE users.id = ? LIMIT 1")) { + try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT users.*, users_settings.*, permissions.rank_name, permissions.acc_hide_mail AS hide_mail, permissions.id AS rank_id FROM users INNER JOIN users_settings ON users.id = users_settings.user_id INNER JOIN permissions ON permissions.id = users.rank WHERE users.id = ? LIMIT 1")) { statement.setInt(1, userId); try (ResultSet set = statement.executeQuery()) { while (set.next()) { diff --git a/src/main/java/com/eu/habbo/messages/outgoing/modtool/ModToolUserInfoComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/modtool/ModToolUserInfoComposer.java index 74fde87e..41bce32f 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/modtool/ModToolUserInfoComposer.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/modtool/ModToolUserInfoComposer.java @@ -58,7 +58,7 @@ public class ModToolUserInfoComposer extends MessageComposer { this.response.appendString(""); //Last Purchase Timestamp this.response.appendInt(this.set.getInt("user_id")); //Personal Identification # this.response.appendInt(0); // Number of account bans - this.response.appendString(this.set.getString("mail")); + this.response.appendString(this.set.getBoolean("hide_mail") ? "" : this.set.getString("mail")); this.response.appendString("Rank (" + this.set.getInt("rank_id") + "): " + this.set.getString("rank_name")); //user_class_txt ModToolSanctions modToolSanctions = Emulator.getGameEnvironment().getModToolSanctions();