# HG changeset patch # User Kim Alvefur # Date 1425410855 -3600 # Node ID cd44427c7295112944c140e5438c7821b3eeb972 # Parent ec172dbe9d149c89e73da2c0eb0a3f15cfafdf80 util.helpers: Fix order of functions using each other [fixes 00412b36166f] diff -r ec172dbe9d14 -r cd44427c7295 util/helpers.lua --- a/util/helpers.lua Mon Feb 23 12:04:43 2015 +0100 +++ b/util/helpers.lua Tue Mar 03 20:27:35 2015 +0100 @@ -12,14 +12,6 @@ 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 @@ 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 = {};