diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-05-31 20:09:14 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-05-31 20:09:14 +0300 |
commit | 3a9727d43325a577a29d13fe259df1de68234e6b (patch) | |
tree | 7c895890f975a8a21ccc44b2dbf33be7c4c42dcd | |
parent | f2b82168d435429fc4f23e0d93b336eca108d21f (diff) | |
download | manaverse-3a9727d43325a577a29d13fe259df1de68234e6b.tar.gz manaverse-3a9727d43325a577a29d13fe259df1de68234e6b.tar.bz2 manaverse-3a9727d43325a577a29d13fe259df1de68234e6b.tar.xz manaverse-3a9727d43325a577a29d13fe259df1de68234e6b.zip |
Fix /msg chat command for channels.
-rw-r--r-- | src/actions/chat.cpp | 12 |
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); } } |