summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-12-04 17:52:48 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2013-12-04 17:52:48 +0000
commit1fb23f184b779c3e2b7f5f68b5cc8911950693a3 (patch)
tree081f9f004471c34f43c4e20181f90dec1e5d3266 /src
parent30f9e6e411202ea2db88f4dc30cdcd9d733ff2d3 (diff)
- Administrators may now see channel modes in /LIST
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2617 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'src')
-rw-r--r--src/hash.c17
-rw-r--r--src/numeric.c2
2 files changed, 17 insertions, 2 deletions
diff --git a/src/hash.c b/src/hash.c
index a7fc19e..8425db5 100644
--- a/src/hash.c
+++ b/src/hash.c
@@ -762,6 +762,10 @@ static void
list_one_channel(struct Client *source_p, struct Channel *chptr,
struct ListTask *list_task)
{
+ char listbuf[MODEBUFLEN] = "";
+ char modebuf[MODEBUFLEN] = "";
+ char parabuf[MODEBUFLEN] = "";
+
if (SecretChannel(chptr) &&
!(IsMember(source_p, chptr) || HasUMode(source_p, UMODE_ADMIN)))
return;
@@ -777,8 +781,19 @@ list_one_channel(struct Client *source_p, struct Channel *chptr,
if (!list_allow_channel(chptr->chname, list_task))
return;
+
+ if (HasUMode(source_p, UMODE_ADMIN))
+ {
+ channel_modes(chptr, source_p, modebuf, parabuf);
+
+ if (chptr->topic[0])
+ snprintf(listbuf, sizeof(listbuf), "[%s] ", modebuf);
+ else
+ snprintf(listbuf, sizeof(listbuf), "[%s]", modebuf);
+ }
+
sendto_one(source_p, form_str(RPL_LIST), me.name, source_p->name,
- chptr->chname, dlink_list_length(&chptr->members),
+ chptr->chname, dlink_list_length(&chptr->members), listbuf,
chptr->topic);
}
diff --git a/src/numeric.c b/src/numeric.c
index f5240a8..67cffa0 100644
--- a/src/numeric.c
+++ b/src/numeric.c
@@ -353,7 +353,7 @@ static const char *const replies[] = {
/* 319 RPL_WHOISCHANNELS */ ":%s 319 %s %s :%s",
/* 320 */ NULL,
/* 321 RPL_LISTSTART */ ":%s 321 %s Channel :Users Name",
-/* 322 RPL_LIST */ ":%s 322 %s %s %d :%s",
+/* 322 RPL_LIST */ ":%s 322 %s %s %d :%s%s",
/* 323 RPL_LISTEND */ ":%s 323 %s :End of /LIST",
/* 324 RPL_CHANNELMODEIS */ ":%s 324 %s %s %s %s",
/* 325 */ NULL,