Go Back   EQEmulator Home > EQEmulator Forums > Development > Development: Custom Code

Development: Custom Code This is for code thatdoes not emulate live and wont be added to the official code.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-06-2013, 05:58 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default Disabling MoTD.

Would it be possible to do so? And if so, is my method below the correct way? My reason for disabling this is because I have a much more dynamic custom MoTD and I'd rather it not send this one.


Line 427-443 of worldserver.cpp. - The original code without any modifications.
Code:
case ServerOP_Motd:
{
	ServerMotd_Struct* smotd = (ServerMotd_Struct*) pack->pBuffer;
	EQApplicationPacket *outapp;
	outapp = new EQApplicationPacket(OP_MOTD);
	char tmp[500] = {0};
	sprintf(tmp, "%s", smotd->motd);

	outapp->size = strlen(tmp)+1;
	outapp->pBuffer = new uchar[outapp->size];
	memset(outapp->pBuffer,0,outapp->size);
	strcpy((char*)outapp->pBuffer, tmp);

	entity_list.QueueClients(0, outapp);
	safe_delete(outapp);
	
	break;
}
Line 427-443 of worldserver.cpp. - My proposed way of removal.
Code:
case ServerOP_Motd:
{
	ServerMotd_Struct* smotd = (ServerMotd_Struct*) pack->pBuffer;
	EQApplicationPacket *outapp;
	outapp = new EQApplicationPacket(OP_MOTD);
	char tmp[500] = {0};
	sprintf(tmp, "%s", smotd->motd);

	outapp->size = strlen(tmp)+1;
	outapp->pBuffer = new uchar[outapp->size];
	memset(outapp->pBuffer,0,outapp->size);
	strcpy((char*)outapp->pBuffer, tmp);

	//entity_list.QueueClients(0, outapp);
	safe_delete(outapp);
	
	break;
}
Reply With Quote
 


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 On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 07:06 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3