From 72c6686ed90e8c7b7e38677bbf59fd25613328e8 Mon Sep 17 00:00:00 2001 From: dz Date: Thu, 2 Apr 2009 22:47:01 +0000 Subject: Fix up logic in m_allowinvite: extban A prevents /invite in all cases; channel mode A or extban exception A allow /invite in all cases. Fixes bug #819 reported by Taros. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11281 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_allowinvite.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/modules/m_allowinvite.cpp') diff --git a/src/modules/m_allowinvite.cpp b/src/modules/m_allowinvite.cpp index 8e39ad9c6..4805e1ac6 100644 --- a/src/modules/m_allowinvite.cpp +++ b/src/modules/m_allowinvite.cpp @@ -44,7 +44,13 @@ class ModuleAllowInvite : public Module { if (IS_LOCAL(user)) { - if (channel->IsModeSet('A') && channel->GetExtBanStatus(user, 'A') < 0) + if (channel->GetExtBanStatus(user, 'A') == -1) + { + // Matching extban, explicitly deny /invite + user->WriteNumeric(ERR_CHANOPRIVSNEEDED, "%s %s :You are banned from using INVITE", user->nick.c_str(), channel->name.c_str()); + return 1; + } + if (channel->IsModeSet('A') || channel->GetExtBanStatus(user, 'A') == 1) { // Explicitly allow /invite return -1; -- cgit v1.2.3