# HG changeset patch
# User sheepluva
# Date 1363854455 -3600
# Node ID 388d2bf73ff9cdb5964f0f3339fdc2be25ee69ee
# Parent 1a4b9b9fe2b0036b510e87655ba55ab1af675ec8
fix player info
diff -r 1a4b9b9fe2b0 -r 388d2bf73ff9 QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp Wed Mar 20 23:18:46 2013 +0100
+++ b/QTfrontend/hwform.cpp Thu Mar 21 09:27:35 2013 +0100
@@ -1286,6 +1286,12 @@
connect(ui.pageRoomsList->chatWidget, SIGNAL(consoleCommand(const QString&)),
hwnet, SLOT(consoleCommand(const QString&)));
+// player info
+ connect(hwnet, SIGNAL(playerInfo(const QString&, const QString&, const QString&, const QString&)),
+ ui.pageRoomsList->chatWidget, SLOT(onPlayerInfo(const QString&, const QString&, const QString&, const QString&)), Qt::QueuedConnection);
+ connect(hwnet, SIGNAL(playerInfo(const QString&, const QString&, const QString&, const QString&)),
+ ui.pageNetGame->chatWidget, SLOT(onPlayerInfo(const QString&, const QString&, const QString&, const QString&)), Qt::QueuedConnection);
+
// chatting
connect(ui.pageRoomsList->chatWidget, SIGNAL(chatLine(const QString&)),
hwnet, SLOT(chatLineToLobby(const QString&)));
diff -r 1a4b9b9fe2b0 -r 388d2bf73ff9 QTfrontend/net/newnetclient.cpp
--- a/QTfrontend/net/newnetclient.cpp Wed Mar 20 23:18:46 2013 +0100
+++ b/QTfrontend/net/newnetclient.cpp Thu Mar 21 09:27:35 2013 +0100
@@ -369,7 +369,7 @@
{
QStringList tmp = lst;
tmp.removeFirst();
- emit chatStringFromNet(tmp.join("\n").prepend('\x01'));
+ emit chatStringFromNet(tmp.join(" ").prepend('\x01'));
}
return;
}
diff -r 1a4b9b9fe2b0 -r 388d2bf73ff9 QTfrontend/net/newnetclient.h
--- a/QTfrontend/net/newnetclient.h Wed Mar 20 23:18:46 2013 +0100
+++ b/QTfrontend/net/newnetclient.h Thu Mar 21 09:27:35 2013 +0100
@@ -119,7 +119,7 @@
void hhnumChanged(const HWTeam&);
void teamColorChanged(const HWTeam&);
void playerInfo(
- const QString & name,
+ const QString & nick,
const QString & ip,
const QString & version,
const QString & roomInfo);
diff -r 1a4b9b9fe2b0 -r 388d2bf73ff9 QTfrontend/ui/widget/chatwidget.cpp
--- a/QTfrontend/ui/widget/chatwidget.cpp Wed Mar 20 23:18:46 2013 +0100
+++ b/QTfrontend/ui/widget/chatwidget.cpp Thu Mar 21 09:27:35 2013 +0100
@@ -580,6 +580,19 @@
}
}
+void HWChatWidget::onPlayerInfo(
+ const QString & nick,
+ const QString & ip,
+ const QString & version,
+ const QString & roomInfo)
+{
+ addLine("msg_PlayerInfo", QString(" >>> %1 - %2 %3 %4")
+ .arg(linkedNick(nick))
+ .arg(ip)
+ .arg(version)
+ .arg(roomInfo));
+}
+
void HWChatWidget::onKick()
{
QModelIndexList mil = chatNicks->selectionModel()->selectedRows();
diff -r 1a4b9b9fe2b0 -r 388d2bf73ff9 QTfrontend/ui/widget/chatwidget.h
--- a/QTfrontend/ui/widget/chatwidget.h Wed Mar 20 23:18:46 2013 +0100
+++ b/QTfrontend/ui/widget/chatwidget.h Thu Mar 21 09:27:35 2013 +0100
@@ -114,6 +114,11 @@
void nickRemoved(const QString& nick, const QString& message);
void clear();
void adminAccess(bool);
+ void onPlayerInfo(
+ const QString & nick,
+ const QString & ip,
+ const QString & version,
+ const QString & roomInfo);
signals:
void chatLine(const QString& str);