summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/regchannel.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/regchannel.cpp b/src/regchannel.cpp
index fc8395f75..f45803e06 100644
--- a/src/regchannel.cpp
+++ b/src/regchannel.cpp
@@ -119,9 +119,7 @@ ChannelInfo::ChannelInfo(const Anope::string &chname)
if (this->c)
this->c->ci = this;
- size_t old = RegisteredChannelList->size();
- (*RegisteredChannelList)[this->name] = this;
- if (old == RegisteredChannelList->size())
+ if (!RegisteredChannelList->insert_or_assign(this->name, this).second)
Log(LOG_DEBUG) << "Duplicate channel " << this->name << " in registered channel table?";
FOREACH_MOD(OnCreateChan, (this));