From 464eab3515730e058b98bdaf63825b966d827bb4 Mon Sep 17 00:00:00 2001 From: Salanto <62221668+Salanto@users.noreply.github.com> Date: Wed, 9 Mar 2022 09:14:07 +0100 Subject: [PATCH 1/2] Make /getareas work like its Tsu counterpart This is honestly the better variant. ngl. Fixes #235 --- core/src/commands/area.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/commands/area.cpp b/core/src/commands/area.cpp index 2c88b8f..82c25d1 100644 --- a/core/src/commands/area.cpp +++ b/core/src/commands/area.cpp @@ -215,10 +215,12 @@ void AOClient::cmdGetAreas(int argc, QStringList argv) Q_UNUSED(argv); QStringList l_entries; - l_entries.append("== Area List =="); + l_entries.append("\n== Currently Online: " + QString::number(server->m_player_count)); for (int i = 0; i < server->m_area_names.length(); i++) { - QStringList l_cur_area_lines = buildAreaList(i); - l_entries.append(l_cur_area_lines); + if (server->m_areas.value(i)->playerCount() > 0) { + QStringList l_cur_area_lines = buildAreaList(i); + l_entries.append(l_cur_area_lines); + } } sendServerMessage(l_entries.join("\n")); } From 0a0e36f4fe127b9a73dcc4e58863d7a04eb56048 Mon Sep 17 00:00:00 2001 From: Salanto <62221668+Salanto@users.noreply.github.com> Date: Thu, 10 Mar 2022 19:41:58 +0100 Subject: [PATCH 2/2] Symmetry is everything Co-authored-by: Rosemary Witchaven <32779090+in1tiate@users.noreply.github.com> --- core/src/commands/area.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/commands/area.cpp b/core/src/commands/area.cpp index 82c25d1..1d56a81 100644 --- a/core/src/commands/area.cpp +++ b/core/src/commands/area.cpp @@ -215,7 +215,7 @@ void AOClient::cmdGetAreas(int argc, QStringList argv) Q_UNUSED(argv); QStringList l_entries; - l_entries.append("\n== Currently Online: " + QString::number(server->m_player_count)); + l_entries.append("\n== Currently Online: " + QString::number(server->m_player_count)+ " =="); for (int i = 0; i < server->m_area_names.length(); i++) { if (server->m_areas.value(i)->playerCount() > 0) { QStringList l_cur_area_lines = buildAreaList(i);