A simple event handler written in Lua