QTfrontend/newnetclient.cpp
changeset 2821 67815ee123d7
parent 2777 95a1a69d491c
child 2948 3f21a9dc93d0
--- a/QTfrontend/newnetclient.cpp	Wed Feb 17 17:38:32 2010 +0000
+++ b/QTfrontend/newnetclient.cpp	Wed Feb 17 19:50:22 2010 +0000
@@ -67,6 +67,7 @@
 void HWNewNet::Connect(const QString & hostName, quint16 port, const QString & nick)
 {
 	mynick = nick.isEmpty() ? QLineEdit::tr("unnamed") : nick;
+	myhost = hostName + QString(":%1").arg(port);
 	NetSocket.connectToHost(hostName, port);
 }
 
@@ -87,6 +88,8 @@
 		return;
 	}
 
+	myroom = room;
+
 	RawSendNet(QString("CREATE_ROOM%1%2").arg(delimeter).arg(room));
 	isChief = true;
 }
@@ -99,6 +102,8 @@
 		return;
 	}
 
+	myroom = room;
+
 	RawSendNet(QString("JOIN_ROOM%1%2").arg(delimeter).arg(room));
 	isChief = false;
 }
@@ -621,6 +626,26 @@
 	RawSendNet(QString("LIST"));
 }
 
+int HWNewNet::getClientState()
+{
+	return netClientState;
+}
+
+QString HWNewNet::getNick()
+{
+	return mynick;
+}
+
+QString HWNewNet::getRoom()
+{
+	return myroom;
+}
+
+QString HWNewNet::getHost()
+{
+	return myhost;
+}
+
 bool HWNewNet::isRoomChief()
 {
 	return isChief;