summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-28 10:32:50 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-28 10:32:50 +0000
commitc5e16f83df83e251f93e30f90e094abc4bf03248 (patch)
tree35f35faa56d3f0d359c7c9d7852b18734f3ee014 /src/modules
parent41dcd9aea5d4c7e8312d45c872c68211ec20a34e (diff)
Watch visibility test was working the wrong way. Patch from Darom.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10735 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_watch.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp
index acc63fd40..e9c0c3025 100644
--- a/src/modules/m_watch.cpp
+++ b/src/modules/m_watch.cpp
@@ -432,7 +432,7 @@ class Modulewatch : public Module
{
for (std::deque<User*>::iterator n = x->second.begin(); n != x->second.end(); n++)
{
- if (!user->Visibility || user->Visibility->VisibleTo(user))
+ if (!user->Visibility || user->Visibility->VisibleTo(*n))
(*n)->WriteNumeric(601, "%s %s %s %s %lu :went offline", (*n)->nick.c_str() ,user->nick.c_str(), user->ident.c_str(), user->dhost.c_str(), (unsigned long) ServerInstance->Time());
watchlist* wl;
@@ -502,7 +502,7 @@ class Modulewatch : public Module
{
for (std::deque<User*>::iterator n = x->second.begin(); n != x->second.end(); n++)
{
- if (!user->Visibility || user->Visibility->VisibleTo(user))
+ if (!user->Visibility || user->Visibility->VisibleTo(*n))
(*n)->WriteNumeric(600, "%s %s %s %s %lu :arrived online", (*n)->nick.c_str(), user->nick.c_str(), user->ident.c_str(), user->dhost.c_str(), (unsigned long) user->age);
watchlist* wl;
@@ -525,7 +525,7 @@ class Modulewatch : public Module
watchlist* wl;
if ((*n)->GetExt("watchlist", wl))
{
- if (!user->Visibility || user->Visibility->VisibleTo(user))
+ if (!user->Visibility || user->Visibility->VisibleTo(*n))
(*n)->WriteNumeric(601, "%s %s %s %s %lu :went offline", (*n)->nick.c_str(), oldnick.c_str(), user->ident.c_str(), user->dhost.c_str(), (unsigned long) user->age);
(*wl)[oldnick.c_str()] = "";
}
@@ -540,7 +540,7 @@ class Modulewatch : public Module
if ((*n)->GetExt("watchlist", wl))
{
(*wl)[user->nick.c_str()] = std::string(user->ident).append(" ").append(user->dhost).append(" ").append(ConvToStr(user->age));
- if (!user->Visibility || user->Visibility->VisibleTo(user))
+ if (!user->Visibility || user->Visibility->VisibleTo(*n))
(*n)->WriteNumeric(600, "%s %s %s :arrived online", (*n)->nick.c_str(), user->nick.c_str(), (*wl)[user->nick.c_str()].c_str());
}
}