mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Fix replay chatview with new gummys (#2340)
Fix #2334 This update fixes the violation that happens when watching replays to determin the proper user privlevel in order to generate the correct gummy.
This commit is contained in:
parent
847d959326
commit
dbf7d7f748
7 changed files with 12 additions and 12 deletions
|
|
@ -273,8 +273,10 @@ void TabRoom::processRoomSayEvent(const Event_RoomSay &event)
|
|||
|
||||
UserListTWI *twi = userList->getUsers().value(senderName);
|
||||
UserLevelFlags userLevel;
|
||||
QString userPrivLevel;
|
||||
if (twi) {
|
||||
userLevel = UserLevelFlags(twi->getUserInfo().user_level());
|
||||
userPrivLevel = QString::fromStdString(twi->getUserInfo().privlevel());
|
||||
if (settingsCache->getIgnoreUnregisteredUsers() && !userLevel.testFlag(ServerInfo_User::IsRegistered))
|
||||
return;
|
||||
}
|
||||
|
|
@ -286,7 +288,7 @@ void TabRoom::processRoomSayEvent(const Event_RoomSay &event)
|
|||
message = "[" + QString(QDateTime::fromMSecsSinceEpoch(event.time_of()).toLocalTime().toString("d MMM yyyy HH:mm:ss")) + "] " + message;
|
||||
|
||||
|
||||
chatView->appendMessage(message, event.message_type(), senderName, userLevel, true);
|
||||
chatView->appendMessage(message, event.message_type(), senderName, userLevel, userPrivLevel, true);
|
||||
emit userEvent(false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue