From 7f273676eb203a1be6ca179c6ee1b3d3a4e81a78 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 5 Jun 2016 14:16:36 +0100 Subject: 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. --- modules/core/m_join.c | 2 +- modules/core/m_kick.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/core') diff --git a/modules/core/m_join.c b/modules/core/m_join.c index 833bebb..df22fe0 100644 --- a/modules/core/m_join.c +++ b/modules/core/m_join.c @@ -174,7 +174,7 @@ m_join(struct Client *client_p, struct Client *source_p, /* * can_join checks for +i key, bans. */ - if ((i = can_join(source_p, chptr, key))) + if ((i = can_join(source_p, chptr, key)) && !HasUMode(source_p, UMODE_GOD)) { sendto_one(source_p, form_str(i), me.name, source_p->name, chptr->chname); diff --git a/modules/core/m_kick.c b/modules/core/m_kick.c index 1b15c4d..5d4545f 100644 --- a/modules/core/m_kick.c +++ b/modules/core/m_kick.c @@ -97,7 +97,7 @@ m_kick(struct Client *client_p, struct Client *source_p, } } - if (!has_member_flags(ms_source, CHFL_CHANOP|CHFL_HALFOP) && !HasUMode(source_p, UMODE_GCHANOP)) + if (!has_member_flags(ms_source, CHFL_CHANOP|CHFL_HALFOP) && !HasUMode(source_p, UMODE_GOD)) { /* was a user, not a server, and user isn't seen as a chanop here */ if (MyConnect(source_p)) @@ -146,9 +146,9 @@ m_kick(struct Client *client_p, struct Client *source_p, { #ifdef HALFOPS /* half ops cannot kick other halfops on private channels */ - if (has_member_flags(ms_source, CHFL_HALFOP) && !has_member_flags(ms_source, CHFL_CHANOP) && !HasUMode(source_p, UMODE_GCHANOP)) + if (has_member_flags(ms_source, CHFL_HALFOP) && !has_member_flags(ms_source, CHFL_CHANOP) && !HasUMode(source_p, UMODE_GOD)) { - if (has_member_flags(ms_target, CHFL_CHANOP|CHFL_HALFOP) || HasUMode(target_p, UMODE_GCHANOP)) + if (has_member_flags(ms_target, CHFL_CHANOP|CHFL_HALFOP) || HasUMode(target_p, UMODE_GOD)) { sendto_one(source_p, form_str(ERR_CHANOPRIVSNEEDED), me.name, source_p->name, chptr->chname); -- cgit