aboutsummaryrefslogtreecommitdiffhomepage
path: root/desktop
diff options
context:
space:
mode:
authorneauoire <[email protected]>2020-01-07 18:55:16 -0500
committerneauoire <[email protected]>2020-01-07 18:55:16 -0500
commit765e82e632fc9a1d948a877002bbd87c34729795 (patch)
tree873f19054dcf8aefb492f31f6cd66f5f43f2e8bb /desktop
parentcdc41e38b0b9e1e40e2cdc8bb9a34a5e3d8c5e70 (diff)
downloadOrca-765e82e632fc9a1d948a877002bbd87c34729795.tar.gz
Orca-765e82e632fc9a1d948a877002bbd87c34729795.zip
Improved parsing of commands
Diffstat (limited to 'desktop')
-rw-r--r--desktop/sources/scripts/client.js2
-rw-r--r--desktop/sources/scripts/commander.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/desktop/sources/scripts/client.js b/desktop/sources/scripts/client.js
index b98bfe0..e667915 100644
--- a/desktop/sources/scripts/client.js
+++ b/desktop/sources/scripts/client.js
@@ -12,7 +12,7 @@
/* global Theme */
function Client () {
- this.version = 166
+ this.version = 167
this.library = library
this.theme = new Theme(this)
diff --git a/desktop/sources/scripts/commander.js b/desktop/sources/scripts/commander.js
index a6fe83c..f1ec2fa 100644
--- a/desktop/sources/scripts/commander.js
+++ b/desktop/sources/scripts/commander.js
@@ -127,7 +127,7 @@ function Commander (client) {
}
this.trigger = function (msg = this.query, origin = null) {
- const cmd = `${msg}`.split(':')[0].toLowerCase()
+ const cmd = `${msg}`.split(':')[0].trim().replace(/\W/g, '').toLowerCase()
const val = `${msg}`.substr(cmd.length + 1)
const fn = this.actives[cmd]
if (!fn) { console.warn('Commander', `Unknown message: ${msg}`); this.stop(); return }