diff options
| author | Adam <Adam@anope.org> | 2011-01-28 23:09:25 -0500 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2011-01-28 23:09:25 -0500 |
| commit | e62664138b42437186669952a5c1a848c2cdfb02 (patch) | |
| tree | 803ca8c6ba64bcaf1ed70fbcfac41878f1204063 /src/operserv.cpp | |
| parent | 3eadc1509f378f26037dd3b7e1d61e0ac2d35019 (diff) | |
Added patricia_tree::iterator
Diffstat (limited to 'src/operserv.cpp')
| -rw-r--r-- | src/operserv.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/operserv.cpp b/src/operserv.cpp index 610d24e61..c08a0e53d 100644 --- a/src/operserv.cpp +++ b/src/operserv.cpp @@ -599,10 +599,11 @@ XLine *SNLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_ { Anope::string rreason = "G-Lined: " + reason; - for (patricia_tree<User *>::const_iterator it = UserListByNick.begin(), it_end = UserListByNick.end(); it != it_end;) + patricia_tree<User *, ci::ci_char_traits>::iterator uit(UserListByNick); + for (bool next = uit.next(); next;) { - User *user = *it; - ++it; + User *user = *uit; + next = uit.next(); if (!user->HasMode(UMODE_OPER) && user->server != Me && Anope::Match(user->realname, x->Mask)) kill_user(Config->ServerName, user, rreason); @@ -729,10 +730,11 @@ XLine *SQLineManager::Add(BotInfo *bi, User *u, const Anope::string &mask, time_ } else { - for (patricia_tree<User *>::const_iterator it = UserListByNick.begin(), it_end = UserListByNick.end(); it != it_end;) + patricia_tree<User *, ci::ci_char_traits>::iterator uit(UserListByNick); + for (bool next = uit.next(); next;) { - User *user = *it; - ++it; + User *user = *uit; + next = uit.next(); if (!user->HasMode(UMODE_OPER) && user->server != Me && Anope::Match(user->nick, x->Mask)) kill_user(Config->ServerName, user, rreason); |
