diff options
| author | 2010-04-13 12:47:42 -0500 | |
|---|---|---|
| committer | 2010-08-03 17:32:42 -0400 | |
| commit | c1a07677db2bb0b023d5eb3565353cb0843eefbf (patch) | |
| tree | 5d2bae34ba9d411ce19e9179498d289b1d2c468d /src/modules/m_auditorium.cpp | |
| parent | Fix "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.cpp | 11 |
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++) |
