diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java index 8755e5ef..18c8e819 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/RoomManager.java @@ -14,6 +14,7 @@ import com.eu.habbo.habbohotel.games.wired.WiredGame; import com.eu.habbo.habbohotel.guilds.Guild; import com.eu.habbo.habbohotel.items.interactions.InteractionWired; import com.eu.habbo.habbohotel.messenger.MessengerBuddy; +import com.eu.habbo.habbohotel.navigation.NavigatorFilterComparator; import com.eu.habbo.habbohotel.navigation.NavigatorFilterField; import com.eu.habbo.habbohotel.navigation.NavigatorManager; import com.eu.habbo.habbohotel.permissions.Permission; @@ -152,6 +153,7 @@ public class RoomManager { THashMap> rooms = new THashMap<>(); String query = filterField.getDatabaseQuery() + " AND rooms.state NOT LIKE " + (showInvisible ? "''" : "'invisible'") + (category >= 0 ? "AND rooms.category = '" + category + "'" : "") + " ORDER BY rooms.users, rooms.id DESC LIMIT " + NavigatorManager.MAXIMUM_RESULTS_PER_PAGE; try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement(query)) { + statement.setString(1, (filterField.getComparator() == NavigatorFilterComparator.EQUALS ? value : "%" + value + "%")); try (ResultSet set = statement.executeQuery()) { while (set.next()) { Room room = this.activeRooms.get(set.getInt("id"));