repo: ngircd
action: commit
revision: 
path_from: 
revision_from: 16f94546f5d7c941a0d49b49e8cd523e7b67b19d:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit 16f94546f5d7c941a0d49b49e8cd523e7b67b19d
Author: Brian Collins 
Date:   Mon Aug 27 16:14:47 2012 +0100

    Fix NAMES response when client has multi-prefix

    Two fixes here: IRC_Send_NAMES was checking the capability of the
    wrong client when responding, and it didn't return any prefix for
    clients that had either +v or +o but not both.

diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c
index 0ea85874862b7114b6cd355d59467371055a4013..
index ..89d2deef1fc2b647cf3fbfee543329d85e4fada8 100644
--- a/src/ngircd/irc-info.c
+++ b/src/ngircd/irc-info.c
@@ -1578,10 +1578,10 @@ IRC_Send_NAMES(CLIENT * Client, CHANNEL * Chan)
 		if (is_member || is_visible) {
 			if (str[strlen(str) - 1] != ':')
 				strlcat(str, " ", sizeof(str));
-			if (Client_Cap(cl) & CLIENT_CAP_MULTI_PREFIX) {
-				if (strchr(Channel_UserModes(Chan, cl), 'o') &&
-				    strchr(Channel_UserModes(Chan, cl), 'v'))
-					strlcat(str, "@+", sizeof(str));
+			if (Client_Cap(Client) & CLIENT_CAP_MULTI_PREFIX && 
+					strchr(Channel_UserModes(Chan, cl), 'o') &&
+					strchr(Channel_UserModes(Chan, cl), 'v')) {
+				strlcat(str, "@+", sizeof(str));
 			} else {
 				if (strchr(Channel_UserModes(Chan, cl), 'o'))
 					strlcat(str, "@", sizeof(str));

-----END OF PAGE-----