projects
/
KiwiIRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a32b3a3
)
Convert any non-commands sent into non channel/query panels into a command
author
Darren
<darren@darrenwhitlen.com>
Mon, 14 Jul 2014 20:38:56 +0000
(21:38 +0100)
committer
Darren
<darren@darrenwhitlen.com>
Mon, 14 Jul 2014 20:38:56 +0000
(21:38 +0100)
client/src/views/controlbox.js
patch
|
blob
|
blame
|
history
diff --git
a/client/src/views/controlbox.js
b/client/src/views/controlbox.js
index dbe30ac3e30c28000f113c264a75729b75b8f91f..6a71bde4f125d9f6ca4a10738d8a465cf2dd74fb 100644
(file)
--- 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. //)