QTfrontend/newnetclient.cpp
changeset 2340 3b35fd5f67c7
parent 2335 0a61a3c2efc4
child 2344 63b3da03ce46
equal deleted inserted replaced
2339:f1bbcca1ae07 2340:3b35fd5f67c7
   546 	if (lst[0] == "ADMIN_ACCESS") {
   546 	if (lst[0] == "ADMIN_ACCESS") {
   547 		emit adminAccess(true);
   547 		emit adminAccess(true);
   548 		return;
   548 		return;
   549 	}
   549 	}
   550 
   550 
       
   551 	if (lst[0] == "ROOM_CONTROL_ACCESS") {
       
   552 		if (lst.size() < 2)
       
   553 		{
       
   554 			qWarning("Net: Bad BYE message");
       
   555 			return;
       
   556 		}
       
   557 		bool b = lst[1] == "0";
       
   558 		m_pGameCFGWidget->setEnabled(b);
       
   559 		m_pTeamSelWidget->setInteractivity(b);
       
   560 		isChief = b;
       
   561 	}
       
   562 
   551 	qWarning() << "Net: Unknown message:" << lst;
   563 	qWarning() << "Net: Unknown message:" << lst;
   552 }
   564 }
   553 
   565 
   554 void HWNewNet::RunGame()
   566 void HWNewNet::RunGame()
   555 {
   567 {
   616 	return isChief;
   628 	return isChief;
   617 }
   629 }
   618 
   630 
   619 void HWNewNet::gameFinished()
   631 void HWNewNet::gameFinished()
   620 {
   632 {
   621 	netClientState = 3;
   633 	if (netClientState == 5) netClientState = 3;
   622 	RawSendNet(QString("ROUNDFINISHED"));
   634 	RawSendNet(QString("ROUNDFINISHED"));
   623 }
   635 }
   624 
   636 
   625 QString HWNewNet::formatChatMsg(const QString & nick, const QString & msg)
   637 QString HWNewNet::formatChatMsg(const QString & nick, const QString & msg)
   626 {
   638 {