From 38d73d92289303c5af79955cb4e97be85cb42b78 Mon Sep 17 00:00:00 2001 From: in1tiate Date: Thu, 15 Apr 2021 14:10:53 -0500 Subject: [PATCH] cleanup --- src/packets.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/packets.cpp b/src/packets.cpp index 9790289..6ddce8a 100644 --- a/src/packets.cpp +++ b/src/packets.cpp @@ -377,13 +377,14 @@ void AOClient::pktAnnounceCase(AreaData* area, int argc, QStringList argv, AOPac if (needed_roles.isEmpty()) return; - QString message = "=== Case Announcement ===\r\n" + ooc_name == "" ? current_char : ooc_name + " needs " + needed_roles.join(", ") + " for " + case_title == "" ? "a case" : case_title + "!"; + QString message = "=== Case Announcement ===\r\n" + (ooc_name == "" ? current_char : ooc_name) + " needs " + needed_roles.join(", ") + " for " + (case_title == "" ? "a case" : case_title) + "!"; QList clients_to_alert; // here lies morton, RIP + QSet needs_set = needs_list.toSet(); for (AOClient* client : server->clients) { - QSet matches = client->casing_preferences.toSet().intersect(needs_list.toSet()); - if (matches.isEmpty() && !clients_to_alert.contains(client)) + QSet matches = client->casing_preferences.toSet().intersect(needs_set); + if (!matches.isEmpty() && !clients_to_alert.contains(client)) clients_to_alert.append(client); }