aboutsummaryrefslogtreecommitdiffstats
path: root/util/helpers.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-11-18 10:19:34 +0100
committerKim Alvefur <zash@zash.se>2016-11-18 10:19:34 +0100
commit8624ff85622a050d1085514534335f93af47e003 (patch)
treee33961e794171a5c991e3f15ea2389ea81d05460 /util/helpers.lua
parenta89c193bb2127ba3c7756bfb8a9687ac2f944821 (diff)
downloadprosody-8624ff85622a050d1085514534335f93af47e003.tar.gz
prosody-8624ff85622a050d1085514534335f93af47e003.zip
util.helpers: List event priorities instead of useless array index
Diffstat (limited to 'util/helpers.lua')
-rw-r--r--util/helpers.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/helpers.lua b/util/helpers.lua
index bf76d258..eb38f653 100644
--- a/util/helpers.lua
+++ b/util/helpers.lua
@@ -43,14 +43,14 @@ local function show_events(events, specific_event)
local event_handlers = events._handlers;
local events_array = {};
local event_handler_arrays = {};
- for event in pairs(events._event_map) do
+ for event, priorities in pairs(events._event_map) do
local handlers = event_handlers[event];
if handlers and (event == specific_event or not specific_event) then
table.insert(events_array, event);
local handler_strings = {};
for i, handler in ipairs(handlers) do
local upvals = debug.string_from_var_table(debug.get_upvalues_table(handler));
- handler_strings[i] = " "..i..": "..tostring(handler)..(upvals and ("\n "..upvals) or "");
+ handler_strings[i] = " "..priorities[handler]..": "..tostring(handler)..(upvals and ("\n "..upvals) or "");
end
event_handler_arrays[event] = handler_strings;
end