--- a/QTfrontend/newnetclient.cpp Thu Dec 04 21:14:03 2008 +0000
+++ b/QTfrontend/newnetclient.cpp Thu Dec 04 21:15:01 2008 +0000
@@ -45,6 +45,13 @@
SLOT(displayError(QAbstractSocket::SocketError)));
}
+HWNewNet::~HWNewNet()
+{
+ if (m_game_connected)
+ RawSendNet(QString("QUIT%1%2").arg(delimeter).arg("User quit"));
+ NetSocket.flush();
+}
+
void HWNewNet::Connect(const QString & hostName, quint16 port, const QString & nick)
{
mynick = nick;
@@ -54,7 +61,7 @@
void HWNewNet::Disconnect()
{
if (m_game_connected)
- RawSendNet(QString("QUIT"));
+ RawSendNet(QString("QUIT%1%2").arg(delimeter).arg("User quit"));
m_game_connected = false;
NetSocket.disconnectFromHost();
}
--- a/QTfrontend/newnetclient.h Thu Dec 04 21:14:03 2008 +0000
+++ b/QTfrontend/newnetclient.h Thu Dec 04 21:15:01 2008 +0000
@@ -39,6 +39,7 @@
public:
HWNewNet(GameUIConfig * config, GameCFGWidget* pGameCFGWidget, TeamSelWidget* pTeamSelWidget);
+ ~HWNewNet();
void Connect(const QString & hostName, quint16 port, const QString & nick);
void Disconnect();
bool isRoomChief();