diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2016-06-05 14:16:36 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@armlinux.org.uk> | 2016-06-05 17:47:56 +0100 |
commit | 14630f6b4763b34ff96c091c3e55f387862af185 (patch) | |
tree | 035a58ea3b2da4767b8e638f306605a8ad992dcc /src/channel.c | |
parent | 4f57d083c810f57edc0fe449b0de1f48e402107b (diff) |
Convert global channel operator support to OFTC's God mode.
OFTC's God mode is very similar to the global channel operator mode,
with the following differences:
- gaining God mode notifies all operators
- uses of God mode privileges notifies all operators
- God mode times out after a configurable period
- uses umode S rather than O - S is taken for SSL clients in
hybrid 8.1.13.
So align with OFTC's implementation, but omit these features.
Diffstat (limited to 'src/channel.c')
-rw-r--r-- | src/channel.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/channel.c b/src/channel.c index 1feb5d1..a96468b 100644 --- a/src/channel.c +++ b/src/channel.c @@ -436,7 +436,7 @@ channel_member_names(struct Client *source_p, struct Channel *chptr, int multi_prefix = HasCap(source_p, CAP_MULTI_PREFIX) != 0; int uhnames = HasCap(source_p, CAP_UHNAMES) != 0; - if (PubChannel(chptr) || is_member) + if (PubChannel(chptr) || is_member || HasUMode(source_p, UMODE_GOD)) { t = lbuf + snprintf(lbuf, sizeof(lbuf), form_str(RPL_NAMREPLY), me.name, source_p->name, @@ -447,7 +447,8 @@ channel_member_names(struct Client *source_p, struct Channel *chptr, { const struct Membership *ms = ptr->data; - if (HasUMode(ms->client_p, UMODE_INVISIBLE) && !is_member) + if (HasUMode(ms->client_p, UMODE_INVISIBLE) && !is_member && + !HasUMode(source_p, UMODE_GOD)) continue; if (!uhnames) @@ -750,7 +751,8 @@ can_send(struct Channel *chptr, struct Client *source_p, { struct MaskItem *conf = NULL; - if (IsServer(source_p) || HasFlag(source_p, FLAGS_SERVICE) || HasUMode(source_p, UMODE_GCHANOP)) + if (IsServer(source_p) || HasFlag(source_p, FLAGS_SERVICE) || + HasUMode(source_p, UMODE_GOD)) return CAN_SEND_OPV; if (MyClient(source_p) && !IsExemptResv(source_p)) |