Mercurial > pidgin
comparison libpurple/protocols/irc/msgs.c @ 31027:1dcaaa68b245
Process 422 (ERR_NOMOTD) as a valid replacement for an actual MOTD
during signin.
Thanks to Thijs Alkemade for this patch.
Fixes #8649
committer: Ethan Blanton <elb@pidgin.im>
author | thijsalkemade@gmail.com |
---|---|
date | Wed, 15 Dec 2010 00:35:10 +0000 |
parents | 815bd8b41638 |
children | e023b0378887 |
comparison
equal
deleted
inserted
replaced
31026:fa1a0dccd4fa | 31027:1dcaaa68b245 |
---|---|
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) { |