Kingly_Krab
11-06-2013, 05:58 PM
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.
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.
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. - The original code without any modifications.
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.
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;
}