Add UMODE +I to hide channels in WHOIS line
Does not hide channels from IRC operators.
This commit is contained in:
parent
624e2c5aa5
commit
5cbf96e318
|
@ -25,4 +25,6 @@ User modes: (* designates that the umode is oper only)
|
|||
+G - "soft caller id" mode - same as +g but automatically allows
|
||||
anyone who's in a common channel with you to message you.
|
||||
+V - Prevents you from receiving invites.
|
||||
+I - Prevents non-opers from seeing your channel list in
|
||||
a whois query.
|
||||
+Z - Is connected via SSL (set only on connection).
|
||||
|
|
|
@ -14,6 +14,8 @@ User modes: (? designates that the umode is provided by an extension
|
|||
+B - Marks you as a bot in /whois.
|
||||
+C - Prevents you from receiving CTCPs other than ACTION.
|
||||
+D - Deaf - ignores all channel messages.
|
||||
+I - Prevents non-opers from seeing your channel list in
|
||||
a whois query.
|
||||
+Q - Prevents you from being affected by channel forwarding.
|
||||
+R - Prevents non accept unidentified users from messaging you.
|
||||
+G - "soft caller id" mode - same as +g but automatically allows
|
||||
|
|
|
@ -426,6 +426,7 @@ struct ListClient
|
|||
#define UMODE_NOINVITE 0x0800 /* block invites */
|
||||
#define UMODE_BOT 0x8000 /* mark as a bot in whois */
|
||||
#define UMODE_SCALLERID 0x40000 /* soft caller id */
|
||||
#define UMODE_HIDECHANS 0x80000 /* hide channels in whois */
|
||||
|
||||
/* user information flags, only settable by remote mode or local oper */
|
||||
#define UMODE_OPER 0x1000 /* Operator */
|
||||
|
|
|
@ -276,7 +276,7 @@ single_whois(struct Client *source_p, struct Client *target_p, int operspy)
|
|||
|
||||
t = buf + mlen;
|
||||
|
||||
if (!IsService(target_p))
|
||||
if (!IsService(target_p) && (!(target_p->umodes & UMODE_HIDECHANS) || IsOper(source_p)))
|
||||
{
|
||||
RB_DLINK_FOREACH(ptr, target_p->user->channel.head)
|
||||
{
|
||||
|
|
|
@ -74,7 +74,7 @@ int user_modes[256] = {
|
|||
0, /* F */
|
||||
UMODE_SCALLERID, /* G */
|
||||
0, /* H */
|
||||
0, /* I */
|
||||
UMODE_HIDECHANS, /* I */
|
||||
0, /* J */
|
||||
0, /* K */
|
||||
0, /* L */
|
||||
|
|
Loading…
Reference in New Issue