mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Log messages from rooms, games and chats
This commit is contained in:
parent
02978ce404
commit
c875054fb5
3 changed files with 10 additions and 1 deletions
|
|
@ -395,7 +395,9 @@ Response::ResponseCode Server_ProtocolHandler::cmdMessage(const Command_Message
|
|||
SessionEvent *se = prepareSessionEvent(event);
|
||||
userInterface->sendProtocolItem(*se);
|
||||
rc.enqueuePreResponseItem(ServerMessage::SESSION_EVENT, se);
|
||||
|
||||
|
||||
databaseInterface->logMessage(userInfo->id(), QString::fromStdString(userInfo->name()), QString::fromStdString(userInfo->address()), QString::fromStdString(cmd.message()), Server_DatabaseInterface::MessageTargetChat, userInterface->getUserInfo()->id(), receiver);
|
||||
|
||||
return Response::RespOk;
|
||||
}
|
||||
|
||||
|
|
@ -543,6 +545,9 @@ Response::ResponseCode Server_ProtocolHandler::cmdRoomSay(const Command_RoomSay
|
|||
msg.replace(QChar('\n'), QChar(' '));
|
||||
|
||||
room->say(QString::fromStdString(userInfo->name()), msg);
|
||||
|
||||
databaseInterface->logMessage(userInfo->id(), QString::fromStdString(userInfo->name()), QString::fromStdString(userInfo->address()), msg, Server_DatabaseInterface::MessageTargetRoom, room->getId(), room->getName());
|
||||
|
||||
return Response::RespOk;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue