Skip to content

Commit

Permalink
Check if dest user is local, since this is the user we are going to G…
Browse files Browse the repository at this point in the history
…etExt on, so the check was reverse. Fixes bug #716 reported by Darom

git-svn-id: http://svn.inspircd.org/repository/branches/1_1_stable@11094 e03df62e-2008-0410-955e-edbf42e46eb7
  • Loading branch information
peavey committed Feb 12, 2009
1 parent 453050a commit 645b8d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/modules/m_silence.cpp
Expand Up @@ -178,7 +178,7 @@ class ModuleSilence : public Module
// privmsgs from people on the silence list, directed privately at the user.
// channel messages are unaffected (ever tried to follow the flow of conversation in
// a channel when you've set an ignore on the two most talkative people?)
if ((target_type == TYPE_USER) && (IS_LOCAL(user)))
if ((target_type == TYPE_USER) && (IS_LOCAL(((userrec*)dest))))
{
userrec* u = (userrec*)dest;
silencelist* sl;
Expand Down
5 changes: 1 addition & 4 deletions src/modules/m_silence_ext.cpp
Expand Up @@ -311,10 +311,7 @@ class ModuleSilence : public Module

virtual int PreText(userrec* user,void* dest,int target_type, std::string &text, char status, CUList &exempt_list, int silence_type)
{
if (!IS_LOCAL(user))
return 0;

if (target_type == TYPE_USER)
if (target_type == TYPE_USER && IS_LOCAL(((userrec*)dest)))
{
return MatchPattern((userrec*)dest, user, silence_type);
}
Expand Down

0 comments on commit 645b8d0

Please sign in to comment.