From 50af5c225d193b689d08a64d2c3ae155b57417b4 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 15 Jul 2013 12:15:51 +0100 Subject: util.events: Remove varargs, event handlers can now only accept a single parameter --- util/events.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util/events.lua') 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 -- cgit v1.2.3 From 4b618a8727365b880e115c6fd53869040c2ad238 Mon Sep 17 00:00:00 2001 From: Florian Zeitz Date: Fri, 9 Aug 2013 17:48:21 +0200 Subject: Remove all trailing whitespace --- util/events.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/events.lua') diff --git a/util/events.lua b/util/events.lua index 4ace026f..40ca3913 100644 --- a/util/events.lua +++ b/util/events.lua @@ -1,7 +1,7 @@ -- Prosody IM -- Copyright (C) 2008-2010 Matthew Wild -- Copyright (C) 2008-2010 Waqas Hussain --- +-- -- This project is MIT/X11 licensed. Please see the -- COPYING file in the source package for more information. -- -- cgit v1.2.3