summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-31 18:44:15 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-31 18:44:15 +0000
commit0620c97abdf473ad536027c3b60efee517013fa1 (patch)
tree02ec4abe8e9ea08322299b9219ab917ed122fc12
parent2c967f564ba6037ac4e273b1c26cf8d239b970bf (diff)
Forward port r9825: Fix bug found by the atheme migration testing: +V should never affect INVITE from a remote issuer
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9826 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_noinvite.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/modules/m_noinvite.cpp b/src/modules/m_noinvite.cpp
index 0d6c56d99..0126b11c0 100644
--- a/src/modules/m_noinvite.cpp
+++ b/src/modules/m_noinvite.cpp
@@ -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()