QTfrontend/net/newnetclient.cpp
changeset 9702 27006953d901
parent 9549 ac5c1f691ce2
child 9730 20dca3377887
--- a/QTfrontend/net/newnetclient.cpp	Fri Nov 15 14:41:36 2013 -0500
+++ b/QTfrontend/net/newnetclient.cpp	Mon Nov 18 00:44:30 2013 +0400
@@ -311,14 +311,12 @@
 
     if (lst[0] == "ROOMS")
     {
-        if(lst.size() % 8 != 1)
+        if(lst.size() % 9 != 1)
         {
             qWarning("Net: Malformed ROOMS message");
             return;
         }
-        QStringList tmp = lst;
-        tmp.removeFirst();
-        m_roomsListModel->setRoomsList(tmp);
+        m_roomsListModel->setRoomsList(lst.mid(1));
         if (m_private_game == false && m_nick_registered == false)
         {
             emit NickNotRegistered(mynick);
@@ -406,7 +404,7 @@
         return;
     }
 
-    if (lst[0] == "CLIENT_FLAGS")
+    if (lst[0] == "CLIENT_FLAGS" || lst[0] == "CF")
     {
         if(lst.size() < 3 || lst[1].size() < 2)
         {
@@ -527,7 +525,7 @@
         return;
     }
 
-    if(lst[0] == "ROOM" && lst.size() == 10 && lst[1] == "ADD")
+    if(lst[0] == "ROOM" && lst.size() == 11 && lst[1] == "ADD")
     {
         QStringList tmp = lst;
         tmp.removeFirst();
@@ -537,7 +535,7 @@
         return;
     }
 
-    if(lst[0] == "ROOM" && lst.size() == 11 && lst[1] == "UPD")
+    if(lst[0] == "ROOM" && lst.size() == 12 && lst[1] == "UPD")
     {
         QStringList tmp = lst;
         tmp.removeFirst();
@@ -627,12 +625,6 @@
         return;
     }
 
-    if (lst[0] == "ADMIN_ACCESS")
-    {
-        // obsolete, see +a client flag
-        return;
-    }
-
     if(lst[0] == "JOINING")
     {
         if(lst.size() < 2)
@@ -818,17 +810,6 @@
             m_playersModel->playerLeftRoom(lst[1]);
             return;
         }
-
-        // obsolete
-        if (lst[0] == "ROOM_CONTROL_ACCESS")
-        {
-            if (lst.size() < 2)
-            {
-                qWarning("Net: Bad ROOM_CONTROL_ACCESS message");
-                return;
-            }
-            return;
-        }
     }
 
     qWarning() << "Net: Unknown message or wrong state:" << lst;