commit - 1d7e99531a6f713a04bbc91a6f7f2963c9ece75c
commit + 4602cb9891a0234e391d56ac4b2491d134020f1b
blob - d89d3792aa9778dcc7bd9575cb5ebb495c568157
blob + 23026c64269f09db09947d9148cf26dcdba3ed8b
--- contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj
+++ contrib/MacOSX/ngIRCd.xcodeproj/project.pbxproj
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 0420;
+ LastUpgradeCheck = 0430;
};
buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "ngIRCd" */;
compatibilityVersion = "Xcode 3.2";
blob - 38b9a7d64f8cb89bd45f0b3ac34a291c3afa193c
blob + 0ea85874862b7114b6cd355d59467371055a4013
--- src/ngircd/irc-info.c
+++ src/ngircd/irc-info.c
#include "parse.h"
#include "irc.h"
#include "irc-write.h"
+#include "client-cap.h"
#include "exp.h"
#include "irc-info.h"
static const char *
-who_flags_qualifier(const char *chan_user_modes)
+who_flags_qualifier(CLIENT *Client, const char *chan_user_modes)
{
+ assert(Client != NULL);
+
+ if (Client_Cap(Client) & CLIENT_CAP_MULTI_PREFIX) {
+ if (strchr(chan_user_modes, 'o') &&
+ strchr(chan_user_modes, 'v'))
+ return "@+";
+ }
+
if (strchr(chan_user_modes, 'o'))
return "@";
else if (strchr(chan_user_modes, 'v'))
strlcat(flags, "*", sizeof(flags));
chan_user_modes = Channel_UserModes(Chan, c);
- strlcat(flags, who_flags_qualifier(chan_user_modes),
+ strlcat(flags, who_flags_qualifier(c, chan_user_modes),
sizeof(flags));
if (!write_whoreply(Client, c, Channel_Name(Chan),
if (str[strlen(str) - 1] != ':')
strlcat(str, " ", sizeof(str));
- strlcat(str, who_flags_qualifier(Channel_UserModes(chan, c)),
+ strlcat(str, who_flags_qualifier(c, Channel_UserModes(chan, c)),
sizeof(str));
strlcat(str, Channel_Name(chan), sizeof(str));
if (is_member || is_visible) {
if (str[strlen(str) - 1] != ':')
strlcat(str, " ", sizeof(str));
- if (strchr(Channel_UserModes(Chan, cl), 'o'))
- strlcat(str, "@", sizeof(str));
- else if (strchr(Channel_UserModes(Chan, cl), 'v'))
- 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));
+ } else {
+ if (strchr(Channel_UserModes(Chan, cl), 'o'))
+ strlcat(str, "@", sizeof(str));
+ else if (strchr(Channel_UserModes(Chan, cl), 'v'))
+ strlcat(str, "+", sizeof(str));
+ }
strlcat(str, Client_ID(cl), sizeof(str));
if (strlen(str) > (LINE_LEN - CLIENT_NICK_LEN - 4)) {