diff options
author | neauoire <[email protected]> | 2020-01-07 18:55:16 -0500 |
---|---|---|
committer | neauoire <[email protected]> | 2020-01-07 18:55:16 -0500 |
commit | 765e82e632fc9a1d948a877002bbd87c34729795 (patch) | |
tree | 873f19054dcf8aefb492f31f6cd66f5f43f2e8bb /desktop/sources/scripts | |
parent | cdc41e38b0b9e1e40e2cdc8bb9a34a5e3d8c5e70 (diff) | |
download | Orca-765e82e632fc9a1d948a877002bbd87c34729795.tar.gz Orca-765e82e632fc9a1d948a877002bbd87c34729795.zip |
Improved parsing of commands
Diffstat (limited to 'desktop/sources/scripts')
-rw-r--r-- | desktop/sources/scripts/client.js | 2 | ||||
-rw-r--r-- | desktop/sources/scripts/commander.js | 2 |
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 } |