@@ -121,7 +121,6 @@ WorldSession::WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, uint8
121121 m_TutorialsChanged(false ),
122122 recruiterId(recruiter),
123123 isRecruiter(isARecruiter),
124- timeLastWhoCommand(0 ),
125124 _RBACData(NULL )
126125{
127126 memset (m_Tutorials, 0 , sizeof (m_Tutorials));
@@ -1253,8 +1252,8 @@ bool WorldSession::DosProtection::EvaluateOpcode(WorldPacket& p, time_t time) co
12531252 if (++packetCounter.amountCounter > maxPacketCounterAllowed)
12541253 {
12551254 dosTriggered = true ;
1256- TC_LOG_WARN (" network" , " AntiDOS: Account %u, IP: %s, flooding packet (opc: %u, size : %u)" ,
1257- Session->GetAccountId (), Session->GetRemoteAddress ().c_str (), p.GetOpcode (), (uint32)p. size () );
1255+ TC_LOG_WARN (" network" , " AntiDOS: Account %u, IP: %s, flooding packet (opc: %s (0x%X), count : %u)" ,
1256+ Session->GetAccountId (), Session->GetRemoteAddress ().c_str (), opcodeTable[ p.GetOpcode ()]. name , p. GetOpcode (), packetCounter. amountCounter );
12581257 }
12591258
12601259 // Then check if player is sending packets not allowed
@@ -1304,6 +1303,13 @@ uint32 WorldSession::DosProtection::GetMaxPacketCounterAllowed(uint16 opcode) co
13041303 uint32 maxPacketCounterAllowed;
13051304 switch (opcode)
13061305 {
1306+ case CMSG_MESSAGECHAT :
1307+ {
1308+ maxPacketCounterAllowed = 500 ;
1309+ break ;
1310+ }
1311+
1312+ case CMSG_ATTACKSTOP :
13071313 case CMSG_ITEM_QUERY_SINGLE :
13081314 case CMSG_ITEM_NAME_QUERY :
13091315 case CMSG_GUILD_QUERY :
@@ -1339,19 +1345,20 @@ uint32 WorldSession::DosProtection::GetMaxPacketCounterAllowed(uint16 opcode) co
13391345 break ;
13401346 }
13411347
1342- case CMSG_MESSAGECHAT :
1348+ case CMSG_REQUEST_PARTY_MEMBER_STATS :
1349+ case CMSG_WHO :
13431350 {
13441351 maxPacketCounterAllowed = 50 ;
13451352 break ;
13461353 }
13471354
1355+ case CMSG_SETSHEATHED :
13481356 case CMSG_CONTACT_LIST :
13491357 {
13501358 maxPacketCounterAllowed = 10 ;
13511359 break ;
13521360 }
13531361
1354- case CMSG_WHO :
13551362 case CMSG_GAMEOBJ_USE :
13561363 case CMSG_GAMEOBJ_REPORT_USE :
13571364 case CMSG_SPELLCLICK :
@@ -1429,14 +1436,12 @@ uint32 WorldSession::DosProtection::GetMaxPacketCounterAllowed(uint16 opcode) co
14291436 case CMSG_GROUP_RAID_CONVERT :
14301437 case CMSG_GROUP_CHANGE_SUB_GROUP :
14311438 case CMSG_GROUP_ASSISTANT_LEADER :
1432- case CMSG_REQUEST_PARTY_MEMBER_STATS :
14331439 case CMSG_OPT_OUT_OF_LOOT :
14341440 case CMSG_BATTLEMASTER_JOIN_ARENA :
14351441 case CMSG_LEAVE_BATTLEFIELD :
14361442 case CMSG_REPORT_PVP_AFK :
14371443 case CMSG_DUEL_ACCEPTED :
14381444 case CMSG_DUEL_CANCELLED :
1439- case CMSG_SETSHEATHED :
14401445 case CMSG_CALENDAR_GET_CALENDAR :
14411446 case CMSG_CALENDAR_ADD_EVENT :
14421447 case CMSG_CALENDAR_UPDATE_EVENT :
0 commit comments