aboutsummaryrefslogtreecommitdiffstats
path: root/util/events.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-07-15 12:15:51 +0100
committerMatthew Wild <mwild1@gmail.com>2013-07-15 12:15:51 +0100
commit50af5c225d193b689d08a64d2c3ae155b57417b4 (patch)
treef3e3cc026dcbbc0b694fcc88b330a3b17e28f1f2 /util/events.lua
parent2cdcc29777dea1688b964a9ad61dc17e0ccdb059 (diff)
downloadprosody-50af5c225d193b689d08a64d2c3ae155b57417b4.tar.gz
prosody-50af5c225d193b689d08a64d2c3ae155b57417b4.zip
util.events: Remove varargs, event handlers can now only accept a single parameter
Diffstat (limited to 'util/events.lua')
-rw-r--r--util/events.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/events.lua b/util/events.lua
index 412acccd..4ace026f 100644
--- a/util/events.lua
+++ b/util/events.lua
@@ -60,11 +60,11 @@ function new()
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