merge of 'ed43f2a21190e316e1aa91e3eff1493594a16605'

Wed, 01 Apr 2009 05:28:20 +0000

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Wed, 01 Apr 2009 05:28:20 +0000
changeset 26606
ebd21e9c68c5
parent 26605
ed43f2a21190 (diff)
parent 26601
ef456ee1f508 (current diff)
child 26607
6728d0cb7a3c
child 26608
7e9d04aa7778
child 26610
86c828b108a6
child 26633
7fd634262b1d
child 26691
208457630eae

merge of 'ed43f2a21190e316e1aa91e3eff1493594a16605'
and 'ef456ee1f508397be9ecf949d58aeb31d030332b'

--- a/ChangeLog	Wed Apr 01 05:25:36 2009 +0000
+++ b/ChangeLog	Wed Apr 01 05:28:20 2009 +0000
@@ -14,6 +14,10 @@
 	* Add support for sending attentions (equivalent to "buzz" and "nudge")
 	  using the command /buzz (XEP-0224).
 
+	IRC:
+	* Correctly handle WHOIS for users who are joined to a large number of
+	  channels.
+
 	Pidgin:
 	* Added -f command line option to tell Pidgin to ignore NetworkManager
 	  and assume it has a valid network connection.
--- a/libpurple/protocols/irc/irc.h	Wed Apr 01 05:25:36 2009 +0000
+++ b/libpurple/protocols/irc/irc.h	Wed Apr 01 05:28:20 2009 +0000
@@ -72,7 +72,7 @@
 		char *name;
 		char *server;
 		char *serverinfo;
-		char *channels;
+		GString *channels;
 		int ircop;
 		int identified;
 		int idle;
--- a/libpurple/protocols/irc/msgs.c	Wed Apr 01 05:25:36 2009 +0000
+++ b/libpurple/protocols/irc/msgs.c	Wed Apr 01 05:28:20 2009 +0000
@@ -336,7 +336,11 @@
 		if (args[3])
 			irc->whois.signon = (time_t)atoi(args[3]);
 	} else if (!strcmp(name, "319")) {
-		irc->whois.channels = g_strdup(args[2]);
+		if (irc->whois.channels == NULL) {
+			irc->whois.channels = g_string_new(args[2]);
+		} else {
+			irc->whois.channels = g_string_append(irc->whois.channels, args[2]);
+		}
 	} else if (!strcmp(name, "320")) {
 		irc->whois.identified = 1;
 	}
@@ -391,8 +395,8 @@
 		g_free(irc->whois.serverinfo);
 	}
 	if (irc->whois.channels) {
-		purple_notify_user_info_add_pair(user_info, _("Currently on"), irc->whois.channels);
-		g_free(irc->whois.channels);
+		purple_notify_user_info_add_pair(user_info, _("Currently on"), irc->whois.channels->str);
+		g_string_free(irc->whois.channels, TRUE);
 	}
 	if (irc->whois.idle) {
 		gchar *timex = purple_str_seconds_to_string(irc->whois.idle);
--- a/libpurple/protocols/msn/soap.c	Wed Apr 01 05:25:36 2009 +0000
+++ b/libpurple/protocols/msn/soap.c	Wed Apr 01 05:28:20 2009 +0000
@@ -667,6 +667,7 @@
 			conn->handled_len = 0;
 			conn->current_request = req;
 
+			purple_input_remove(conn->event_handle);
 			conn->event_handle = purple_input_add(conn->ssl->fd,
 				PURPLE_INPUT_WRITE, msn_soap_write_cb, conn);
 			if (!msn_soap_write_cb_internal(conn, conn->ssl->fd, PURPLE_INPUT_WRITE, TRUE)) {

mercurial