--- 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&)));
--- 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;
}
--- 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);
--- 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 - <span class=\"ipaddress\">%2</span> <span class=\"version\">%3</span> <span class=\"location\">%4</span>")
+ .arg(linkedNick(nick))
+ .arg(ip)
+ .arg(version)
+ .arg(roomInfo));
+}
+
void HWChatWidget::onKick()
{
QModelIndexList mil = chatNicks->selectionModel()->selectedRows();
--- 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);