libpurple/protocols/irc/msgs.c

changeset 31229
4bef370d8a92
parent 30270
8380aae8b132
child 31284
893f2d78d438
equal deleted inserted replaced
31228:c220bf12a14b 31229:4bef370d8a92
595 char *escaped; 595 char *escaped;
596 596
597 if (!args || !args[0]) 597 if (!args || !args[0])
598 return; 598 return;
599 599
600 if (!irc->motd)
601 irc->motd = g_string_new("");
602
603 if (!strcmp(name, "375")) { 600 if (!strcmp(name, "375")) {
604 if (irc->motd) 601 if (irc->motd)
605 g_string_free(irc->motd, TRUE); 602 g_string_free(irc->motd, TRUE);
606 irc->motd = g_string_new(""); 603 irc->motd = g_string_new("");
607 return; 604 return;
608 } else if (!strcmp(name, "376")) { 605 } else if (!strcmp(name, "376")) {
609 /* dircproxy 1.0.5 does not send 251 on reconnection, so 606 /* dircproxy 1.0.5 does not send 251 on reconnection, so
610 * finalize the connection here if it is not already done. */ 607 * finalize the connection here if it is not already done. */
608 irc_connected(irc, args[0]);
609 return;
610 } else if (!strcmp(name, "422")) {
611 /* in case there is no 251, and no MOTD set, finalize the connection.
612 * (and clear the motd for good measure). */
613
614 if (irc->motd)
615 g_string_free(irc->motd, TRUE);
616
611 irc_connected(irc, args[0]); 617 irc_connected(irc, args[0]);
612 return; 618 return;
613 } 619 }
614 620
615 if (!irc->motd) { 621 if (!irc->motd) {

mercurial