+2002-03-19 LordLuke <lordluke@undernet.org>
+
+ * include/channel.h: Allow opers to view +s channels in /list
+
+ * include/client.h: Add "PRIV_LIST_CHAN" oper privilege
+
+ * include/ircd_features.h: added "LIST_CHAN" feature
+
+ * ircd/channel.c: Allow opers to view +s channels in /list
+
+ * ircd/client.c: Add "PRIV_LIST_CHAN"
+
+ * ircd/ircd_features.c: Add "LIST_CHAN" feature
+
2002-03-13 Joseph Bongaarts <foxxe@wtfs.net>
* ircd/m_kill.c: Last of the last of the bug fixes (Thanks Spike).
/* channel not shown but names are */
#define HiddenChannel(x) ((x) && ((x)->mode.mode & MODE_PRIVATE))
/* channel visible */
-#define ShowChannel(v,c) (PubChannel(c) || find_channel_member((v),(c)))
+#define ShowChannel(v,c) (PubChannel(c) || find_channel_member((v),(c)) || \
+ (IsAnOper(v)) && HasPriv(v, PRIV_LIST_CHAN))
#define PubChannel(x) ((!x) || ((x)->mode.mode & \
(MODE_PRIVATE | MODE_SECRET)) == 0)
#define is_listed(x) ((x)->mode.mode & MODE_LISTED)
#define PRIV_WIDE_GLINE 27 /* oper can set wider G-lines */
-#define PRIV_LAST_PRIV 27 /* must be the same as the last priv */
+#define PRIV_LIST_CHAN 28 /* oper can list secret channels */
+
+#define PRIV_LAST_PRIV 28 /* must be the same as the last priv */
#define _PRIV_NBITS (8 * sizeof(unsigned long))
FEAT_UNLIMIT_OPER_QUERY,
FEAT_LOCAL_KILL_ONLY,
FEAT_CONFIG_OPERCMDS,
+ FEAT_LIST_CHAN,
/* features that affect global opers on this server */
FEAT_OPER_KILL,
{
for (; chptr; chptr = chptr->next)
{
- if (!cli_user(cptr) || (SecretChannel(chptr) && !find_channel_member(cptr, chptr)))
+ if (!cli_user(cptr) || (!(HasPriv(cptr, PRIV_LIST_CHAN) && IsAnOper(cptr)) &&
+ SecretChannel(chptr) && !find_channel_member(cptr, chptr)))
continue;
if (chptr->users > args->min_users && chptr->users < args->max_users &&
chptr->creationtime > args->min_time &&
* via 'a', or on server 'B' via either 'b' or 'c', or on server D via 'd'.
*
* a) On server A : set CHFL_ZOMBIE for `who' (lp) and pass on the KICK.
- * Remove the user immedeately when no users are left on the channel.
+ * Remove the user immediately when no users are left on the channel.
* b) On server B : remove the user (who/lp) from the channel, send a
* PART upstream (to A) and pass on the KICK.
* c) KICKed by `client'; On server B : remove the user (who/lp) from the
} else {
send_reply(state->sptr, ERR_NOTMANAGER, state->chptr->chname,
"Re-create the channel. The channel must be *empty* for",
- TStime() - state->chptr->creationtime >= 171000 ? "48 contigious hours" : "a minute or two",
+ TStime() - state->chptr->creationtime >= 171000 ? "48 contiguous hours" : "a minute or two",
"before it can be recreated.");
}
return;
"You will NOT be able to change this password anymore once the channel is more than 48 hours old!");
send_reply(state->sptr, RPL_APASSWARN,
"Use \"/MODE ", state->chptr->chname, " -A ", state->chptr->mode.apass,
- "\" to remove the password and then immediatly set a new one. "
+ "\" to remove the password and then immediately set a new one. "
"IMPORTANT: YOU CANNOT RECOVER THIS PASSWORD, EVER; "
"WRITE THE PASSWORD DOWN (don't store this rescue password on disk)! "
"Now set the channel user password (+u).");
{ PRIV_SHOW_ALL_INVIS, FEAT_SHOW_ALL_INVISIBLE_USERS,
(FLAGS_OPER | FLAGS_LOCOP) },
{ PRIV_UNLIMIT_QUERY, FEAT_UNLIMIT_OPER_QUERY, (FLAGS_OPER | FLAGS_LOCOP) },
+ { PRIV_LIST_CHAN, FEAT_LIST_CHAN, (FLAGS_OPER | FLAGS_LOCOP) },
{ PRIV_KILL, FEAT_LOCAL_KILL_ONLY, 0 },
{ PRIV_GLINE, FEAT_CONFIG_OPERCMDS, ~0 },
F_B(UNLIMIT_OPER_QUERY, 0, 0, 0),
F_B(LOCAL_KILL_ONLY, 0, 0, 0),
F_B(CONFIG_OPERCMDS, 0, 0, 0),
+ F_B(LIST_CHAN, 0, 1, 0),
/* features that affect global opers on this server */
F_B(OPER_KILL, 0, 1, 0),
* then 30 seconds ago. This is intended to get rid of
* clone bots doing NICK FLOOD. -SeKs
* If someone didn't change their nick for more then 60 seconds
- * however, allow to do two nick changes immedately after another
+ * however, allow to do two nick changes immediately after another
* before limiting the nick flood. -Run
*/
if (CurrentTime < cli_nextnick(cptr)) {