summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-11-24 08:58:13 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-11-24 08:58:13 +0000
commit06396fb2b5fce540efc34b71a020dfad08c4e858 (patch)
tree212b54b94464538dacf85c5a035b312908fa307d
parentf5f20e377386228abc4ca176b25b244171f21f14 (diff)
Don't check permission to +Q for remote users, probably fixes bug #619 reported by yell0w.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10821 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_invisible.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/modules/m_invisible.cpp b/src/modules/m_invisible.cpp
index aa69d1b85..c1b2dcc7f 100644
--- a/src/modules/m_invisible.cpp
+++ b/src/modules/m_invisible.cpp
@@ -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);