pidgin.2.5.6: 2695cd14: applied changes from 0064869870b35079524...

elb at pidgin.im elb at pidgin.im
Tue Apr 28 20:20:48 EDT 2009


-----------------------------------------------------------------
Revision: 2695cd1486ed49c18449f3b5b54171a9fb19dccc
Ancestor: 28add44da066ea7181a5dd3392ca65eaf1786183
Author: elb at pidgin.im
Date: 2009-04-28T20:15:53
Branch: im.pidgin.pidgin.2.5.6
URL: http://d.pidgin.im/viewmtn/revision/info/2695cd1486ed49c18449f3b5b54171a9fb19dccc

Modified files:
        libpurple/protocols/irc/irc.h libpurple/protocols/irc/msgs.c

ChangeLog: 

applied changes from 0064869870b3507952491598f4d4b8d4a99fbc6b
             through 0d220fdade88a561785e674e66d01a2a34bd4b1c

-------------- next part --------------
============================================================
--- libpurple/protocols/irc/irc.h	a8868ca914d28d8cc42de7f923b89ac05c641554
+++ libpurple/protocols/irc/irc.h	3ec9f203e62e5297a814a6840b6f16379471533c
@@ -72,7 +72,7 @@ struct irc_conn {
 		char *name;
 		char *server;
 		char *serverinfo;
-		char *channels;
+		GString *channels;
 		int ircop;
 		int identified;
 		int idle;
============================================================
--- libpurple/protocols/irc/msgs.c	5a5d1bcef2e97b5bb523b109c87d18f1e2b39b15
+++ libpurple/protocols/irc/msgs.c	af18a749d64f0c30b741c08a78d727913e144e55
@@ -325,7 +325,11 @@ void irc_msg_whois(struct irc_conn *irc,
 		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;
 	}
@@ -380,8 +384,8 @@ void irc_msg_endwhois(struct irc_conn *i
 		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);


More information about the Commits mailing list