From 0620c97abdf473ad536027c3b60efee517013fa1 Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 31 May 2008 18:44:15 +0000 Subject: 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 --- src/modules/m_noinvite.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/modules') 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() -- cgit v1.2.3