summaryrefslogtreecommitdiff
path: root/src/actions
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
parentf2b82168d435429fc4f23e0d93b336eca108d21f (diff)
downloadplus-3a9727d43325a577a29d13fe259df1de68234e6b.tar.gz
plus-3a9727d43325a577a29d13fe259df1de68234e6b.tar.bz2
plus-3a9727d43325a577a29d13fe259df1de68234e6b.tar.xz
plus-3a9727d43325a577a29d13fe259df1de68234e6b.zip
Fix /msg chat command for channels.
Diffstat (limited to 'src/actions')
-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);
}
}