From c5e16f83df83e251f93e30f90e094abc4bf03248 Mon Sep 17 00:00:00 2001 From: w00t Date: Tue, 28 Oct 2008 10:32:50 +0000 Subject: 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 --- src/modules/m_watch.cpp | 8 ++++---- 1 file 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::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::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()); } } -- cgit v1.2.3