View Single Post
Re: new CS update screws up intercepting chat messages!?
Old
  (#16)
stefanhendriks
RealBot Author
 
stefanhendriks's Avatar
 
Status: Offline
Posts: 3,088
Join Date: Nov 2003
Location: Netherlands
Default Re: new CS update screws up intercepting chat messages!? - 18-06-2004

i got word of turtlerock about the exact format:

Quote:
The SayText message changed to allow for localization, and place names. Before, it looked like this, where the first character of 'text' was 0x02, and it included the player name and chat text:

Code:
MESSAGE_BEGIN( MSG_ONE, gmsgSayText, NULL, client->pev );
 WRITE_BYTE( ENTINDEX( pEntity ));
 WRITE_STRING( text );
MESSAGE_END();
Now, the message is constructed like this:

Code:
MESSAGE_BEGIN( MSG_ONE, gmsgSayText, NULL, client->pev );
 WRITE_BYTE( ENTINDEX( pEntity ));
 WRITE_STRING( pszFormat );
 WRITE_STRING( "" ); // will be filled in with player name
 WRITE_STRING( text );
 if ( placeName )
 {
  WRITE_STRING( placeName );
 }
MESSAGE_END();
The format string (pszFormat above) is something like "#Cstrike_Chat_CT", so if you are doing a strstr() for the player name in that string and not NULL checking, you would now crash. I don't have the RealBot source, so I can't tell if that's the problem or not.

Please let me know if this helps or if you need more info.

Matt Campbell



Author of RealBot, "Arrakis" and "Dune 2 - The Maker" | co-Founder of Bots-United | Fundynamic | Blog | E-Mail me

Last edited by stefanhendriks; 18-06-2004 at 08:37..
  
Reply With Quote