From c4fa3243b04279d191fe6cf8b7fcc43ee291103e Mon Sep 17 00:00:00 2001 From: doitux Date: Thu, 21 Oct 2010 21:26:21 +0000 Subject: [PATCH] add /me messages to chattools (thx drull) --- src/gui/qt/chattools/chattools.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/qt/chattools/chattools.cpp b/src/gui/qt/chattools/chattools.cpp index 1554fbcf..9afc9c20 100644 --- a/src/gui/qt/chattools/chattools.cpp +++ b/src/gui/qt/chattools/chattools.cpp @@ -126,7 +126,13 @@ void ChatTools::receiveMessage(QString playerName, QString message) { } if(!nickFoundOnIgnoreList) { - myTextBrowser->append(playerName + ": " + tempMsg); + + if(message.indexOf(QString("/me"))==0) { + myTextBrowser->append(tempMsg.replace("/me","*"+playerName+" ")+""); + } + else { + myTextBrowser->append(playerName + ": " + tempMsg); + } } } }