summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-29 22:45:05 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-29 22:45:05 +0300
commit24179041d619875bda96eb94307b1f3dd64e6add (patch)
treec1abcdc54b6e505f70aa1cf9a772560a8ebddfca
parent52f82ad4439dab8e6ab67ad6aa25fb8d0c8c1683 (diff)
downloadmanaverse-24179041d619875bda96eb94307b1f3dd64e6add.tar.gz
manaverse-24179041d619875bda96eb94307b1f3dd64e6add.tar.bz2
manaverse-24179041d619875bda96eb94307b1f3dd64e6add.tar.xz
manaverse-24179041d619875bda96eb94307b1f3dd64e6add.zip
fix char replacment in whispers for sender.
Before whisper sender not saw replaced text in chat.
-rw-r--r--src/gui/widgets/tabs/whispertab.cpp15
1 files changed, 6 insertions, 9 deletions
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)