QTfrontend/newnetclient.cpp
changeset 1577 e3e37c730dc0
parent 1576 a02353129a41
child 1581 2dfa315b4bb2
equal deleted inserted replaced
1576:a02353129a41 1577:e3e37c730dc0
   267 		else
   267 		else
   268 			emit chatStringFromNet(formatChatMsg(lst[1], lst[2]));
   268 			emit chatStringFromNet(formatChatMsg(lst[1], lst[2]));
   269 		return;
   269 		return;
   270 	}
   270 	}
   271 
   271 
       
   272 	if (lst[0] == "INFO") {
       
   273 		if(lst.size() < 2)
       
   274 		{
       
   275 			qWarning("Net: Empty INFO message");
       
   276 			return;
       
   277 		}
       
   278 		QStringList tmp = lst;
       
   279 		tmp.removeFirst();
       
   280 		if (netClientState == 2)
       
   281 			emit chatStringLobby(tmp.join("\n"));
       
   282 		else
       
   283 			emit chatStringFromNet(tmp.join("\n"));
       
   284 		return;
       
   285 	}
       
   286 
   272 	if (lst[0] == "READY") {
   287 	if (lst[0] == "READY") {
   273 		if(lst.size() != 2)
   288 		if(lst.size() != 2)
   274 		{
   289 		{
   275 			qWarning("Net: Malformed READY message");
   290 			qWarning("Net: Malformed READY message");
   276 			return;
   291 			return;
   640 void HWNewNet::kickPlayer(const QString & nick)
   655 void HWNewNet::kickPlayer(const QString & nick)
   641 {
   656 {
   642 	RawSendNet(QString("KICK%1%2").arg(delimeter).arg(nick));
   657 	RawSendNet(QString("KICK%1%2").arg(delimeter).arg(nick));
   643 }
   658 }
   644 
   659 
       
   660 void HWNewNet::infoPlayer(const QString & nick)
       
   661 {
       
   662 	RawSendNet(QString("INFO%1%2").arg(delimeter).arg(nick));
       
   663 }
       
   664 
   645 void HWNewNet::startGame()
   665 void HWNewNet::startGame()
   646 {
   666 {
   647 	RawSendNet(QString("START_GAME"));
   667 	RawSendNet(QString("START_GAME"));
   648 }
   668 }
   649 
   669