diff options
| author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-16 06:57:14 +0000 |
|---|---|---|
| committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-01-16 06:57:14 +0000 |
| commit | ff13d00eb50a228e05c4c37b0757082ca8bc9e4a (patch) | |
| tree | 9e3c000e91963de7c696bb3733fbb33a994a445b /src/protocol/inspircd12.cpp | |
| parent | aaf1cefd1c34e08d68725d459cab02128daf72e6 (diff) | |
Removed c_userlist and u_chanlist, replaced with std::list
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2764 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol/inspircd12.cpp')
| -rw-r--r-- | src/protocol/inspircd12.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp index 78d3a88fc..f07d5896e 100644 --- a/src/protocol/inspircd12.cpp +++ b/src/protocol/inspircd12.cpp @@ -531,13 +531,15 @@ int anope_event_fjoin(const char *source, int ac, const char **av) c->creation_time = ts; /* Remove status from all of our users */ - for (struct c_userlist *cu = c->users; cu; cu = cu->next) + for (CUserList::iterator it = c->users.begin(); it != c->users.end(); ++it) { - c->RemoveMode(NULL, CMODE_OWNER, cu->user->nick); - c->RemoveMode(NULL, CMODE_PROTECT, cu->user->nick); - c->RemoveMode(NULL, CMODE_OP, cu->user->nick); - c->RemoveMode(NULL, CMODE_HALFOP, cu->user->nick); - c->RemoveMode(NULL, CMODE_VOICE, cu->user->nick); + UserContainer *uc = *it; + + c->RemoveMode(NULL, CMODE_OWNER, uc->user->nick); + c->RemoveMode(NULL, CMODE_PROTECT, uc->user->nick); + c->RemoveMode(NULL, CMODE_OP, uc->user->nick); + c->RemoveMode(NULL, CMODE_HALFOP, uc->user->nick); + c->RemoveMode(NULL, CMODE_VOICE, uc->user->nick); } if (c->ci) { @@ -630,7 +632,7 @@ int anope_event_fjoin(const char *source, int ac, const char **av) c->UnsetFlag(CH_SYNCING); /* If there are users in the channel they are allowed to be, set topic mlock etc */ - if (c->usercount) + if (!c->users.empty()) c->Sync(); /* If there are no users in the channel, there is a ChanServ timer set to part the service bot * and destroy the channel soon |
