From e21214f274c9bd4e831c3512e3365d16d79ef8d2 Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 4 Feb 2008 14:03:42 +0000 Subject: Fix exemptchanops for some modules, fixes bug #485 reported by John. Thanks. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8818 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_noctcp.cpp | 6 ++++++ src/modules/m_nonotice.cpp | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/modules/m_noctcp.cpp b/src/modules/m_noctcp.cpp index 2ae9505e1..5407ffb9d 100644 --- a/src/modules/m_noctcp.cpp +++ b/src/modules/m_noctcp.cpp @@ -72,6 +72,12 @@ class ModuleNoCTCP : public Module if ((target_type == TYPE_CHANNEL) && (IS_LOCAL(user))) { Channel* c = (Channel*)dest; + + if (CHANOPS_EXEMPT(ServerInstance, 'C') && c->GetStatus(user) == STATUS_OP) + { + return 0; + } + if (c->IsModeSet('C')) { if ((text.length()) && (text[0] == '\1')) diff --git a/src/modules/m_nonotice.cpp b/src/modules/m_nonotice.cpp index 11b57e09b..12b36c23f 100644 --- a/src/modules/m_nonotice.cpp +++ b/src/modules/m_nonotice.cpp @@ -68,9 +68,14 @@ class ModuleNoNotice : public Module Channel* c = (Channel*)dest; if (c->IsModeSet('T')) { - if ((ServerInstance->ULine(user->server)) || (c->GetStatus(user) == STATUS_OP) || (c->GetStatus(user) == STATUS_HOP)) + if (ServerInstance->ULine(user->server)) { - // ops and halfops can still /NOTICE the channel + // ulines are exempt. + return 0; + } + else if (CHANOPS_EXEMPT(ServerInstance, 'T') && c->GetStatus(user) == STATUS_OP) + { + // channel ops are exempt if set in conf. return 0; } else -- cgit v1.2.3