diff options
author | Adam <Adam@anope.org> | 2011-03-14 20:16:38 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-03-14 20:16:38 -0400 |
commit | ddfb16de1a61a9b80ece0ba6e5fd34326abf5f18 (patch) | |
tree | 81e29e3eebc8ae6241e6bdd6970e48a037291203 /modules | |
parent | 2555d0d6373e631ca2504826a02aaae2e82cd7a4 (diff) |
Fixed compile
Diffstat (limited to 'modules')
-rw-r--r-- | modules/core/bs_botlist.cpp | 8 | ||||
-rw-r--r-- | modules/core/cs_akick.cpp | 4 | ||||
-rw-r--r-- | modules/core/db_plain.cpp | 4 | ||||
-rw-r--r-- | modules/core/os_akill.cpp | 4 | ||||
-rw-r--r-- | modules/core/os_noop.cpp | 7 | ||||
-rw-r--r-- | modules/core/os_session.cpp | 4 | ||||
-rw-r--r-- | modules/core/os_snline.cpp | 4 | ||||
-rw-r--r-- | modules/core/os_sqline.cpp | 4 | ||||
-rw-r--r-- | modules/core/os_szline.cpp | 4 | ||||
-rw-r--r-- | modules/core/os_userlist.cpp | 4 | ||||
-rw-r--r-- | modules/extra/db_mysql.cpp | 8 | ||||
-rw-r--r-- | modules/protocol/inspircd12.cpp | 4 | ||||
-rw-r--r-- | modules/protocol/inspircd20.cpp | 4 | ||||
-rw-r--r-- | modules/protocol/ngircd.cpp | 8 | ||||
-rw-r--r-- | modules/protocol/plexus.cpp | 4 | ||||
-rw-r--r-- | modules/protocol/ratbox.cpp | 4 |
16 files changed, 41 insertions, 38 deletions
diff --git a/modules/core/bs_botlist.cpp b/modules/core/bs_botlist.cpp index bd2413b36..1310a6358 100644 --- a/modules/core/bs_botlist.cpp +++ b/modules/core/bs_botlist.cpp @@ -26,9 +26,9 @@ class CommandBSBotList : public Command User *u = source.u; unsigned count = 0; - for (patricia_tree<BotInfo *, ci::ci_char_traits>::iterator it(BotListByNick); it.next();) + for (Anope::insensitive_map<BotInfo *>::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it) { - BotInfo *bi = *it; + BotInfo *bi = it->second; if (!bi->HasFlag(BI_PRIVATE)) { @@ -43,9 +43,9 @@ class CommandBSBotList : public Command { source.Reply(_("Bots reserved to IRC operators:")); - for (patricia_tree<BotInfo *, ci::ci_char_traits>::iterator it(BotListByNick); it.next();) + for (Anope::insensitive_map<BotInfo *>::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it) { - BotInfo *bi = *it; + BotInfo *bi = it->second; if (bi->HasFlag(BI_PRIVATE)) { diff --git a/modules/core/cs_akick.cpp b/modules/core/cs_akick.cpp index bad0e6d22..e9e116cf5 100644 --- a/modules/core/cs_akick.cpp +++ b/modules/core/cs_akick.cpp @@ -213,9 +213,9 @@ class CommandCSAKick : public Command { /* Match against all currently online users with equal or * higher access. - Viper */ - for (patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); it.next();) + for (Anope::insensitive_map<User *>::iterator it = UserListByNick.begin(), it_end = UserListByNick.end(); it != it_end; ++it) { - User *u2 = *it; + User *u2 = it->second; ChanAccess *u2_access = ci->GetAccess(nc), *u_access = ci->GetAccess(u); int16 u2_level = u2_access ? u2_access->level : 0, u_level = u_access ? u_access->level : 0; diff --git a/modules/core/db_plain.cpp b/modules/core/db_plain.cpp index 550f229a1..2bad313ca 100644 --- a/modules/core/db_plain.cpp +++ b/modules/core/db_plain.cpp @@ -782,9 +782,9 @@ class DBPlain : public Module FOREACH_MOD(I_OnDatabaseWriteMetadata, OnDatabaseWriteMetadata(WriteMetadata, na)); } - for (patricia_tree<BotInfo *, ci::ci_char_traits>::iterator it(BotListByNick); it.next();) + for (Anope::insensitive_map<BotInfo *>::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it) { - BotInfo *bi = *it; + BotInfo *bi = it->second; db_buffer << "BI " << bi->nick << " " << bi->GetIdent() << " " << bi->host << " " << bi->created << " " << bi->chancount << " :" << bi->realname << endl; if (bi->FlagCount()) diff --git a/modules/core/os_akill.cpp b/modules/core/os_akill.cpp index a6f40c9ed..6ccb33e92 100644 --- a/modules/core/os_akill.cpp +++ b/modules/core/os_akill.cpp @@ -176,8 +176,8 @@ class CommandOSAKill : public Command if (user) mask = "*@" + user->host; unsigned int affected = 0; - for (patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); it.next();) - if (Anope::Match((*it)->GetIdent() + "@" + (*it)->host, mask)) + for (Anope::insensitive_map<User *>::iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) + if (Anope::Match(it->second->GetIdent() + "@" + it->second->host, mask)) ++affected; float percent = static_cast<float>(affected) / static_cast<float>(UserListByNick.size()) * 100.0; diff --git a/modules/core/os_noop.cpp b/modules/core/os_noop.cpp index 70aecdac2..a3269d121 100644 --- a/modules/core/os_noop.cpp +++ b/modules/core/os_noop.cpp @@ -39,11 +39,10 @@ class CommandOSNOOP : public Command source.Reply(_("All O:lines of \002%s\002 have been removed."), server.c_str()); /* Kill all the IRCops of the server */ - patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); - for (bool next = it.next(); next;) + for (Anope::insensitive_map<User *>::iterator it = UserListByNick.begin(); it != UserListByNick.end();) { - User *u2 = *it; - next = it.next(); + User *u2 = it->second; + ++it; if (u2 && u2->HasMode(UMODE_OPER) && Anope::Match(u2->server->GetName(), server, true)) kill_user(Config->s_OperServ, u2, reason); diff --git a/modules/core/os_session.cpp b/modules/core/os_session.cpp index 2ea7e8242..8090efe10 100644 --- a/modules/core/os_session.cpp +++ b/modules/core/os_session.cpp @@ -139,9 +139,9 @@ class CommandOSSession : public Command source.Reply(_("Hosts with at least \002%d\002 sessions:"), mincount); source.Reply(_("Sessions Host")); - for (patricia_tree<Session *>::iterator it(SessionList); it.next();) + for (Anope::map<Session *>::iterator it = SessionList.begin(), it_end = SessionList.end(); it != it_end; ++it) { - Session *session = *it; + Session *session = it->second; if (session->count >= mincount) source.Reply(_("%6d %s"), session->count, session->host.c_str()); diff --git a/modules/core/os_snline.cpp b/modules/core/os_snline.cpp index 335599616..3cb9c39fd 100644 --- a/modules/core/os_snline.cpp +++ b/modules/core/os_snline.cpp @@ -190,8 +190,8 @@ class CommandOSSNLine : public Command if (mask[masklen - 1] == ' ') mask.erase(masklen - 1); unsigned int affected = 0; - for (patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); it.next();) - if (Anope::Match((*it)->realname, mask)) + for (Anope::insensitive_map<User *>::iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) + if (Anope::Match(it->second->realname, mask)) ++affected; float percent = static_cast<float>(affected) / static_cast<float>(UserListByNick.size()) * 100.0; diff --git a/modules/core/os_sqline.cpp b/modules/core/os_sqline.cpp index c3d1da9e8..cf618107e 100644 --- a/modules/core/os_sqline.cpp +++ b/modules/core/os_sqline.cpp @@ -171,8 +171,8 @@ class CommandOSSQLine : public Command if (!mask.empty() && !reason.empty()) { unsigned int affected = 0; - for (patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); it.next();) - if (Anope::Match((*it)->nick, mask)) + for (Anope::insensitive_map<User *>::iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) + if (Anope::Match(it->second->nick, mask)) ++affected; float percent = static_cast<float>(affected) / static_cast<float>(UserListByNick.size()) * 100.0; diff --git a/modules/core/os_szline.cpp b/modules/core/os_szline.cpp index 1998948e7..f57902fea 100644 --- a/modules/core/os_szline.cpp +++ b/modules/core/os_szline.cpp @@ -174,8 +174,8 @@ class CommandOSSZLine : public Command if (user && user->ip()) mask = user->ip.addr(); unsigned int affected = 0; - for (patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); it.next();) - if ((*it)->ip() && Anope::Match((*it)->ip.addr(), mask)) + for (Anope::insensitive_map<User *>::iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) + if (it->second->ip() && Anope::Match(it->second->ip.addr(), mask)) ++affected; float percent = static_cast<float>(affected) / static_cast<float>(UserListByNick.size()) * 100.0; diff --git a/modules/core/os_userlist.cpp b/modules/core/os_userlist.cpp index 0525ecbbf..a511fbf25 100644 --- a/modules/core/os_userlist.cpp +++ b/modules/core/os_userlist.cpp @@ -53,9 +53,9 @@ class CommandOSUserList : public Command source.Reply(_("Users list:\n" "Nick Mask")); - for (patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); it.next();) + for (Anope::insensitive_map<User *>::iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) { - User *u2 = *it; + User *u2 = it->second; if (!pattern.empty()) { diff --git a/modules/extra/db_mysql.cpp b/modules/extra/db_mysql.cpp index d8a6d934c..a6f83899e 100644 --- a/modules/extra/db_mysql.cpp +++ b/modules/extra/db_mysql.cpp @@ -640,9 +640,9 @@ class DBMySQL : public Module FOREACH_MOD(I_OnDatabaseWriteMetadata, OnDatabaseWriteMetadata(WriteChannelMetadata, CurChannel)); } - for (patricia_tree<BotInfo *, ci::ci_char_traits>::iterator it(BotListByNick); it.next();) + for (Anope::insensitive_map<BotInfo *>::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it) { - CurBot = *it; + CurBot = it->second; FOREACH_MOD(I_OnDatabaseWriteMetadata, OnDatabaseWriteMetadata(WriteBotMetadata, CurBot)); /* This is for the core bots, bots added by users are already handled by an event */ @@ -1222,8 +1222,8 @@ static void SaveDatabases() me->RunQuery("TRUNCATE TABLE `anope_bs_core`"); - for (patricia_tree<BotInfo *, ci::ci_char_traits>::iterator it(BotListByNick); it.next();) - me->OnBotCreate(*it); + for (Anope::insensitive_map<BotInfo *>::const_iterator it = BotListByNick.begin(), it_end = BotListByNick.end(); it != it_end; ++it) + me->OnBotCreate(it->second); me->RunQuery("TRUNCATE TABLE `anope_cs_info`"); me->RunQuery("TRUNCATE TABLE `anope_bs_badwords`"); diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp index ecac4a4f9..82d43434c 100644 --- a/modules/protocol/inspircd12.cpp +++ b/modules/protocol/inspircd12.cpp @@ -768,9 +768,9 @@ class ProtoInspIRCd : public Module void OnServerSync(Server *s) { - for (patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); it.next();) + for (Anope::insensitive_map<User *>::iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) { - User *u = *it; + User *u = it->second; if (u->server == s && !u->IsIdentified()) validate_user(u); } diff --git a/modules/protocol/inspircd20.cpp b/modules/protocol/inspircd20.cpp index 87fe74c69..575958bd8 100644 --- a/modules/protocol/inspircd20.cpp +++ b/modules/protocol/inspircd20.cpp @@ -759,9 +759,9 @@ class ProtoInspIRCd : public Module void OnServerSync(Server *s) { - for (patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); it.next();) + for (Anope::insensitive_map<User *>::iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) { - User *u = *it; + User *u = it->second; if (u->server == s && !u->IsIdentified()) validate_user(u); } diff --git a/modules/protocol/ngircd.cpp b/modules/protocol/ngircd.cpp index 94b253a58..6e1f21feb 100644 --- a/modules/protocol/ngircd.cpp +++ b/modules/protocol/ngircd.cpp @@ -46,9 +46,13 @@ class ngIRCdProto : public IRCDProto void SendAkill(User *u, const XLine *x) { if (SGLine && u == NULL) - for (patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); it.next();) - if (SGLine->Check(*it) != NULL) + for (Anope::insensitive_map<User *>::iterator it = UserListByNick.begin(); it != UserListByNick.end();) + { + u = it->second; + ++it; + if (SGLine->Check(u) != NULL) break; + } } void SendAkillDel(const XLine*) { } diff --git a/modules/protocol/plexus.cpp b/modules/protocol/plexus.cpp index edfdfeec4..3b299e962 100644 --- a/modules/protocol/plexus.cpp +++ b/modules/protocol/plexus.cpp @@ -644,9 +644,9 @@ class ProtoPlexus : public Module void OnServerSync(Server *s) { - for (patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); it.next();) + for (Anope::insensitive_map<User *>::iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) { - User *u = *it; + User *u = it->second; if (u->server == s && !u->IsIdentified()) validate_user(u); } diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp index a5f58057e..62a8d5a72 100644 --- a/modules/protocol/ratbox.cpp +++ b/modules/protocol/ratbox.cpp @@ -579,9 +579,9 @@ class ProtoRatbox : public Module void OnServerSync(Server *s) { - for (patricia_tree<User *, ci::ci_char_traits>::iterator it(UserListByNick); it.next();) + for (Anope::insensitive_map<User *>::iterator it = UserListByNick.begin(); it != UserListByNick.end(); ++it) { - User *u = *it; + User *u = it->second; if (u->server == s && !u->IsIdentified()) validate_user(u); } |