Mercurial > pidgin
changeset 16107:1980273186a4
Make non-standard mode characters support connection-specific instead of
IRC prpl-wide.
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 14 Apr 2007 16:32:42 +0000 |
parents | b73761ac005e |
children | 6dab5732a4fd |
files | libpurple/protocols/irc/irc.c libpurple/protocols/irc/irc.h libpurple/protocols/irc/msgs.c |
diffstat | 3 files changed, 7 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/irc/irc.c Sat Apr 14 13:20:05 2007 +0000 +++ b/libpurple/protocols/irc/irc.c Sat Apr 14 16:32:42 2007 +0000 @@ -462,6 +462,8 @@ purple_circ_buffer_destroy(irc->outbuf); + g_free(irc->mode_chars); + g_free(irc); }
--- a/libpurple/protocols/irc/irc.h Sat Apr 14 13:20:05 2007 +0000 +++ b/libpurple/protocols/irc/irc.h Sat Apr 14 16:32:42 2007 +0000 @@ -84,6 +84,8 @@ guint writeh; time_t recv_time; + + char *mode_chars; }; struct irc_buddy {
--- a/libpurple/protocols/irc/msgs.c Sat Apr 14 13:20:05 2007 +0000 +++ b/libpurple/protocols/irc/msgs.c Sat Apr 14 16:32:42 2007 +0000 @@ -40,8 +40,6 @@ const char *from, const char *to, const char *rawmsg, gboolean notice); -static char *mode_chars = NULL; - static char *irc_mask_nick(const char *mask) { char *end, *buf; @@ -90,7 +88,7 @@ char *val; if (!strncmp(features[i], "PREFIX=", 7)) { if ((val = strchr(features[i] + 7, ')')) != NULL) - mode_chars = g_strdup(val + 1); + irc->mode_chars = g_strdup(val + 1); } } } @@ -477,8 +475,8 @@ } else if(*cur == '+') { f = PURPLE_CBFLAGS_VOICE; cur++; - } else if(mode_chars - && strchr(mode_chars, *cur)) { + } else if(irc->mode_chars + && strchr(irc->mode_chars, *cur)) { cur++; } tmp = g_strndup(cur, end - cur);