]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/channels.cpp
Use the preprocessor to detect whether hash_map is available.
[user/henk/code/inspircd.git] / src / channels.cpp
index 855fd0e150e0297d2658b9e5bd0f353b080e8b7f..672d46ea90696e3a63702219e992911a8113462f 100644 (file)
@@ -449,7 +449,7 @@ bool Channel::CheckBan(User* user, const std::string& mask)
                return (result == MOD_RES_DENY);
 
        // extbans were handled above, if this is one it obviously didn't match
-       if (mask[1] == ':')
+       if ((mask.length() <= 2) || (mask[1] == ':'))
                return false;
 
        std::string::size_type at = mask.find('@');
@@ -718,7 +718,7 @@ int Channel::CountInvisible()
        int count = 0;
        for (UserMembIter i = userlist.begin(); i != userlist.end(); i++)
        {
-               if (!(i->first->IsModeSet('i')))
+               if (!i->first->quitting && !i->first->IsModeSet('i'))
                        count++;
        }
 
@@ -793,6 +793,8 @@ void Channel::UserList(User *user)
 
        for (UserMembIter i = userlist.begin(); i != userlist.end(); i++)
        {
+               if (i->first->quitting)
+                       continue;
                if ((!has_user) && (i->first->IsModeSet('i')))
                {
                        /*