[Room][UserList] Introduce style delegate for user list

- Allow users to set a card name and parameters as their background banner
- Allow mods to white/blacklist cards
- Allow toggling back to the old display style

Took 7 minutes

Took 28 seconds

Took 2 minutes

Took 2 minutes
This commit is contained in:
Lukas Brübach 2026-06-07 10:13:07 +02:00
parent bdb0f12f66
commit aff93a4435
35 changed files with 1977 additions and 26 deletions

View file

@ -190,6 +190,25 @@ AuthenticationResult Server::loginUser(Server_ProtocolHandler *session,
return authState;
}
void Server::broadcastUserInfoUpdate(Server_ProtocolHandler *source)
{
Event_UserJoined event;
event.mutable_user_info()->CopyFrom(source->copyUserInfo(false));
SessionEvent *se = Server_ProtocolHandler::prepareSessionEvent(event);
clientsLock.lockForRead();
for (auto &client : clients) {
if (client->getAcceptsUserListChanges()) {
client->sendProtocolItem(*se);
}
}
clientsLock.unlock();
sendIsl_SessionEvent(*se);
delete se;
}
void Server::addPersistentPlayer(const QString &userName, int roomId, int gameId, int playerId)
{
QWriteLocker locker(&persistentPlayersLock);