Mercurial > pidgin.yaz
changeset 25848:24aa97dd601f
applied changes from 0064869870b3507952491598f4d4b8d4a99fbc6b
through 0d220fdade88a561785e674e66d01a2a34bd4b1c
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Tue, 28 Apr 2009 20:15:53 +0000 |
parents | 2a34a3f5da2e |
children | 490b39a1d438 |
files | libpurple/protocols/irc/irc.h libpurple/protocols/irc/msgs.c |
diffstat | 2 files changed, 8 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/irc/irc.h Tue Apr 28 20:14:08 2009 +0000 +++ b/libpurple/protocols/irc/irc.h Tue Apr 28 20:15:53 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 Tue Apr 28 20:14:08 2009 +0000 +++ b/libpurple/protocols/irc/msgs.c Tue Apr 28 20:15:53 2009 +0000 @@ -325,7 +325,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; } @@ -380,8 +384,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);