QTfrontend/net/newnetclient.cpp
changeset 7732 fad3408fdcc1
parent 7731 262228c64f15
child 7736 1cf84a84ef43
--- a/QTfrontend/net/newnetclient.cpp	Mon Oct 08 23:57:17 2012 +0400
+++ b/QTfrontend/net/newnetclient.cpp	Tue Oct 09 00:38:17 2012 +0400
@@ -243,6 +243,7 @@
     if (lst[0] == "NICK")
     {
         mynick = lst[1];
+        m_playersModel->setNickname(mynick);
         return ;
     }
 
@@ -446,6 +447,8 @@
         netClientState = InLobby;
         askRoomsList();
         emit LeftRoom(tr("You got kicked"));
+        m_playersModel->resetRoomFlags();
+
         return;
     }
 
@@ -462,6 +465,7 @@
             if (lst[i] == mynick)
             {
                 netClientState = InLobby;
+                m_playersModel->resetRoomFlags();
                 RawSendNet(QString("LIST"));
                 emit connected();
             }
@@ -644,6 +648,7 @@
         {
             netClientState = InLobby;
             askRoomsList();
+            m_playersModel->resetRoomFlags();
             emit LeftRoom(tr("Room destroyed"));
             return;
         }
@@ -906,6 +911,7 @@
 void HWNewNet::partRoom()
 {
     netClientState = InLobby;
+    m_playersModel->resetRoomFlags();
     RawSendNet(QString("PART"));
     askRoomsList();
 }