projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge 0.10->trunk
[prosody.git]
/
util
/
events.lua
diff --git
a/util/events.lua
b/util/events.lua
index 412acccd762cb755a9c0627f2689ea82b5989465..40ca39131240c2f9c906021e3fe5a6886361a01d 100644
(file)
--- 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
-- 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.
--
-- This project is MIT/X11 licensed. Please see the
-- COPYING file in the source package for more information.
--
@@
-60,11
+60,11
@@
function new()
remove_handler(event, handler);
end
end;
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
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
if ret ~= nil then return ret; end
end
end