Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/opers.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ The following outlines features and commands available on the Bahamut server
- 02-Oct-2004 - Quension (quension@dal.net)
- 25-Aug-2018 - Visigoth (visigoth@dal.net)
- 30-Sep-2018 - Holbrook (holbrook@dal.net)
- 15-Oct-2026 - Jazzzzz (dreamhealer@hotmail.co.uk)

Original ircd-hybrid opers.txt written by ThemBones (kraemer@u.washington.edu)

Expand All @@ -22,6 +23,7 @@ Usermodes: (* designates that the umode is oper only)
+S - Is connected using a secure connection (SSL).
+H - When enabled, masks a client's hostname.
+P - When enabled, opt's out of server side spam filter protection.
+p - Hides non-shared channels in WHO/WHOIS and WHOIS idle/signon.
*+a - Designates the oper as being a Services Administrator.
*+b - Can see chatops messages.
*+c - Can see client connections and exits.
Expand All @@ -42,6 +44,10 @@ Usermodes: (* designates that the umode is oper only)
*+O - Is a local IRC Operator.
*+I - When enabled, allows 'hidden' opers. (unlisted in /stats p, etc.)

+p keeps shared channels visible and does not hide membership from
NAMES or WHO #channel. Opers and the user themselves retain full
WHOIS visibility.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Oper Commands: (+ indicates that /quote must be used with ircII)
Expand Down
1 change: 1 addition & 0 deletions include/numeric.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
#define RPL_WHOISIDLE 317
#define RPL_ENDOFWHOIS 318
#define RPL_WHOISCHANNELS 319
#define RPL_WHOISPRIVACY 320

#define RPL_LISTSTART 321
#define RPL_LIST 322
Expand Down
11 changes: 7 additions & 4 deletions include/struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,9 +329,11 @@ typedef struct SServicesTag ServicesTag;
#define UMODE_S 0x10000000 /* umode +S - User is using SSL */
#define UMODE_C 0x20000000 /* umode +C - User is only accepting private messages from users who share a common channel with them */
#define UMODE_H 0x40000000 /* umode +H - User is host-masked */
#define UMODE_p 0x80000000L /* umode +p - WHOIS privacy */

/* WARNING: Do not add any values greater than 0x40000000 unless you change Client->umode to unsigned long
(and change everything else to support it) -Kobi & xPsycho. */
/* WARNING: Do not add values greater than 0x80000000L unless you widen
Client->umode and all user-mode storage and masks accordingly.
-Kobi & xPsycho; updated by Jazzzzz. */

/* for sendto_ops_lev */

Expand All @@ -354,13 +356,13 @@ typedef struct SServicesTag ServicesTag;
* that mode will be 'silent.'
*/

#define SEND_UMODES (UMODE_a|UMODE_i|UMODE_o|UMODE_r|UMODE_A|UMODE_I|UMODE_R|UMODE_S|UMODE_C|UMODE_H|UMODE_P)
#define SEND_UMODES (UMODE_a|UMODE_i|UMODE_o|UMODE_r|UMODE_A|UMODE_I|UMODE_R|UMODE_S|UMODE_C|UMODE_H|UMODE_P|UMODE_p)
#define ALL_UMODES (SEND_UMODES|UMODE_b|UMODE_c|UMODE_d|UMODE_e|UMODE_f|\
UMODE_g|UMODE_h|UMODE_j|UMODE_k|UMODE_m|UMODE_n|UMODE_s|\
UMODE_w|UMODE_y|UMODE_F|UMODE_K|UMODE_O)

/* modes users can set themselves */
#define USER_UMODES (UMODE_i|UMODE_k|UMODE_w|UMODE_s|UMODE_R|UMODE_C|UMODE_H|UMODE_P)
#define USER_UMODES (UMODE_i|UMODE_k|UMODE_w|UMODE_s|UMODE_R|UMODE_C|UMODE_H|UMODE_P|UMODE_p)

/* modes only opers can have */
#define OPER_UMODES (UMODE_a|UMODE_b|UMODE_c|UMODE_d|UMODE_e|UMODE_f|UMODE_g|\
Expand Down Expand Up @@ -396,6 +398,7 @@ typedef struct SServicesTag ServicesTag;
#define IsUmodeI(x) ((x)->umode & UMODE_I)
#define IsUmodeH(x) ((x)->umode & UMODE_H)
#define IsUmodeP(x) ((x)->umode & UMODE_P)
#define IsUmodep(x) ((x)->umode & UMODE_p)
#define IsNoNonReg(x) ((x)->umode & UMODE_R)
#define IsWSquelch(x) ((x)->umode & UMODE_x)
#define IsSSquelch(x) ((x)->umode & UMODE_X)
Expand Down
4 changes: 3 additions & 1 deletion src/m_who.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,9 @@ static inline char *first_visible_channel(aClient *cptr, aClient *sptr)
{
for(lp = cptr->user->channel; lp; lp = lp->next)
{
if(ShowChannel(sptr, lp->value.chptr))
if(ShowChannel(sptr, lp->value.chptr) &&
(!IsUmodep(cptr) || IsAnOper(sptr) || sptr == cptr ||
IsMember(sptr, lp->value.chptr)))
break;
}
if(lp)
Expand Down
4 changes: 2 additions & 2 deletions src/s_err.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ static char *replies[] =
/* 002 RPL_YOURHOST */ ":%s 002 %s :Your host is %s, running "
"version %s",
/* 003 RPL_CREATED */ ":%s 003 %s :This server was created %s",
/* 004 RPL_MYINFO */ ":%s 004 %s %s %s aAbcCdefFghHiIjkKmnoOPrRsSwxXy "
/* 004 RPL_MYINFO */ ":%s 004 %s %s %s aAbcCdefFghHiIjkKmnoOpPrRsSwxXy "
"AbceiIjklLmMnoOpPrRsStv "
"beIjklov",
/* 005 RPL_ISUPPORT */ ":%s 005 %s %s :are available on this server",
Expand Down Expand Up @@ -350,7 +350,7 @@ static char *replies[] =
"signon time",
/* 318 RPL_ENDOFWHOIS */ ":%s 318 %s %s :End of /WHOIS list.",
/* 319 RPL_WHOISCHANNELS */ ":%s 319 %s %s :%s",
/* 320 */ NULL,
/* 320 RPL_WHOISPRIVACY */ ":%s 320 %s %s :is using WHOIS privacy mode (+p)",
/* 321 RPL_LISTSTART */ ":%s 321 %s Channel :Users Name",
/* 322 RPL_LIST */ ":%s 322 %s %s %d :%s",
/* 323 RPL_LISTEND */ ":%s 323 %s :End of /LIST",
Expand Down
10 changes: 9 additions & 1 deletion src/s_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ long user_modes[] =
#ifdef SPAMFILTER
UMODE_P, 'P',
#endif
UMODE_p, 'p',
0, 0
};

Expand Down Expand Up @@ -2155,6 +2156,9 @@ m_whois(aClient *cptr, aClient *sptr, int parc, char *parv[])
for (len = 0, *buf = '\0', lp = user->channel; lp; lp = lp->next)
{
chptr = lp->value.chptr;
if (IsUmodep(acptr) && !IsAnOper(sptr) && sptr != acptr &&
!IsMember(sptr, chptr))
continue;
showchan=ShowChannel(sptr,chptr);
if (showchan || IsAdmin(sptr))
{
Expand Down Expand Up @@ -2213,6 +2217,9 @@ m_whois(aClient *cptr, aClient *sptr, int parc, char *parv[])
user->away);
if(IsUmodeS(acptr))
sendto_one(sptr, rpl_str(RPL_USINGSSL), me.name, parv[0], name);
if(IsUmodep(acptr))
sendto_one(sptr, rpl_str(RPL_WHOISPRIVACY),
me.name, parv[0], name);

buf[0] = '\0';
if (IsAnOper(acptr))
Expand Down Expand Up @@ -2265,7 +2272,8 @@ m_whois(aClient *cptr, aClient *sptr, int parc, char *parv[])
}

/* don't give away that this oper is on this server if they're hidden! */
if (acptr->user && MyConnect(acptr) && ((sptr == acptr) ||
if ((!IsUmodep(acptr) || IsAnOper(sptr) || sptr == acptr) &&
acptr->user && MyConnect(acptr) && ((sptr == acptr) ||
!IsUmodeI(acptr) || (parc > 2) || IsAnOper(sptr)))
sendto_one(sptr, rpl_str(RPL_WHOISIDLE), me.name, parv[0], name,
timeofday - user->last, acptr->firsttime);
Expand Down
Loading