QTfrontend/newnetclient.cpp
changeset 1591 1db9b654f880
parent 1587 b8a3d449bed7
child 1592 5ee77ee470a6
equal deleted inserted replaced
1590:646d56eacb8f 1591:1db9b654f880
   188 		}
   188 		}
   189 }
   189 }
   190 
   190 
   191 void HWNewNet::ParseCmd(const QStringList & lst)
   191 void HWNewNet::ParseCmd(const QStringList & lst)
   192 {
   192 {
   193 //	qDebug() << "Server: " << lst;
   193 	qDebug() << "Server: " << lst;
   194 
   194 
   195 	if(!lst.size())
   195 	if(!lst.size())
   196 	{
   196 	{
   197 		qWarning("Net client: Bad message");
   197 		qWarning("Net client: Bad message");
   198 		return;
   198 		return;
   291 			return;
   291 			return;
   292 		}
   292 		}
   293 		emit setReadyStatus(lst[1], true);
   293 		emit setReadyStatus(lst[1], true);
   294 		return;
   294 		return;
   295 	}
   295 	}
       
   296 	
   296 	if (lst[0] == "NOT_READY") {
   297 	if (lst[0] == "NOT_READY") {
   297 		if(lst.size() != 2)
   298 		if(lst.size() != 2)
   298 		{
   299 		{
   299 			qWarning("Net: Malformed NOT_READY message");
   300 			qWarning("Net: Malformed NOT_READY message");
   300 			return;
   301 			return;
   377 		emit nickRemoved(lst[1]);
   378 		emit nickRemoved(lst[1]);
   378 		if (lst.size() < 3)
   379 		if (lst.size() < 3)
   379 			emit chatStringFromNet(QString(tr("*** %1 left")).arg(lst[1]));
   380 			emit chatStringFromNet(QString(tr("*** %1 left")).arg(lst[1]));
   380 		else
   381 		else
   381 			emit chatStringFromNet(QString(tr("*** %1 left (%2)")).arg(lst[1], lst[2]));
   382 			emit chatStringFromNet(QString(tr("*** %1 left (%2)")).arg(lst[1], lst[2]));
       
   383 		return;
       
   384 	}
       
   385 
       
   386 	if(lst[0] == "ROOM") {
       
   387 		if(lst.size() < 2)
       
   388 		{
       
   389 			qWarning("Net: Bad ROOM message");
       
   390 			return;
       
   391 		}
       
   392 		RawSendNet(QString("LIST"));
   382 		return;
   393 		return;
   383 	}
   394 	}
   384 
   395 
   385 	if(lst[0] == "LOBBY:LEFT") {
   396 	if(lst[0] == "LOBBY:LEFT") {
   386 		if(lst.size() < 2)
   397 		if(lst.size() < 2)