File tree Expand file tree Collapse file tree 6 files changed +23
-1
lines changed Expand file tree Collapse file tree 6 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 274274 Values: 0 - Off, 1 - Enabled. Default - 0 -->
275275 <elementdata_whitelisted>0</elementdata_whitelisted>
276276
277+ <!-- This parameter determines that the server checks when the players connect that there are no other players with the same serial number.
278+ Note that this may break compatibility with virtual machines.
279+ Not guarantees that the player cannot manipulate their serial.
280+ Values: 0 - Off, 1 - Enabled. Default - 1 -->
281+ <check_duplicate_serials>1</check_duplicate_serials>
282+
277283 <!-- Specifies the module(s) which are loaded with the server. To load several modules, add more <module>
278284 parameter(s). Optional parameter. -->
279285 <!-- <module src="sample_win32.dll"/> -->
Original file line number Diff line number Diff line change @@ -1799,7 +1799,7 @@ void CGame::Packet_PlayerJoinData(CPlayerJoinDataPacket& Packet)
17991799 }
18001800
18011801 // Check if another player is using the same serial
1802- if (m_pPlayerManager->GetBySerial (strSerial))
1802+ if (m_pMainConfig-> IsCheckDuplicateSerialsEnabled () && m_pPlayerManager->GetBySerial (strSerial))
18031803 {
18041804 // Tell the console
18051805 CLogger::LogPrintf (" CONNECT: %s failed to connect (Serial already in use) (%s)\n " , szNick, strIPAndSerial.c_str ());
Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ CMainConfig::CMainConfig(CConsole* pConsole) : CXMLConfig(NULL)
8080 m_iBackupAmount = 5 ;
8181 m_bSyncMapElementData = true ;
8282 m_elementDataWhitelisted = false ;
83+ m_checkDuplicateSerials = true ;
8384}
8485
8586bool CMainConfig::Load ()
@@ -528,6 +529,7 @@ bool CMainConfig::Load()
528529 }
529530
530531 GetBoolean (m_pRootNode, " elementdata_whitelisted" , m_elementDataWhitelisted);
532+ GetBoolean (m_pRootNode, " check_duplicate_serials" , m_checkDuplicateSerials);
531533
532534 ApplyNetOptions ();
533535
Original file line number Diff line number Diff line change @@ -127,6 +127,7 @@ class CMainConfig : public CXMLConfig
127127 bool IsDatabaseCredentialsProtectionEnabled () const { return m_bDatabaseCredentialsProtectionEnabled != 0 ; }
128128 bool IsFakeLagCommandEnabled () const { return m_bFakeLagCommandEnabled != 0 ; }
129129 bool IsElementDataWhitelisted () const { return m_elementDataWhitelisted; }
130+ bool IsCheckDuplicateSerialsEnabled () const noexcept { return m_checkDuplicateSerials; }
130131 bool IsCheckResourceClientFilesEnabled () const noexcept { return m_checkResourceClientFiles != 0 ; }
131132
132133 SString GetSetting (const SString& configSetting);
@@ -230,5 +231,6 @@ class CMainConfig : public CXMLConfig
230231 int m_iPlayerTriggeredEventIntervalMs;
231232 int m_iMaxPlayerTriggeredEventsPerInterval;
232233 bool m_elementDataWhitelisted;
234+ bool m_checkDuplicateSerials;
233235 int m_checkResourceClientFiles;
234236};
Original file line number Diff line number Diff line change 274274 Values: 0 - Off, 1 - Enabled. Default - 0 -->
275275 <elementdata_whitelisted>0</elementdata_whitelisted>
276276
277+ <!-- This parameter determines that the server checks when the players connect that there are no other players with the same serial number.
278+ Note that this may break compatibility with virtual machines.
279+ Not guarantees that the player cannot manipulate their serial.
280+ Values: 0 - Off, 1 - Enabled. Default - 1 -->
281+ <check_duplicate_serials>1</check_duplicate_serials>
282+
277283 <!-- These parameters specify the maximum amount of events that can be triggered by the client (via triggerServerEvent) within the given interval.
278284 Note: The interval is given in milliseconds
279285 Interval range: 50 to 5000. Default: 1000
Original file line number Diff line number Diff line change 275275 Values: 0 - Off, 1 - Enabled. Default - 0 -->
276276 <elementdata_whitelisted>0</elementdata_whitelisted>
277277
278+ <!-- This parameter determines that the server checks when the players connect that there are no other players with the same serial number.
279+ Note that this may break compatibility with virtual machines.
280+ Not guarantees that the player cannot manipulate their serial.
281+ Values: 0 - Off, 1 - Enabled. Default - 1 -->
282+ <check_duplicate_serials>1</check_duplicate_serials>
283+
278284 <!-- These parameters specify the maximum amount of events that can be triggered by the client (via triggerServerEvent) within the given interval.
279285 Note: The interval is given in milliseconds
280286 Interval range: 50 to 5000. Default: 1000
You can’t perform that action at this time.
0 commit comments