changeset 22822:f09acca60066

Patch from sadrul to fix IRC servers which neglect to send RPL_LISTSTART (321) before sending their channel list with RPL_LIST (322). Fixes #2225
author Ethan Blanton <elb@pidgin.im>
date Mon, 05 May 2008 14:56:36 +0000
parents 61e0bcbf31ab
children 750813c2db46
files ChangeLog libpurple/protocols/irc/msgs.c
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon May 05 04:54:37 2008 +0000
+++ b/ChangeLog	Mon May 05 14:56:36 2008 +0000
@@ -9,6 +9,8 @@
 	  switching between different operating systems.
 	* Fix reception of IRC PART without a part message on Undernet
 	  (fixes a problem with litter in the channel user list).
+	* IRC no longer crashes on /list on servers which erroneously omit
+	  RPL_LISTSTART.
 
 	Pidgin:
 	* The typing notification in the conversation history can be disabled or
--- a/libpurple/protocols/irc/msgs.c	Mon May 05 04:54:37 2008 +0000
+++ b/libpurple/protocols/irc/msgs.c	Mon May 05 14:56:36 2008 +0000
@@ -422,6 +422,11 @@
 		if (!args[0] || !args[1] || !args[2] || !args[3])
 			return;
 
+		if (!purple_roomlist_get_in_progress(irc->roomlist)) {
+			purple_debug_warning("irc", "Buggy server didn't send RPL_LISTSTART.\n");
+			purple_roomlist_set_in_progress(irc->roomlist, TRUE);
+		}
+
 		room = purple_roomlist_room_new(PURPLE_ROOMLIST_ROOMTYPE_ROOM, args[1], NULL);
 		purple_roomlist_room_add_field(irc->roomlist, room, args[1]);
 		purple_roomlist_room_add_field(irc->roomlist, room, GINT_TO_POINTER(strtol(args[2], NULL, 10)));