18 std::ostringstream oss;
19 uint32_t hostId = context.
room->getHost();
22 std::vector<uint32_t> players = context.
room->getPlayers();
23 oss <<
"=== Room " << context.
room->getId() <<
" ===";
24 oss <<
"\nPlayers (" << players.size() <<
"/" << context.
room->getMaxPlayers() <<
"): ";
26 if (players.empty()) {
29 for (uint32_t playerId : players) {
32 std::string playerName = player ? player->
playerName : (
"Player" + std::to_string(playerId));
34 oss <<
"\n - " << playerName <<
" (id: " << playerId <<
")";
35 if (playerId == hostId) {
42 std::vector<uint32_t> spectators = context.
room->getSpectators();
43 oss <<
"\nSpectators (" << spectators.size() <<
"): ";
45 if (spectators.empty()) {
49 for (uint32_t spectatorId : spectators) {
55 std::string spectatorName =
56 spectator ? spectator->
playerName : (
"Spectator" + std::to_string(spectatorId));
Context information for command execution.
std::shared_ptr< Room > room
Room where the command is executed.
::Server * server
Server instance for operations (global namespace)