]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/channels.cpp
core_dns Add typedef for request id, change it to uint16_t
[user/henk/code/inspircd.git] / src / channels.cpp
index 02a6ae30b2f609db5e09ac1780f41f02aacdd973..e06e4c6fcd3b085107ecad75aab6f9142f313eaf 100644 (file)
@@ -88,7 +88,7 @@ void Channel::CheckDestroy()
 
        // If the channel isn't in chanlist then it is already in the cull list, don't add it again
        chan_hash::iterator iter = ServerInstance->chanlist.find(this->name);
-       if (iter == ServerInstance->chanlist.end())
+       if ((iter == ServerInstance->chanlist.end()) || (iter->second != this))
                return;
 
        FOREACH_MOD(OnChannelDelete, (this));
@@ -598,7 +598,7 @@ void Channel::UserList(User* user, bool has_user)
        list.append(this->name).append(" :");
        std::string::size_type pos = list.size();
 
-       const size_t maxlen = ServerInstance->Config->Limits.MaxLine - 10 - ServerInstance->Config->ServerName.size();
+       const size_t maxlen = ServerInstance->Config->Limits.MaxLine - 10 - ServerInstance->Config->ServerName.size() - user->nick.size();
        std::string prefixlist;
        std::string nick;
        for (MemberMap::iterator i = userlist.begin(); i != userlist.end(); ++i)