net.server_select: Return handler from addclient
[prosody.git] / util / helpers.lua
index 6103a319fbc2cd099d28472c195e378d1a3f2d60..437a920c102371eb4130384e825af9a7fbabb25b 100644 (file)
@@ -1,7 +1,7 @@
 -- 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.
 --
@@ -14,6 +14,14 @@ module("helpers", package.seeall);
 
 local log = require "util.logger".init("util.debug");
 
+function log_host_events(host)
+       return log_events(prosody.hosts[host].events, host);
+end
+
+function revert_log_host_events(host)
+       return revert_log_events(prosody.hosts[host].events);
+end
+
 function log_events(events, name, logger)
        local f = events.fire_event;
        if not f then