diff src/gtkconv.c @ 4621:69f028a6f357

[gaim-migrate @ 4912] Added half-op support, used on some IRC networks. Also fixed the bug where trying to IM a person in a chat with a @, %, or + prefix was keeping that prefix for the username in the IM window. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 27 Feb 2003 09:42:18 +0000
parents 5fcb44d771d2
children 5cdfd20daa07
line wrap: on
line diff
--- a/src/gtkconv.c	Wed Feb 26 06:21:50 2003 +0000
+++ b/src/gtkconv.c	Thu Feb 27 09:42:18 2003 +0000
@@ -551,6 +551,7 @@
 		return;
 
 	if (*name == '@') name++;
+	if (*name == '%') name++;
 	if (*name == '+') name++;
 
 	account = gaim_conversation_get_account(conv);
@@ -713,6 +714,10 @@
 	gtk_tree_model_get_iter(GTK_TREE_MODEL(model), &iter, path);
 	gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, 1, &who, -1);
 
+	if (*who == '@') who++;
+	if (*who == '%') who++;
+	if (*who == '+') who++;
+
 	if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) {
 		struct gaim_conversation *c;
 
@@ -2239,7 +2244,7 @@
 		char *nick = nicks->data;
 		/* this checks to see if the current nick could be a completion */
 		if (g_strncasecmp(nick, entered, strlen(entered))) {
-			if (nick[0] != '+' && nick[0] != '@')
+			if (*nick != '+' && *nick != '@' && *nick != '%')
 				continue;
 
 			if (g_strncasecmp(nick + 1, entered, strlen(entered))) {
@@ -2270,6 +2275,7 @@
 				nick = nicks->data;
 
 				if (*nick == '@') nick++;
+				if (*nick == '%') nick++;
 				if (*nick == '+') nick++;
 			}