summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-04-21 15:30:51 +0200
committerattilamolnar <attilamolnar@hush.com>2013-04-21 15:30:51 +0200
commit1250abdc0915975f0a99cdcea1a4f6cb006b0a74 (patch)
treed765b9405b0f70548b4bbacdea27374da8dd8cf0 /src
parent92da062c028f4a6546a938631e7574e324040274 (diff)
Don't crop the channel name if it's too long in Channel::Channel()
...and especially don't use the shortened name in one place and the original in another Having different <limits:maxchan> values on the same network is not supported
Diffstat (limited to 'src')
-rw-r--r--src/channels.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/channels.cpp b/src/channels.cpp
index 229e2b8ea..3502abe12 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -31,12 +31,10 @@
Channel::Channel(const std::string &cname, time_t ts)
{
- chan_hash::iterator findchan = ServerInstance->chanlist->find(cname);
- if (findchan != ServerInstance->chanlist->end())
+ if (!ServerInstance->chanlist->insert(std::make_pair(cname, this)).second)
throw CoreException("Cannot create duplicate channel " + cname);
- (*(ServerInstance->chanlist))[cname.c_str()] = this;
- this->name.assign(cname, 0, ServerInstance->Config->Limits.ChanMax);
+ this->name = cname;
this->age = ts ? ts : ServerInstance->Time();
maxbans = topicset = 0;