From 1a652f220d1c74333cd2f54953dbaf41907314b6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 23 Aug 2014 21:59:43 +0300 Subject: Move chat command /query into actions. --- src/actions/chat.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'src/actions/chat.cpp') diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp index 08b3e0014..858b5acbb 100644 --- a/src/actions/chat.cpp +++ b/src/actions/chat.cpp @@ -211,4 +211,25 @@ impHandler(msg) return true; } +impHandler(query) +{ + if (chatWindow) + { + if (chatWindow->addWhisperTab(event.args, true)) + { + chatWindow->saveState(); + return true; + } + } + + if (event.tab) + { + // TRANSLATORS: new whisper query + event.tab->chatLog(strprintf(_("Cannot create a whisper tab for nick " + "\"%s\"! It either already exists, or is you."), + event.args.c_str()), ChatMsgType::BY_SERVER); + } + return true; +} + } // namespace Actions -- cgit v1.2.3-60-g2f50