QTfrontend/newnetclient.cpp
changeset 5861 b102aa6a853e
parent 5390 f41e87de8989
child 5959 2e5182c5617a
--- a/QTfrontend/newnetclient.cpp	Sun Sep 11 18:37:34 2011 +0200
+++ b/QTfrontend/newnetclient.cpp	Sun Sep 11 18:57:54 2011 +0200
@@ -496,17 +496,6 @@
         emit AskForRunGame();
         return;
     }
-    
-    if (lst[0] == "BYE") {
-        if (lst[1] == "Authentication failed")
-        {
-            // Set the password blank if case the user tries to join and enter his password again
-            config->setValue("net/passwordlength", 0);
-            config->setNetPasswordLength(0);
-        }
-        // return early so the user won't get an unknown error message dialog (the user already gets a server connection is lost one)
-        return;
-    }
 
     if (lst[0] == "ASKPASSWORD") {
         bool ok = false;
@@ -625,6 +614,12 @@
             qWarning("Net: Bad BYE message");
             return;
         }
+        if (lst[1] == "Authentication failed")
+        {
+            // Set the password blank if case the user tries to join and enter his password again
+            config->setValue("net/passwordlength", 0);
+            config->setNetPasswordLength(0);
+        }
         emit showMessage(HWNewNet::tr("Quit reason: ") + lst[1]);
         return;
     }