]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Merge pull request #1002 from SaberUK/insp20+fix-cgiirc-crash
authorAttila Molnar <attilamolnar@hush.com>
Tue, 24 Feb 2015 21:30:45 +0000 (22:30 +0100)
committerAttila Molnar <attilamolnar@hush.com>
Tue, 24 Feb 2015 21:30:45 +0000 (22:30 +0100)
[2.0] Fix a minor crash when a user has no class after OnCheckReady.

src/userprocess.cpp

index 0ef95e413678d9d000d3d80c30b174d5c1432f50..69c31f8400898caacd9d2b1f01090aa1ac4f9f82 100644 (file)
@@ -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->signon + curr->MyClass->GetRegTimeout())))
+               if (curr->registered != REG_ALL && curr->MyClass && (Time() > (curr->signon + curr->MyClass->GetRegTimeout())))
                {
                        /*
                         * registration timeout -- didnt send USER/NICK/HOST