fix/hack so that (own) messages sent in frontend are also visible in the game chat
--- a/QTfrontend/hwform.cpp Thu Mar 21 09:27:35 2013 +0100
+++ b/QTfrontend/hwform.cpp Thu Mar 21 10:08:30 2013 +0100
@@ -1259,7 +1259,7 @@
connect(hwnet, SIGNAL(roomMaster(bool)),
ui.pageNetGame->chatWidget, SLOT(adminAccess(bool)), Qt::QueuedConnection);
connect(ui.pageNetGame->chatWidget, SIGNAL(chatLine(const QString&)),
- hwnet, SLOT(chatLineToNet(const QString&)));
+ hwnet, SLOT(chatLineToNetWithEcho(const QString&)));
connect(ui.pageNetGame->BtnGo, SIGNAL(clicked()), hwnet, SLOT(ToggleReady()));
connect(hwnet, SIGNAL(setMyReadyStatus(bool)),
ui.pageNetGame, SLOT(setReadyStatus(bool)), Qt::QueuedConnection);
--- a/QTfrontend/net/newnetclient.cpp Thu Mar 21 09:27:35 2013 +0100
+++ b/QTfrontend/net/newnetclient.cpp Thu Mar 21 10:08:30 2013 +0100
@@ -850,6 +850,15 @@
);
}
+void HWNewNet::chatLineToNetWithEcho(const QString& str)
+{
+ if(str != "")
+ {
+ emit chatStringFromNet(HWProto::formatChatMsg(mynick, str));
+ chatLineToNet(str);
+ }
+}
+
void HWNewNet::chatLineToNet(const QString& str)
{
if(str != "")
--- a/QTfrontend/net/newnetclient.h Thu Mar 21 09:27:35 2013 +0100
+++ b/QTfrontend/net/newnetclient.h Thu Mar 21 10:08:30 2013 +0100
@@ -143,6 +143,7 @@
public slots:
void ToggleReady();
void chatLineToNet(const QString& str);
+ void chatLineToNetWithEcho(const QString&);
void chatLineToLobby(const QString& str);
void SendTeamMessage(const QString& str);
void SendNet(const QByteArray & buf);