Jump to content

Home

oversided server commands...


ensiform

Recommended Posts

Posted

since the board rolled back b4 this post was made ill post again, and its changed a bit better since then:

 

void trap_SendServerCommand( int clientNum, const char *text ) {
// rain - #433 - commands over 1022 chars will crash the
// client engine upon receipt, so ignore them
// CHRUKER: b001 - Truncating the oversize server command before writing it to the log
if( strlen( text ) > 1022 ) {
	G_LogPrintf( "%s: trap_SendServerCommand( %d, ... ) length exceeds 1022.\n", GAMEVERSION, clientNum );
	G_LogPrintf( "%s: text [%.950s]... truncated\n", GAMEVERSION, text ); return;
}
syscall( G_SEND_SERVER_COMMAND, clientNum, text );
}

  • 4 weeks later...
Posted

JA+ has had this fixed for a long time. I thought slider released a patch for server operators (even non-ja+)to keep this from happening...or was that another file he released.

 

I'm not sure about 2.1 or before, but I know ja+ 2.2 and ja+ 2.3 fixes this problem.

Posted

confirmed... you need something like this also at the top of G_Say:

 

	if (strlen(chatText) > MAX_SAY_TEXT) {
	G_LogPrintf( "G_Say( cl:%d ) length exceeds 150.\n", ent->client->ps.clientNum );
	return;
}

 

this will fix the chat exceeding bug where it causes server to crash. what i posted above (in the first post) the q3msgboom.cfg, etc seemed immune to it. but this stops it.

 

Update: use this in G_Say but remove the trunc line in the top post:

 

G_LogPrintf( "text [%.950s]... truncated\n", text ); return;

 

thats not needed, because it causes lag.

 

 

mmm theres still lag sometimes :S

 

so... in g_syscalls there is:

 

void trap_SendServerCommand( int clientNum, const char *text ) {
// rain - #433 - commands over 1022 chars will crash the
// client engine upon receipt, so ignore them
// CHRUKER: b001 - Truncating the oversize server command before writing it to the log
if( strlen( text ) > 1022 ) {
	G_LogPrintf( "trap_SendServerCommand( %d, ... ) length exceeds 1022.\n", clientNum );
}
syscall( G_SEND_SERVER_COMMAND, clientNum, text );
}

 

then in G_Say:

	if (strlen(chatText) > MAX_SAY_TEXT) {
	G_LogPrintf( "G_Say( cl:%d ) length exceeds 150.\n", ent->client->ps.clientNum );
	return;
}

 

 

but the console basically shows 3 lines of the g_syscall warning.

 

  2:13 G_Say( cl:2 ) length exceeds 150.
 2:13 trap_SendServerCommand( 2, ... ) length exceeds 1022.
 2:13 trap_SendServerCommand( 2, ... ) length exceeds 1022.
 2:13 trap_SendServerCommand( 2, ... ) length exceeds 1022.

Posted

Is that "the" fix...or is that the fix that you said still had problems? I know you and Slider got together to talk about getting the permanent fix. It this it? or is this the still buggy one?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...