[GamesModel] Rename 'Creator' column to 'Host' (#7083)

* [GamesModel] Rename 'Creator' column to 'Host' (#2108)


Took 5 minutes

* Actually re-broadcast host change

Took 8 minutes

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
This commit is contained in:
BruebachL 2026-08-13 18:58:21 +02:00 • committed by GitHub
parent 48776cfeba
commit 26fb8622e3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 59 additions and 42 deletions

View file

@ -526,10 +526,7 @@ void Server_Game::addPlayer(Server_AbstractUserInterface *userInterface,
if (broadcastUpdate) {
ServerInfo_Game gameInfo;
gameInfo.set_room_id(room->getId());
gameInfo.set_game_id(gameId);
gameInfo.set_player_count(getPlayerCount());
gameInfo.set_spectators_count(getSpectatorCount());
getInfo(gameInfo);
emit gameInfoChanged(gameInfo);
}
@ -588,10 +585,7 @@ void Server_Game::removeParticipant(Server_AbstractParticipant *participant, Eve
}
ServerInfo_Game gameInfo;
gameInfo.set_room_id(room->getId());
gameInfo.set_game_id(gameId);
gameInfo.set_player_count(getPlayerCount());
gameInfo.set_spectators_count(getSpectatorCount());
getInfo(gameInfo);
emit gameInfoChanged(gameInfo);
}
@ -847,6 +841,12 @@ void Server_Game::getInfo(ServerInfo_Game &result) const
result.set_player_count(getPlayerCount());
result.set_started(gameStarted);
result.mutable_creator_info()->CopyFrom(*getCreatorInfo());
const Server_AbstractParticipant *host = participants.value(hostId, nullptr);
if (host != nullptr) {
result.mutable_host_info()->CopyFrom(*host->getUserInfo());
} else {
result.mutable_host_info()->CopyFrom(*getCreatorInfo());
}
result.set_only_buddies(onlyBuddies);
result.set_only_registered(onlyRegistered);
result.set_spectators_allowed(getSpectatorsAllowed());