aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_auditorium.cpp
diff options
context:
space:
mode:
authorGravatar Daniel De Graaf2010-04-13 12:47:42 -0500
committerGravatar Daniel De Graaf2010-08-03 17:32:42 -0400
commitc1a07677db2bb0b023d5eb3565353cb0843eefbf (patch)
tree5d2bae34ba9d411ce19e9179498d289b1d2c468d /src/modules/m_auditorium.cpp
parentFix "foo" < "foobar" comparison in irc::string (diff)
Change UserChanList to an intrusive-style linked list
Diffstat (limited to 'src/modules/m_auditorium.cpp')
-rw-r--r--src/modules/m_auditorium.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp
index 6e1f40506..f7964f253 100644
--- a/src/modules/m_auditorium.cpp
+++ b/src/modules/m_auditorium.cpp
@@ -146,17 +146,20 @@ class ModuleAuditorium : public Module
BuildExcept(memb, excepts);
}
- void OnBuildNeighborList(User* source, UserChanList &include, std::map<User*,bool> &exception)
+ void OnBuildNeighborList(User* source, std::vector<Channel*> &include, std::map<User*,bool> &exception)
{
- UCListIter i = include.begin();
+ std::vector<Channel*>::iterator i = include.begin();
while (i != include.end())
{
- Channel* c = *i++;
+ Channel* c = *i;
Membership* memb = c->GetUser(source);
if (!memb || IsVisible(memb))
+ {
+ i++;
continue;
+ }
// this channel should not be considered when listing my neighbors
- include.erase(c);
+ include.erase(i);
// however, that might hide me from ops that can see me...
const UserMembList* users = c->GetUsers();
for(UserMembCIter j = users->begin(); j != users->end(); j++)