diff --git a/src/engine/server.h b/src/engine/server.h index 7111141a3..af9c395bc 100644 --- a/src/engine/server.h +++ b/src/engine/server.h @@ -356,7 +356,6 @@ public: virtual void TeehistorianRecordPlayerJoin(int ClientId, bool Sixup) = 0; virtual void TeehistorianRecordPlayerDrop(int ClientId, const char *pReason) = 0; virtual void TeehistorianRecordPlayerRejoin(int ClientId) = 0; - virtual void TeehistorianRecordPlayerName(int ClientId, const char *pName) = 0; virtual void FillAntibot(CAntibotRoundData *pData) = 0; diff --git a/src/engine/server/server.cpp b/src/engine/server/server.cpp index 403d6cf8c..f258dea50 100644 --- a/src/engine/server/server.cpp +++ b/src/engine/server/server.cpp @@ -354,11 +354,10 @@ bool CServer::SetClientNameImpl(int ClientId, const char *pNameRequest, bool Set bool Changed = str_comp(m_aClients[ClientId].m_aName, aNameTry) != 0; - if(Set && Changed) + if(Set) { // set the client name str_copy(m_aClients[ClientId].m_aName, aNameTry); - GameServer()->TeehistorianRecordPlayerName(ClientId, m_aClients[ClientId].m_aName); } return Changed; diff --git a/src/engine/shared/teehistorian_ex_chunks.h b/src/engine/shared/teehistorian_ex_chunks.h index e0f3f281a..b1f07fefd 100644 --- a/src/engine/shared/teehistorian_ex_chunks.h +++ b/src/engine/shared/teehistorian_ex_chunks.h @@ -18,4 +18,3 @@ UUID(TEEHISTORIAN_TEAM_PRACTICE, "teehistorian-team-practice@ddnet.tw") UUID(TEEHISTORIAN_PLAYER_READY, "teehistorian-player-ready@ddnet.tw") UUID(TEEHISTORIAN_PLAYER_REJOIN, "teehistorian-rejoinver6@ddnet.org") UUID(TEEHISTORIAN_ANTIBOT, "teehistorian-antibot@ddnet.org") -UUID(TEEHISTORIAN_PLAYER_NAME, "teehistorian-player-name@ddnet.org") diff --git a/src/game/server/gamecontext.cpp b/src/game/server/gamecontext.cpp index 8bc85ce77..9e806cd33 100644 --- a/src/game/server/gamecontext.cpp +++ b/src/game/server/gamecontext.cpp @@ -1767,14 +1767,6 @@ void CGameContext::TeehistorianRecordPlayerRejoin(int ClientId) } } -void CGameContext::TeehistorianRecordPlayerName(int ClientId, const char *pName) -{ - if(m_TeeHistorianActive) - { - m_TeeHistorian.RecordPlayerName(ClientId, pName); - } -} - bool CGameContext::OnClientDDNetVersionKnown(int ClientId) { IServer::CClientInfo Info; diff --git a/src/game/server/gamecontext.h b/src/game/server/gamecontext.h index bc6acb129..a47effe24 100644 --- a/src/game/server/gamecontext.h +++ b/src/game/server/gamecontext.h @@ -328,7 +328,6 @@ public: void TeehistorianRecordPlayerJoin(int ClientId, bool Sixup) override; void TeehistorianRecordPlayerDrop(int ClientId, const char *pReason) override; void TeehistorianRecordPlayerRejoin(int ClientId) override; - void TeehistorianRecordPlayerName(int ClientId, const char *pName) override; bool IsClientReady(int ClientId) const override; bool IsClientPlayer(int ClientId) const override; diff --git a/src/game/server/teehistorian.cpp b/src/game/server/teehistorian.cpp index fae9eba67..022c42819 100644 --- a/src/game/server/teehistorian.cpp +++ b/src/game/server/teehistorian.cpp @@ -573,23 +573,6 @@ void CTeeHistorian::RecordPlayerDrop(int ClientId, const char *pReason) Write(Buffer.Data(), Buffer.Size()); } -void CTeeHistorian::RecordPlayerName(int ClientId, const char *pName) -{ - EnsureTickWritten(); - - CPacker Buffer; - Buffer.Reset(); - Buffer.AddInt(ClientId); - Buffer.AddString(pName, 0); - - if(m_Debug) - { - dbg_msg("teehistorian", "drop cid=%d reason='%s'", ClientId, pName); - } - - WriteExtra(UUID_TEEHISTORIAN_PLAYER_NAME, Buffer.Data(), Buffer.Size()); -} - void CTeeHistorian::RecordConsoleCommand(int ClientId, int FlagMask, const char *pCmd, IConsole::IResult *pResult) { EnsureTickWritten(); diff --git a/src/game/server/teehistorian.h b/src/game/server/teehistorian.h index fc5203fc2..e9a8eb343 100644 --- a/src/game/server/teehistorian.h +++ b/src/game/server/teehistorian.h @@ -70,7 +70,6 @@ public: void RecordPlayerRejoin(int ClientId); void RecordPlayerReady(int ClientId); void RecordPlayerDrop(int ClientId, const char *pReason); - void RecordPlayerName(int ClientId, const char *pName); void RecordConsoleCommand(int ClientId, int FlagMask, const char *pCmd, IConsole::IResult *pResult); void RecordTestExtra(); void RecordPlayerSwap(int ClientId1, int ClientId2); diff --git a/src/test/teehistorian.cpp b/src/test/teehistorian.cpp index b05d7e9a9..60a912f92 100644 --- a/src/test/teehistorian.cpp +++ b/src/test/teehistorian.cpp @@ -838,24 +838,6 @@ TEST_F(TeeHistorian, AntibotEmptyMessage) Expect(EXPECTED, sizeof(EXPECTED)); } -TEST_F(TeeHistorian, PlayerName) -{ - const unsigned char EXPECTED[] = { - // EX uuid=d016f9b9-4151-3b87-87e5-3a6087eb5f26 datalen=4 - 0x4a, - 0xd0, 0x16, 0xf9, 0xb9, 0x41, 0x51, 0x3b, 0x87, - 0x87, 0xe5, 0x3a, 0x60, 0x87, 0xeb, 0x5f, 0x26, - 0x0e, - // (PLAYER_NAME) id=21 name="nameless tee" - 0x15, - 0x6e, 0x61, 0x6d, 0x65, 0x6c, 0x65, 0x73, 0x73, - 0x20, 0x74, 0x65, 0x65 - }; - - m_TH.RecordPlayerName(21, "nameless tee"); - Expect(EXPECTED, sizeof(EXPECTED)); -} - TEST_F(TeeHistorian, PrevGameUuid) { m_GameInfo.m_HavePrevGameUuid = true;