summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tabs
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/tabs')
-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)