Suppressing new/departing player messages
-
I’ve been looking at ways to suppress new /departing player messages. I’ll mention that my X86 assembly language is weak (last time I did it was on a 8086 about 10 years ago) and I don’t really understand the Visual-C-ASM calling conventions…I understand the general theory but not the specifics for visual-C.
So with this in mind I fired up IDA and traced the login/logout procedures and identified the hook points. After a few hours I ended up with a method to suppress the messages. This method stops the player chat list updating in the client thus suppressing the “new player” message (This is my guess at how it works).
My guess from inspecting the disassembly is that a “new player” chat message is not sent from the server to the client; but instead only a player list update message and the client independently generates the new player message from this update. If this is the case I suspect I’ll need to hook the client to suppress the message - as I want the player chat list to be accurate.
Before I carry on down this path, I thought I’d ask if anyone else has suppressed the “new player” messages and if so how? Any hints would be appreciated.
Here’s the hook code if anyone is interested…
// Hook the sending of a message to iClientID to display the new player message for iNewClientID void __stdcall HkCb_SendNewPlayer(uint iClientID, uint idunno1, uint iNewClientID, uint idunno2) { ConPrint(L"SendNewPlayer iClientID=%u %x iNewClientID=%u %x\n",iClientID,idunno1,iNewClientID,i4idunno2; // don't call the original function, just stop processing. } // Hook the sending of a message to iClientID to display the departing player message for // iDepartingClientID. void __stdcall HkCb_SendDepartingPlayer(uint iClientID, uint iDepartingClientID) { ConPrint(L"SendDepartingPlayer iClientID=%u iDepartingClientID=%u\n",iClientID,iDepartingClientID); // don't call the original function, just stop processing. } PATCH_INFO piRemoteClientDLL = { "remoteclient.dll", 0x6B30000, { {0x6B6BB80, &HkCb_SendChat, 4, &RCSendChatMsg, false}, {0x6B6BD40, &HkCb_SendNewPlayer, 4, 0, false}, {0x6B6BD44, &HkCb_SendDepartingPlayer, 4, 0, false}, {0,0,0,0} // terminate } };
-
My guess from inspecting the disassembly is that a “new player” chat message is not sent from the server to the client; but instead only a player list update message and the client independently generates the new player message from this update. If this is the case I suspect I’ll need to hook the client to suppress the message - as I want the player chat list to be accurate.
Yes, you are right. You need to edit the client to make that work.
But, serverside, you can supress the messages being sent when pushing F1 and reloading your char. This also gets rid of the “New Player:” after someone has died. (after death, the client reloads the char)
With this we were able to reduce our new player spam dramatically.