Implement isInRoom in client
authorunc0rr
Wed, 14 Jan 2009 16:49:44 +0000
changeset 1671 bb12cb688f75
parent 1670 a2035c5d6089
child 1672 6a451649558c
Implement isInRoom in client
QTfrontend/hwform.cpp
QTfrontend/newnetclient.cpp
QTfrontend/newnetclient.h
--- a/QTfrontend/hwform.cpp	Wed Jan 14 16:41:29 2009 +0000
+++ b/QTfrontend/hwform.cpp	Wed Jan 14 16:49:44 2009 +0000
@@ -303,9 +303,6 @@
 	{
 		ui.pageGameStats->renderStats();
 	}
-
-	if ((lastid == ID_PAGE_GAMESTATS) && (id == ID_PAGE_NETGAME) && !hwnet)
-		GoBack();
 }
 
 void HWForm::GoToPage(quint8 id)
--- a/QTfrontend/newnetclient.cpp	Wed Jan 14 16:41:29 2009 +0000
+++ b/QTfrontend/newnetclient.cpp	Wed Jan 14 16:49:44 2009 +0000
@@ -705,3 +705,8 @@
 	netClientState = 2;
 	RawSendNet(QString("PART"));
 }
+
+bool HWNewNet::isInRoom()
+{
+	return netClientState > 2;
+}
--- a/QTfrontend/newnetclient.h	Wed Jan 14 16:41:29 2009 +0000
+++ b/QTfrontend/newnetclient.h	Wed Jan 14 16:49:44 2009 +0000
@@ -43,6 +43,7 @@
   void Connect(const QString & hostName, quint16 port, const QString & nick);
   void Disconnect();
   bool isRoomChief();
+  bool isInRoom();
 
  private:
   GameUIConfig* config;