diff options
| author | 2013-04-21 15:30:51 +0200 | |
|---|---|---|
| committer | 2013-04-21 15:30:51 +0200 | |
| commit | 1250abdc0915975f0a99cdcea1a4f6cb006b0a74 (patch) | |
| tree | d765b9405b0f70548b4bbacdea27374da8dd8cf0 /src/channels.cpp | |
| parent | Immediately stop processing whenever we detect and handle a RecvQ overrun (diff) | |
| download | inspircd++-1250abdc0915975f0a99cdcea1a4f6cb006b0a74.tar.gz inspircd++-1250abdc0915975f0a99cdcea1a4f6cb006b0a74.tar.bz2 inspircd++-1250abdc0915975f0a99cdcea1a4f6cb006b0a74.zip | |
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/channels.cpp')
| -rw-r--r-- | src/channels.cpp | 6 |
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; |
