QTfrontend/newnetclient.cpp
changeset 1866 36aa0ca6e8af
parent 1860 ce140b2b928a
child 1873 815a3ff1fe4b
equal deleted inserted replaced
1865:ebc6dfca60d4 1866:36aa0ca6e8af
   135 
   135 
   136 void HWNewNet::SendNet(const QByteArray & buf)
   136 void HWNewNet::SendNet(const QByteArray & buf)
   137 {
   137 {
   138   QString msg = QString(buf.toBase64());
   138   QString msg = QString(buf.toBase64());
   139 
   139 
   140   RawSendNet(QString("GAMEMSG%1%2").arg(delimeter).arg(msg));
   140   RawSendNet(QString("EM%1%2").arg(delimeter).arg(msg));
   141 }
   141 }
   142 
   142 
   143 void HWNewNet::RawSendNet(const QString & str)
   143 void HWNewNet::RawSendNet(const QString & str)
   144 {
   144 {
   145   RawSendNet(str.toUtf8());
   145   RawSendNet(str.toUtf8());
   541 		tmptm.teamColor = QColor(lst[2]);
   541 		tmptm.teamColor = QColor(lst[2]);
   542 		emit teamColorChanged(tmptm);
   542 		emit teamColorChanged(tmptm);
   543 		return;
   543 		return;
   544 	}
   544 	}
   545 
   545 
   546 	if (lst[0] == "GAMEMSG") {
   546 	if (lst[0] == "EM") {
   547 		if(lst.size() < 2)
   547 		if(lst.size() < 2)
   548 		{
   548 		{
   549 			qWarning("Net: Bad GAMEMSG message");
   549 			qWarning("Net: Bad EM message");
   550 			return;
   550 			return;
   551 		}
   551 		}
   552 		for(int i = 1; i < lst.size(); ++i)
   552 		for(int i = 1; i < lst.size(); ++i)
   553 		{
   553 		{
   554 			QByteArray em = QByteArray::fromBase64(lst[i].toAscii());
   554 			QByteArray em = QByteArray::fromBase64(lst[i].toAscii());