]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/userprocess.cpp
Merge pull request #1162 from SaberUK/insp20+fix-deinstall
[user/henk/code/inspircd.git] / src / userprocess.cpp
index 72cee8f1e7ee8cab96aba951815406bd6b8a75d9..69c31f8400898caacd9d2b1f01090aa1ac4f9f82 100644 (file)
@@ -56,7 +56,7 @@ void InspIRCd::DoBackgroundUserStuff()
        /*
         * loop over all local users..
         */
-       std::vector<LocalUser*>::reverse_iterator count2 = this->Users->local_users.rbegin();
+       LocalUserList::reverse_iterator count2 = this->Users->local_users.rbegin();
        while (count2 != this->Users->local_users.rend())
        {
                LocalUser *curr = *count2;
@@ -104,10 +104,15 @@ void InspIRCd::DoBackgroundUserStuff()
                                        curr->FullConnect();
                                        continue;
                                }
+
+                               // If the user has been quit in OnCheckReady then we shouldn't
+                               // quit them again for having a registration timeout.
+                               if (curr->quitting)
+                                       continue;
                                break;
                }
 
-               if (curr->registered != REG_ALL && (Time() > (curr->age + curr->MyClass->GetRegTimeout())))
+               if (curr->registered != REG_ALL && curr->MyClass && (Time() > (curr->signon + curr->MyClass->GetRegTimeout())))
                {
                        /*
                         * registration timeout -- didnt send USER/NICK/HOST