summaryrefslogtreecommitdiff
path: root/examples/simple_dispatcher.lua
diff options
context:
space:
mode:
Diffstat (limited to 'examples/simple_dispatcher.lua')
-rw-r--r--examples/simple_dispatcher.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/simple_dispatcher.lua b/examples/simple_dispatcher.lua
new file mode 100644
index 0000000..5a931e3
--- /dev/null
+++ b/examples/simple_dispatcher.lua
@@ -0,0 +1,6 @@
+return {
+ ["%w+%s*"] = function(match)
+ local cmd = string.match("(%w+)%s*", match)
+ command_queue:enqueue_command(cmd)
+ end
+} \ No newline at end of file