]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Forward port r9825: Fix bug found by the atheme migration testing: +V should never...
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 31 May 2008 18:44:15 +0000 (18:44 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 31 May 2008 18:44:15 +0000 (18:44 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9826 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_noinvite.cpp

index 0d6c56d99f70305f37a73f328673cb24ce553e17..0126b11c0b3b2b1aeea87340bf8e91199c5800d2 100644 (file)
@@ -38,12 +38,15 @@ class ModuleNoInvite : public Module
 
        virtual int OnUserPreInvite(User* user,User* dest,Channel* channel, time_t timeout)
        {
-               if (channel->IsModeSet('V'))
+               if (IS_LOCAL(user))
                {
-                       user->WriteNumeric(492, "%s %s :Can't invite %s to channel (+V set)",user->nick.c_str(), channel->name.c_str(), dest->nick.c_str());
-                       return 1;
+                       if (channel->IsModeSet('V'))
+                       {
+                               user->WriteNumeric(492, "%s %s :Can't invite %s to channel (+V set)",user->nick.c_str(), channel->name.c_str(), dest->nick.c_str());
+                               return 1;
+                       }
+                       return 0;
                }
-               return 0;
        }
 
        virtual ~ModuleNoInvite()