summaryrefslogtreecommitdiff
path: root/modules/core
diff options
context:
space:
mode:
Diffstat (limited to 'modules/core')
-rw-r--r--modules/core/bs_botlist.cpp8
-rw-r--r--modules/core/cs_akick.cpp4
-rw-r--r--modules/core/db_plain.cpp4
-rw-r--r--modules/core/os_akill.cpp4
-rw-r--r--modules/core/os_noop.cpp7
-rw-r--r--modules/core/os_session.cpp4
-rw-r--r--modules/core/os_snline.cpp4
-rw-r--r--modules/core/os_sqline.cpp4
-rw-r--r--modules/core/os_szline.cpp4
-rw-r--r--modules/core/os_userlist.cpp4
10 files changed, 23 insertions, 24 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())
{