diff options
author | Holden Rohrer <hr@hrhr.dev> | 2020-07-16 20:48:14 -0400 |
---|---|---|
committer | Holden Rohrer <hr@hrhr.dev> | 2020-07-16 20:48:14 -0400 |
commit | b62c8fd41cf32ea33de9d4f74415c665d315ecb1 (patch) | |
tree | 8e46f8e2aae34c35807906424dc18da50df30344 /examples/jarvis.js | |
parent | b06268b3ab9da5140bb87fdc1ef7cde27e5ffd47 (diff) |
search.js uses `space` regexes now, improving nword match
Diffstat (limited to 'examples/jarvis.js')
-rw-r--r-- | examples/jarvis.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/examples/jarvis.js b/examples/jarvis.js index 7268ad2..ac27cea 100644 --- a/examples/jarvis.js +++ b/examples/jarvis.js @@ -114,10 +114,8 @@ function protectArea(send, tiles, locs, id, space, ctrl){ main.enqueue(writelist); } -var search = new Space(); -search.adhoc('jarvis'); // The search space is the word jarvis, so whenever that's caught, a relevant function can be called. var read = new Search(); -read.match(search, respond); +read.match(['jarvis'], respond); var expire = {}; main.on('fallback', (send, tiles, locs) => { // tries to detect the prompt ('jarvis') and calls respond if found. |