aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-03-03 20:27:35 +0100
committerKim Alvefur <zash@zash.se>2015-03-03 20:27:35 +0100
commite1c84eecb8aa5133743f98c3be2cddd0da0fc26e (patch)
tree7ea0904fcb777b9c10996f6d2478b7171ffae056 /util
parent0a257b3921e45557ece02a3744f1b5ef469017bf (diff)
downloadprosody-e1c84eecb8aa5133743f98c3be2cddd0da0fc26e.tar.gz
prosody-e1c84eecb8aa5133743f98c3be2cddd0da0fc26e.zip
util.helpers: Fix order of functions using each other [fixes 00412b36166f]
Diffstat (limited to 'util')
-rw-r--r--util/helpers.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/util/helpers.lua b/util/helpers.lua
index 083f651b..bf76d258 100644
--- a/util/helpers.lua
+++ b/util/helpers.lua
@@ -12,14 +12,6 @@ local debug = require "util.debug";
local log = require "util.logger".init("util.debug");
-local function log_host_events(host)
- return log_events(prosody.hosts[host].events, host);
-end
-
-local function revert_log_host_events(host)
- return revert_log_events(prosody.hosts[host].events);
-end
-
local function log_events(events, name, logger)
local f = events.fire_event;
if not f then
@@ -39,6 +31,14 @@ local function revert_log_events(events)
events.fire_event, events[events.fire_event] = events[events.fire_event], nil; -- :))
end
+local function log_host_events(host)
+ return log_events(prosody.hosts[host].events, host);
+end
+
+local function revert_log_host_events(host)
+ return revert_log_events(prosody.hosts[host].events);
+end
+
local function show_events(events, specific_event)
local event_handlers = events._handlers;
local events_array = {};