summaryrefslogtreecommitdiff
path: root/src/modules/os_info.c
diff options
context:
space:
mode:
authorAdam <Adam@drink-coca-cola.info>2010-05-14 20:35:38 -0400
committerAdam <Adam@anope.org>2010-06-18 21:01:53 -0400
commitf049124905bd9f53439293e873003cb027a17b91 (patch)
tree352ed9251fd47055dd770aa2d5eabb20247e4b43 /src/modules/os_info.c
parent81a45520a773732c9f46785f27aa1956150775d7 (diff)
Rewrote the hashing system to use std::tr1::unordered_map
Diffstat (limited to 'src/modules/os_info.c')
-rw-r--r--src/modules/os_info.c27
1 files changed, 10 insertions, 17 deletions
diff --git a/src/modules/os_info.c b/src/modules/os_info.c
index b486e32f6..a49fa8a88 100644
--- a/src/modules/os_info.c
+++ b/src/modules/os_info.c
@@ -193,8 +193,8 @@ class OSInfo : public Module
this->SetVersion(VERSION);
this->SetType(SUPPORTED);
- this->AddCommand(NICKSERV, new CommandNSOInfo());
- this->AddCommand(CHANSERV, new CommandCSOInfo());
+ this->AddCommand(NickServ, new CommandNSOInfo());
+ this->AddCommand(ChanServ, new CommandCSOInfo());
const char* langtable_en_us[] = {
/* OINFO_SYNTAX */
@@ -415,27 +415,20 @@ class OSInfo : public Module
~OSInfo()
{
- int i;
- NickCore *nc;
- ChannelInfo *ci;
-
OnSaveDatabase();
- for (i = 0; i < 1024; ++i)
+ for (nickcore_map::const_iterator it = NickCoreList.begin(); it != NickCoreList.end(); ++it)
{
- /* Remove the nick Cores */
- for (nc = nclists[i]; nc; nc = nc->next)
- {
- nc->Shrink("os_info");
- }
+ NickCore *nc = it->second;
+
+ nc->Shrink("os_info");
}
- for (i = 0; i < 256; ++i)
+ for (registered_channel_map::const_iterator it = RegisteredChannelList.begin(); it != RegisteredChannelList.end(); ++it)
{
- for (ci = chanlists[i]; ci; ci = ci->next)
- {
- ci->Shrink("os_info");
- }
+ ChannelInfo *ci = it->second;
+
+ ci->Shrink("os_info");
}
}