]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_invisible.cpp
Remove an unused event.
[user/henk/code/inspircd.git] / src / modules / m_invisible.cpp
index c1b2dcc7f019ce4ea126ad668484984c7849741f..96c82fe89c1155fc95b87bbe01dda821c964f224 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -57,27 +57,6 @@ class InvisibleMode : public ModeHandler
        {
                if (dest->IsModeSet('Q') != adding)
                {
-                       bool ok = false;
-
-                       if (IS_LOCAL(source))
-                       {
-                               for (int j = 0; j < conf->Enumerate("type"); j++)
-                               {
-                                       std::string opertype = conf->ReadValue("type","name",j);
-                                       if (opertype == source->oper)
-                                       {
-                                               ok = conf->ReadFlag("type", "canquiet", j);
-                                               break;
-                                       }
-                               }
-
-                               if (!ok)
-                               {
-                                       source->WriteNumeric(481, "%s :Permission Denied - You do not have access to become invisible via user mode +Q", source->nick.c_str());
-                                       return MODEACTION_DENY;
-                               }
-                       }
-
                        dest->SetMode('Q', adding);
 
                        /* Fix for bug #379 reported by stealth. On +/-Q make m_watch think the user has signed on/off */
@@ -116,7 +95,7 @@ class InvisibleMode : public ModeHandler
                                }
                        }
 
-                       ServerInstance->SNO->WriteToSnoMask('A', "\2NOTICE\2: Oper %s has become %svisible (%sQ)", dest->GetFullHost().c_str(), adding ? "in" : "", adding ? "+" : "-");
+                       ServerInstance->SNO->WriteToSnoMask('A', "\2NOTICE\2: Oper %s has become %svisible (%cQ)", dest->GetFullHost().c_str(), adding ? "in" : "", adding ? '+' : '-');
                        return MODEACTION_ALLOW;
                }
                else