Software /
code /
prosody
Changeset
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 |
parents | 5748:cef2a1122b43 |
children | 5751:3dd3bb40df56 |
files | util/events.lua |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
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