summaryrefslogtreecommitdiff
path: root/src/modules/m_delayjoin.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_delayjoin.cpp
parentFix "foo" < "foobar" comparison in irc::string (diff)
Change UserChanList to an intrusive-style linked list
Diffstat (limited to 'src/modules/m_delayjoin.cpp')
-rw-r--r--src/modules/m_delayjoin.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/modules/m_delayjoin.cpp b/src/modules/m_delayjoin.cpp
index 86a8ee0df..9e7d81e9c 100644
--- a/src/modules/m_delayjoin.cpp
+++ b/src/modules/m_delayjoin.cpp
@@ -46,7 +46,7 @@ class ModuleDelayJoin : public Module
void CleanUser(User* user);
void OnUserPart(Membership*, std::string &partmessage, CUList&);
void OnUserKick(User* source, Membership*, const std::string &reason, CUList&);
- void OnBuildNeighborList(User* source, UserChanList &include, std::map<User*,bool> &exception);
+ void OnBuildNeighborList(User* source, std::vector<Channel*> &include, std::map<User*,bool> &exception);
void OnText(User* user, void* dest, int target_type, const std::string &text, char status, CUList &exempt_list);
};
@@ -124,15 +124,17 @@ void ModuleDelayJoin::OnUserKick(User* source, Membership* memb, const std::stri
populate(except, memb);
}
-void ModuleDelayJoin::OnBuildNeighborList(User* source, UserChanList &include, std::map<User*,bool> &exception)
+void ModuleDelayJoin::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 && unjoined.get(memb))
- include.erase(c);
+ include.erase(i);
+ else
+ i++;
}
}