QTfrontend/newnetclient.cpp
changeset 1592 5ee77ee470a6
parent 1591 1db9b654f880
child 1600 305e13c5f327
--- a/QTfrontend/newnetclient.cpp	Tue Jan 06 17:51:39 2009 +0000
+++ b/QTfrontend/newnetclient.cpp	Tue Jan 06 19:47:19 2009 +0000
@@ -140,7 +140,7 @@
 
 void HWNewNet::RawSendNet(const QByteArray & buf)
 {
-	//qDebug() << "Client: " << QString(buf).split("\n");
+	qDebug() << "Client: " << QString(buf).split("\n");
 	NetSocket.write(buf);
 	NetSocket.write("\n\n", 2);
 }
@@ -332,6 +332,12 @@
 		return;
 	}
 
+	if(lst[0]=="ROOMABANDONED") {
+		netClientState = 2;
+		emit LeftRoom();
+		return;
+	}
+
 	if(lst[0]=="JOINED") {
 		if(lst.size() < 2)
 		{
@@ -687,3 +693,9 @@
 {
 	RawSendNet(QString("TOGGLE_RESTRICT_TEAMS"));
 }
+
+void HWNewNet::partRoom()
+{
+	netClientState = 2;
+	RawSendNet(QString("PART"));
+}