mirror of
https://github.com/tbamud/tbamud.git
synced 2025-12-23 10:40:13 +01:00
MSDP Newline Fix (#34)
* MSDP Newline Fix MSDP is sending additional new lines still. Added missing fix from KaVir's plugin * MSDP Newline Fix MSDP is sending additional new lines still. Added missing fix from KaVir's plugin
This commit is contained in:
parent
51fa6bc2af
commit
0bb51e2bc2
2 changed files with 4 additions and 3 deletions
|
|
@ -1570,6 +1570,7 @@ static int process_output(struct descriptor_data *t)
|
||||||
|
|
||||||
/* add the extra CRLF if the person isn't in compact mode */
|
/* add the extra CRLF if the person isn't in compact mode */
|
||||||
if (STATE(t) == CON_PLAYING && t->character && !IS_NPC(t->character) && !PRF_FLAGGED(t->character, PRF_COMPACT))
|
if (STATE(t) == CON_PLAYING && t->character && !IS_NPC(t->character) && !PRF_FLAGGED(t->character, PRF_COMPACT))
|
||||||
|
if ( !t->pProtocol->WriteOOB )
|
||||||
strcat(osb, "\r\n"); /* strcpy: OK (osb:MAX_SOCK_BUF-2 reserves space) */
|
strcat(osb, "\r\n"); /* strcpy: OK (osb:MAX_SOCK_BUF-2 reserves space) */
|
||||||
|
|
||||||
if (!t->pProtocol->WriteOOB) /* add a prompt */
|
if (!t->pProtocol->WriteOOB) /* add a prompt */
|
||||||
|
|
@ -1577,7 +1578,7 @@ static int process_output(struct descriptor_data *t)
|
||||||
|
|
||||||
/* now, send the output. If this is an 'interruption', use the prepended
|
/* now, send the output. If this is an 'interruption', use the prepended
|
||||||
* CRLF, otherwise send the straight output sans CRLF. */
|
* CRLF, otherwise send the straight output sans CRLF. */
|
||||||
if (t->has_prompt) {
|
if (t->has_prompt && !t->pProtocol->WriteOOB) {
|
||||||
t->has_prompt = FALSE;
|
t->has_prompt = FALSE;
|
||||||
result = write_to_descriptor(t->descriptor, i);
|
result = write_to_descriptor(t->descriptor, i);
|
||||||
if (result >= 2)
|
if (result >= 2)
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ static void Write( descriptor_t *apDescriptor, const char *apData )
|
||||||
{
|
{
|
||||||
if ( apDescriptor != NULL)
|
if ( apDescriptor != NULL)
|
||||||
{
|
{
|
||||||
if ( apDescriptor->pProtocol->WriteOOB > 0)
|
if ( apDescriptor->pProtocol->WriteOOB > 0 || *(apDescriptor->output) == '\0' )
|
||||||
{
|
{
|
||||||
apDescriptor->pProtocol->WriteOOB = 2;
|
apDescriptor->pProtocol->WriteOOB = 2;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue