diff --git a/common/server_game.cpp b/common/server_game.cpp index 647aa22e..58725742 100644 --- a/common/server_game.cpp +++ b/common/server_game.cpp @@ -436,7 +436,7 @@ void Server_Game::addPlayer(Server_AbstractUserInterface *userInterface, Respons { QMutexLocker locker(&gameMutex); - Server_Player *newPlayer = new Server_Player(this, nextPlayerId++, userInterface->copyUserInfo(true, true), spectator, userInterface); + Server_Player *newPlayer = new Server_Player(this, nextPlayerId++, userInterface->copyUserInfo(true, true, true), spectator, userInterface); newPlayer->moveToThread(thread()); Event_Join joinEvent; diff --git a/common/server_player.cpp b/common/server_player.cpp index ec8c09e2..f6d7ffce 100644 --- a/common/server_player.cpp +++ b/common/server_player.cpp @@ -768,7 +768,7 @@ Response::ResponseCode Server_Player::cmdGameSay(const Command_GameSay &cmd, Res event.set_message(cmd.message()); ges.enqueueGameEvent(event, playerId); - game->getRoom()->getServer()->getDatabaseInterface()->logMessage(playerId, QString::fromStdString(userInfo->name()), QString::fromStdString(userInfo->address()), QString::fromStdString(cmd.message()), Server_DatabaseInterface::MessageTargetGame, game->getGameId(), game->getDescription()); + game->getRoom()->getServer()->getDatabaseInterface()->logMessage(userInfo->id(), QString::fromStdString(userInfo->name()), QString::fromStdString(userInfo->address()), QString::fromStdString(cmd.message()), Server_DatabaseInterface::MessageTargetGame, game->getGameId(), game->getDescription()); return Response::RespOk; }