From 039146eac41d97d323557d1cff36074f2ef40f85 Mon Sep 17 00:00:00 2001 From: Darren Date: Mon, 14 Jul 2014 21:38:56 +0100 Subject: [PATCH] Convert any non-commands sent into non channel/query panels into a command --- client/src/views/controlbox.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/views/controlbox.js b/client/src/views/controlbox.js index dbe30ac..6a71bde 100644 --- a/client/src/views/controlbox.js +++ b/client/src/views/controlbox.js @@ -240,6 +240,12 @@ _kiwi.view.ControlBox = Backbone.View.extend({ var command, params, pre_processed; + // If sending a message when not in a channel or query window, automatically + // convert it into a command + if (command_raw[0] !== '/' && !_kiwi.app.panels().active.isChannel() && !_kiwi.app.panels().active.isQuery()) { + command_raw = '/' + command_raw; + } + // The default command if (command_raw[0] !== '/' || command_raw.substr(0, 2) === '//') { // Remove any slash escaping at the start (ie. //) -- 2.25.1