From ee4b15269660925a0370c865e65787b32cfde603 Mon Sep 17 00:00:00 2001 From: danieldg Date: Fri, 5 Mar 2010 18:25:54 +0000 Subject: Take auditorium-see into account when building neighbor list git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12593 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_auditorium.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp index 0e5c92310..e55aa84a4 100644 --- a/src/modules/m_auditorium.cpp +++ b/src/modules/m_auditorium.cpp @@ -150,11 +150,18 @@ class ModuleAuditorium : public Module while (i != include.end()) { Channel* c = *i++; - Membership* memb = c->GetUser(source); // will be non-null - if (IsVisible(memb)) + Membership* memb = c->GetUser(source); + if (!memb || IsVisible(memb)) continue; - // TODO this doesn't take can-see into account + // this channel should not be considered when listing my neighbors include.erase(c); + // however, that might hide me from ops that can see me... + const UserMembList* users = c->GetUsers(); + for(UserMembCIter i = users->begin(); i != users->end(); i++) + { + if (IS_LOCAL(i->first) && CanSee(i->first, memb)) + exception[i->first] = true; + } } } }; -- cgit v1.2.3