]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_invisible.cpp
Fix silly oversight discovered by tra26 (thanks!) where the core tries to handle...
[user/henk/code/inspircd.git] / src / modules / m_invisible.cpp
index aa69d1b8570e3399e3b353830de35ed7077c0fae..c1b2dcc7f019ce4ea126ad668484984c7849741f 100644 (file)
@@ -59,20 +59,23 @@ class InvisibleMode : public ModeHandler
                {
                        bool ok = false;
 
-                       for (int j = 0; j < conf->Enumerate("type"); j++)
+                       if (IS_LOCAL(source))
                        {
-                               std::string opertype = conf->ReadValue("type","name",j);
-                               if (opertype == source->oper)
+                               for (int j = 0; j < conf->Enumerate("type"); j++)
                                {
-                                       ok = conf->ReadFlag("type", "canquiet", j);
-                                       break;
+                                       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;
+                               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);