--- a/QTfrontend/newnetclient.cpp Fri Jan 02 17:33:56 2009 +0000
+++ b/QTfrontend/newnetclient.cpp Fri Jan 02 19:44:52 2009 +0000
@@ -189,7 +189,7 @@
void HWNewNet::ParseCmd(const QStringList & lst)
{
-// qDebug() << "Server: " << lst;
+ qDebug() << "Server: " << lst;
if(!lst.size())
{
@@ -334,6 +334,21 @@
return;
}
+ if(lst[0]=="LOBBY:JOINED") {
+ if(lst.size() < 2)
+ {
+ qWarning("Net: Bad JOINED message");
+ return;
+ }
+
+ for(int i = 1; i < lst.size(); ++i)
+ {
+ emit nickAddedLobby(lst[i]);
+ //emit chatStringFromNet(QString(tr("*** %1 joined")).arg(lst[i]));
+ }
+ return;
+ }
+
if(lst[0] == "LEFT") {
if(lst.size() < 2)
{
@@ -348,6 +363,20 @@
return;
}
+ if(lst[0] == "LOBBY:LEFT") {
+ if(lst.size() < 2)
+ {
+ qWarning("Net: Bad LEFT message");
+ return;
+ }
+ emit nickRemovedLobby(lst[1]);
+ /*if (lst.size() < 3)
+ emit chatStringFromNet(QString(tr("*** %1 left")).arg(lst[1]));
+ else
+ emit chatStringFromNet(QString(tr("*** %1 left (%2)")).arg(lst[1], lst[2]));*/
+ return;
+ }
+
if (lst[0] == "RUN_GAME") {
netClientState = 5;
RunGame();