# HG changeset patch # User Stu Tomlinson # Date 1176568362 0 # Node ID 1980273186a44c4298d912894a9a2c3e3e3c4c57 # Parent b73761ac005ea6b8310ef8454819204244d0d396 Make non-standard mode characters support connection-specific instead of IRC prpl-wide. diff -r b73761ac005e -r 1980273186a4 libpurple/protocols/irc/irc.c --- 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); } diff -r b73761ac005e -r 1980273186a4 libpurple/protocols/irc/irc.h --- 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 { diff -r b73761ac005e -r 1980273186a4 libpurple/protocols/irc/msgs.c --- 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);