summaryrefslogtreecommitdiff
path: root/src/gui/chat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r--src/gui/chat.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 8923b40f4..a72d562c2 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -904,7 +904,28 @@ void ChatWindow::whisper(const std::string &nick,
}
else
{
- tab->chatLog(nick, mes);
+ if (tab->getRemoveNames())
+ {
+ std::string msg = mes;
+ std::string nick2;
+ int idx = mes.find(":");
+ if (idx > 0)
+ {
+ nick2 = msg.substr(0, idx);
+ msg = msg.substr(idx + 1);
+ trim(nick2);
+ trim(msg);
+ tab->chatLog(nick2, msg);
+ }
+ else
+ {
+ tab->chatLog(nick, mes);
+ }
+ }
+ else
+ {
+ tab->chatLog(nick, mes);
+ }
player_node->afkRespond(tab, nick);
}
}