lfnetwork.com mark read register faq members calendar

Thread: oversided server commands...
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 07-17-2005, 06:23 PM   #1
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
oversided server commands...

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

Code:
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 );
}


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 07-17-2005, 08:30 PM   #2
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,187
Who gets the credit for the fix?


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 07-17-2005, 09:55 PM   #3
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
http://games.chruker.dk/enemy_territ...ect_bugfix.php
#1 and rain.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 08-10-2005, 01:44 AM   #4
RpTheHotrod
LFN Staff Emeritus
 
RpTheHotrod's Avatar
 
Join Date: Apr 2002
Posts: 2,798
LFN Staff Member 10 year veteran! Forum Veteran 
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.


Current in-game name is #include

Last edited by RpTheHotrod; 08-10-2005 at 01:55 AM.
RpTheHotrod is offline   you may: quote & reply,
Old 08-11-2005, 04:36 AM   #5
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
confirmed... you need something like this also at the top of G_Say:

Code:
	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:

Code:
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:
Code:
	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.

Code:
  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.


iojamp project lead / coder

Last edited by ensiform; 08-11-2005 at 05:17 AM.
ensiform is offline   you may: quote & reply,
Old 08-11-2005, 06:17 AM   #6
RpTheHotrod
LFN Staff Emeritus
 
RpTheHotrod's Avatar
 
Join Date: Apr 2002
Posts: 2,798
LFN Staff Member 10 year veteran! Forum Veteran 
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?


Current in-game name is #include
RpTheHotrod is offline   you may: quote & reply,
Old 08-11-2005, 01:01 PM   #7
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
pretty much yes you just must stop the execution of G_Say or G_SayTo i believe in order for the chat exploit to stop working.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 08-11-2005, 10:47 PM   #8
stubert
 
Join Date: Aug 2002
Location: Philadelphia
Posts: 227
yea thanks i helped with this gg newbies
stubert is offline   you may: quote & reply,
Old 08-12-2005, 12:12 AM   #9
ensiform
The Stig
 
ensiform's Avatar
 
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,241
Current Game: Borderlands 2
Quote:
Originally Posted by stubert
yea thanks i helped with this gg newbies
no you didnt. didnt use what u showed. i reverted back to et's fix.


iojamp project lead / coder
ensiform is offline   you may: quote & reply,
Old 08-12-2005, 04:00 PM   #10
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,187
Ouch. Burn!


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > oversided server commands...

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:26 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.