QTfrontend/net/newnetclient.cpp
changeset 7684 db140521d102
parent 7683 993337e5021f
child 7710 fd5bcbd698a5
--- a/QTfrontend/net/newnetclient.cpp	Sun Sep 09 20:11:07 2012 +0200
+++ b/QTfrontend/net/newnetclient.cpp	Sun Sep 09 20:58:45 2012 +0200
@@ -366,6 +366,7 @@
 
             switch(c)
             {
+                // flag indicating if a player is ready to start a game
                 case 'r':
                         foreach (const QString & nick, nicks)
                         {
@@ -378,6 +379,26 @@
                         }
                         break;
 
+                // flag indicating if a player is a registered user
+                case 'u':
+                        emit setRegisteredStatus(nicks, setFlag);
+                        break;
+
+                // flag indicating if a player is the host/master of the room
+                case 'h':
+                        foreach (const QString & nick, nicks)
+                        {
+                            if (nick == mynick)
+                            {
+                                isChief = setFlag;
+                                emit roomMaster(isChief);
+                            }
+
+                            emit setRoomMasterStatus(nick, setFlag);
+                        }
+                        break;
+
+                // flag indicating if a player is admin (if so -> worship them!)
                 case 'a':
                         foreach (const QString & nick, nicks)
                         {
@@ -685,6 +706,7 @@
             return;
         }
 
+        // obsolete
         if (lst[0] == "ROOM_CONTROL_ACCESS")
         {
             if (lst.size() < 2)
@@ -692,8 +714,6 @@
                 qWarning("Net: Bad ROOM_CONTROL_ACCESS message");
                 return;
             }
-            isChief = (lst[1] != "0");
-            emit roomMaster(isChief);
             return;
         }
     }