]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_allowinvite.cpp
Weed out a few leftover server instances from before modules had ServerInstance....
[user/henk/code/inspircd.git] / src / modules / m_allowinvite.cpp
index e32c39082664f221bda9a60c1498ae267314fb04..4805e1ac6d6034f9ff0e24fa9ad035b183fe57f2 100644 (file)
@@ -2,8 +2,8 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  *            the file COPYING for details.
@@ -44,7 +44,13 @@ class ModuleAllowInvite : public Module
        {
                if (IS_LOCAL(user))
                {
-                       if (channel->IsModeSet('A') && !channel->IsExtBanned(user, 'A'))
+                       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;