diff libpurple/protocols/irc/msgs.c @ 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 32c366eeeb99
children 6447865b2d08
line wrap: on
line diff
--- 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);