diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-03-05 18:25:54 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-03-05 18:25:54 +0000 |
commit | ee4b15269660925a0370c865e65787b32cfde603 (patch) | |
tree | e7361301a30765dc79d5925649adb08929e59ba9 /src | |
parent | bb1f70114cb986aca7299b8a48f6e727853b426c (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_auditorium.cpp | 13 |
1 files 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; + } } } }; |