From 3a9727d43325a577a29d13fe259df1de68234e6b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 31 May 2016 20:09:14 +0300 Subject: Fix /msg chat command for channels. --- src/actions/chat.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/actions') 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); } } -- cgit v1.2.3-70-g09d2