mirror of
https://github.com/bjc/prosody.git
synced 2025-04-04 21:57:45 +03:00
util.helpers: Fix order of functions using each other [fixes 00412b36166f]
This commit is contained in:
parent
7105732151
commit
d2819c1775
1 changed files with 8 additions and 8 deletions
|
@ -12,14 +12,6 @@ local debug = require "util.debug";
|
||||||
|
|
||||||
local log = require "util.logger".init("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 function log_events(events, name, logger)
|
||||||
local f = events.fire_event;
|
local f = events.fire_event;
|
||||||
if not f then
|
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; -- :))
|
events.fire_event, events[events.fire_event] = events[events.fire_event], nil; -- :))
|
||||||
end
|
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 function show_events(events, specific_event)
|
||||||
local event_handlers = events._handlers;
|
local event_handlers = events._handlers;
|
||||||
local events_array = {};
|
local events_array = {};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue