mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-17 04:27:45 -07:00
[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:
parent
bdb0f12f66
commit
aff93a4435
35 changed files with 1977 additions and 26 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue