From 667d9691237f36975e2cd6a15949dc43b15522c9 Mon Sep 17 00:00:00 2001 From: Nick Gasson Date: Tue, 8 Jun 2010 21:46:26 +0100 Subject: [PATCH] Add Lua startup script --- scripts/init.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 scripts/init.lua diff --git a/scripts/init.lua b/scripts/init.lua new file mode 100644 index 0000000..4fef375 --- /dev/null +++ b/scripts/init.lua @@ -0,0 +1,16 @@ +-------------------------------------------------------------------------------- +-- Event hooks + +_hooks = {} + +function _default_hook() + debug("_default_hook") +end + +function hook(tag, callback) + if _hooks[tag] == nil then + error("invalid hook: " .. tag) + else + _hooks[tag] = callback + end +end -- 2.39.2