From 24179041d619875bda96eb94307b1f3dd64e6add Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 29 Oct 2013 22:45:05 +0300 Subject: fix char replacment in whispers for sender. Before whisper sender not saw replaced text in chat. --- src/gui/widgets/tabs/whispertab.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'src/gui/widgets/tabs') diff --git a/src/gui/widgets/tabs/whispertab.cpp b/src/gui/widgets/tabs/whispertab.cpp index 7ad14ac65..58849b623 100644 --- a/src/gui/widgets/tabs/whispertab.cpp +++ b/src/gui/widgets/tabs/whispertab.cpp @@ -51,20 +51,17 @@ WhisperTab::~WhisperTab() void WhisperTab::handleInput(const std::string &msg) { + std::string newMsg; if (chatWindow) - { - Net::getChatHandler()->privateMessage(mNick, - chatWindow->doReplace(msg)); - } + newMsg = chatWindow->doReplace(msg); else - { - Net::getChatHandler()->privateMessage(mNick, msg); - } + newMsg = msg; + Net::getChatHandler()->privateMessage(mNick, newMsg); if (player_node) - chatLog(player_node->getName(), msg); + chatLog(player_node->getName(), newMsg); else - chatLog("?", msg); + chatLog("?", newMsg); } void WhisperTab::handleCommand(const std::string &msg) -- cgit v1.2.3-70-g09d2