summaryrefslogtreecommitdiff
path: root/src/actions/chat.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-05-31 20:09:14 +0300
committerAndrei Karas <akaras@inbox.ru>2016-05-31 20:09:14 +0300
commit3a9727d43325a577a29d13fe259df1de68234e6b (patch)
tree7c895890f975a8a21ccc44b2dbf33be7c4c42dcd /src/actions/chat.cpp
parentf2b82168d435429fc4f23e0d93b336eca108d21f (diff)
downloadmv-3a9727d43325a577a29d13fe259df1de68234e6b.tar.gz
mv-3a9727d43325a577a29d13fe259df1de68234e6b.tar.bz2
mv-3a9727d43325a577a29d13fe259df1de68234e6b.tar.xz
mv-3a9727d43325a577a29d13fe259df1de68234e6b.zip
Fix /msg chat command for channels.
Diffstat (limited to 'src/actions/chat.cpp')
-rw-r--r--src/actions/chat.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp
index 5260d4153..add653cb0 100644
--- a/src/actions/chat.cpp
+++ b/src/actions/chat.cpp
@@ -250,14 +250,20 @@ impHandler(msg)
{
if (!chatWindow)
return false;
- chatWindow->addWhisper(recvnick, message, ChatMsgType::BY_PLAYER);
+ ChatTab *const tab = chatWindow->addChatTab(recvnick, false, true);
+ if (tab)
+ {
+ chatWindow->saveState();
+ tab->chatInput(message);
+ }
}
else
{
if (event.tab)
{
- // TRANSLATORS: whisper send
- event.tab->chatLog(_("Cannot send empty whispers!"),
+ event.tab->chatLog(
+ // TRANSLATORS: whisper send
+ _("Cannot send empty whisper or channel message!"),
ChatMsgType::BY_SERVER);
}
}