Make /getareas work like its Tsu counterpart

This is honestly the better variant. ngl.
Fixes 
This commit is contained in:
Salanto 2022-03-09 09:14:07 +01:00
parent cde07b5c50
commit 464eab3515

View File

@ -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"));
}