diff options
author | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-05-05 23:43:40 +0000 |
---|---|---|
committer | special <special@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-05-05 23:43:40 +0000 |
commit | afdc66c2ce4a5102a6f244c561e800cfd265069f (patch) | |
tree | c6fe06e6cb1d81483304eddede093c00e54437e9 /src/modules | |
parent | fa3e1d5d4d803840b6bf06d9116353fab55fc686 (diff) |
m_filter: Do not attempt to filter messages from remote users
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11362 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_filter.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 94dc2f134..b7d977771 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -251,19 +251,22 @@ FilterBase::~FilterBase() int FilterBase::OnUserPreMessage(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) { + if (!IS_LOCAL(user)) + return 0; + flags = FLAG_PRIVMSG; return OnUserPreNotice(user,dest,target_type,text,status,exempt_list); } int FilterBase::OnUserPreNotice(User* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list) { - if (!flags) - flags = FLAG_NOTICE; - /* Leave ulines alone */ if ((ServerInstance->ULine(user->server)) || (!IS_LOCAL(user))) return 0; + if (!flags) + flags = FLAG_NOTICE; + FilterResult* f = this->FilterMatch(user, text, flags); if (f) { |