summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-11-07 21:57:31 -0500
committerAdam <Adam@anope.org>2012-11-07 21:57:31 -0500
commit53e8cd18dc013f47b8aeff86d22f5eaad80244ab (patch)
tree44dba3103a9583288d810270db8e6c560c77fd44 /src
parentac57f41c8762050190badf1b24d67d260f869e00 (diff)
Duplicate check some of these larger hashmaps on insert, just incase
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp3
-rw-r--r--src/nickalias.cpp3
-rw-r--r--src/nickcore.cpp3
-rw-r--r--src/regchannel.cpp3
4 files changed, 12 insertions, 0 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 41eceaf6e..ac7be382c 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -37,7 +37,10 @@ Channel::Channel(const Anope::string &nname, time_t ts) : Flags<ChannelFlag, 3>(
this->name = nname;
+ size_t old = ChannelList.size();
ChannelList[this->name] = this;
+ if (old == ChannelList.size())
+ Log(LOG_DEBUG) << "Duplicate channel " << this->name << " in table?";
this->creation_time = ts;
this->server_modetime = this->chanserv_modetime = 0;
diff --git a/src/nickalias.cpp b/src/nickalias.cpp
index 801a79d05..0268b98be 100644
--- a/src/nickalias.cpp
+++ b/src/nickalias.cpp
@@ -41,7 +41,10 @@ NickAlias::NickAlias(const Anope::string &nickname, NickCore* nickcore) : Serial
this->nc = nickcore;
nickcore->aliases.push_back(this);
+ size_t old = NickAliasList->size();
(*NickAliasList)[this->nick] = this;
+ if (old == NickAliasList->size())
+ Log(LOG_DEBUG) << "Duplicate nick " << nickname << " in nickalias table";
if (this->nc->o == NULL)
{
diff --git a/src/nickcore.cpp b/src/nickcore.cpp
index 71d117de1..0e637d0cf 100644
--- a/src/nickcore.cpp
+++ b/src/nickcore.cpp
@@ -37,7 +37,10 @@ NickCore::NickCore(const Anope::string &coredisplay) : Serializable("NickCore"),
if (Config->NSDefFlags.HasFlag(static_cast<NickCoreFlag>(t)))
this->SetFlag(static_cast<NickCoreFlag>(t));
+ size_t old = NickCoreList->size();
(*NickCoreList)[this->display] = this;
+ if (old == NickCoreList->size())
+ Log(LOG_DEBUG) << "Duplicate account " << coredisplay << " in nickcore table?";
}
/** Default destructor
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index f402b5820..a559d3127 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -266,7 +266,10 @@ ChannelInfo::ChannelInfo(const Anope::string &chname) : Serializable("ChannelInf
for (int i = 0; i < TTB_SIZE; ++i)
this->ttb[i] = 0;
+ size_t old = RegisteredChannelList->size();
(*RegisteredChannelList)[this->name] = this;
+ if (old == RegisteredChannelList->size())
+ Log(LOG_DEBUG) << "Duplicate channel " << this->name << " in registered channel table?";
FOREACH_MOD(I_OnCreateChan, OnCreateChan(this));
}