QTfrontend/net/newnetclient.cpp
changeset 7535 87e5838103ff
parent 7526 ff3a05e29ddd
child 7545 063601290761
equal deleted inserted replaced
7532:d8bdd4ec1c34 7535:87e5838103ff
   505     {
   505     {
   506         emit adminAccess(true);
   506         emit adminAccess(true);
   507         return;
   507         return;
   508     }
   508     }
   509 
   509 
       
   510     if(netClientState == InLobby && lst[0] == "JOINED")
       
   511     {
       
   512         if(lst.size() < 2 || lst[1] != mynick)
       
   513         {
       
   514             qWarning("Net: Bad JOINED message");
       
   515             return;
       
   516         }
       
   517 
       
   518         for(int i = 1; i < lst.size(); ++i)
       
   519         {
       
   520             if (lst[i] == mynick)
       
   521             {
       
   522                 netClientState = InRoom;
       
   523                 emit EnteredGame();
       
   524                 emit roomMaster(isChief);
       
   525                 if (isChief)
       
   526                     emit configAsked();
       
   527             }
       
   528 
       
   529             emit nickAdded(lst[i], isChief && (lst[i] != mynick));
       
   530             emit chatStringFromNet(tr("%1 *** %2 has joined the room").arg('\x03').arg(lst[i]));
       
   531         }
       
   532         return;
       
   533     }
   510 
   534 
   511     if(netClientState == InRoom)
   535     if(netClientState == InRoom)
   512     {
   536     {
   513         if (lst[0] == "EM")
   537         if (lst[0] == "EM")
   514         {
   538         {
   626                 return;
   650                 return;
   627             }
   651             }
   628 
   652 
   629             for(int i = 1; i < lst.size(); ++i)
   653             for(int i = 1; i < lst.size(); ++i)
   630             {
   654             {
   631                 if (lst[i] == mynick)
       
   632                 {
       
   633                     netClientState = InRoom;
       
   634                     emit EnteredGame();
       
   635                     emit roomMaster(isChief);
       
   636                     if (isChief)
       
   637                         emit configAsked();
       
   638                 }
       
   639 
       
   640                 emit nickAdded(lst[i], isChief && (lst[i] != mynick));
   655                 emit nickAdded(lst[i], isChief && (lst[i] != mynick));
   641                 emit chatStringFromNet(tr("%1 *** %2 has joined the room").arg('\x03').arg(lst[i]));
   656                 emit chatStringFromNet(tr("%1 *** %2 has joined the room").arg('\x03').arg(lst[i]));
   642             }
   657             }
   643             return;
   658             return;
   644         }
   659         }