]> 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 f1dba53155eaf0c5238f403a303f9ac25897904f..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')))
                {
                        /*
@@ -1013,7 +1015,8 @@ Invitation* Invitation::Find(Channel* c, LocalUser* u, bool check_expired)
                if ((check_expired) && (inv->expiry != 0) && (inv->expiry <= ServerInstance->Time()))
                {
                        /* Expired invite, remove it. */
-                       ServerInstance->Logs->Log("INVITATION", DEBUG, "Invitation::Find ecountered expired entry: %p timed out at %lu", (void*) inv, inv->expiry);
+                       std::string expiration = ServerInstance->TimeString(inv->expiry);
+                       ServerInstance->Logs->Log("INVITATION", DEBUG, "Invitation::Find ecountered expired entry: %p expired %s", (void*) inv, expiration.c_str());
                        i = locallist.erase(i);
                        inv->cull();
                        delete inv;