Merge pull request #236 from Salanto/fix/235

Make /getareas work like its Tsu counterpart
This commit is contained in:
stonedDiscord 2022-03-11 19:47:22 +01:00 committed by GitHub
commit 1e51131649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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