Software /
code /
prosody
Diff
util/events.lua @ 5749:60b3b6d27364
util.events: Remove varargs, event handlers can now only accept a single parameter
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 15 Jul 2013 12:15:51 +0100 |
parent | 3776:bc4f67a0658d |
child | 5776:bd0ff8ae98a8 |
line wrap: on
line diff
--- a/util/events.lua Mon Jul 15 11:44:49 2013 +0100 +++ b/util/events.lua Mon Jul 15 12:15:51 2013 +0100 @@ -60,11 +60,11 @@ remove_handler(event, handler); end end; - local function fire_event(event, ...) - local h = handlers[event]; + local function fire_event(event_name, event_data) + local h = handlers[event_name]; if h then for i=1,#h do - local ret = h[i](...); + local ret = h[i](event_data); if ret ~= nil then return ret; end end end