diff options
-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; + } } } }; |