mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 21:24:27 +00:00
Do not break motd(Revert old changes).
This commit is contained in:
parent
9d7ab6acf4
commit
b63c1753a1
@ -1650,8 +1650,8 @@ void CHalfLifeMultiplay::SendMOTDToClient( edict_t *client )
|
|||||||
{
|
{
|
||||||
// read from the MOTD.txt file
|
// read from the MOTD.txt file
|
||||||
int length, char_count = 0;
|
int length, char_count = 0;
|
||||||
const char *pFileList;
|
char *pFileList;
|
||||||
const char *aFileList = pFileList = (const char*)LOAD_FILE_FOR_ME( CVAR_GET_STRING( "motdfile" ), &length );
|
char *aFileList = pFileList = (char*)LOAD_FILE_FOR_ME( CVAR_GET_STRING( "motdfile" ), &length );
|
||||||
|
|
||||||
// send the server name
|
// send the server name
|
||||||
MESSAGE_BEGIN( MSG_ONE, gmsgServerName, NULL, client );
|
MESSAGE_BEGIN( MSG_ONE, gmsgServerName, NULL, client );
|
||||||
@ -1679,10 +1679,10 @@ void CHalfLifeMultiplay::SendMOTDToClient( edict_t *client )
|
|||||||
if( char_count < MAX_MOTD_LENGTH )
|
if( char_count < MAX_MOTD_LENGTH )
|
||||||
pFileList = aFileList + char_count;
|
pFileList = aFileList + char_count;
|
||||||
else
|
else
|
||||||
pFileList = 0;
|
*pFileList = 0;
|
||||||
|
|
||||||
MESSAGE_BEGIN( MSG_ONE, gmsgMOTD, NULL, client );
|
MESSAGE_BEGIN( MSG_ONE, gmsgMOTD, NULL, client );
|
||||||
WRITE_BYTE( pFileList ? FALSE : TRUE ); // FALSE means there is still more message to come
|
WRITE_BYTE( *pFileList ? FALSE : TRUE ); // FALSE means there is still more message to come
|
||||||
WRITE_STRING( chunk );
|
WRITE_STRING( chunk );
|
||||||
MESSAGE_END();
|
MESSAGE_END();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user