Mercurial > prosody-modules
comparison mod_log_events/mod_log_events.lua @ 1641:1fa25cfb0ad4
Merge
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 31 Mar 2015 18:31:13 +0200 |
| parents | 9276473ee5be |
| children | 0e008f36a91c |
comparison
equal
deleted
inserted
replaced
| 1636:7fa0c41792c7 | 1641:1fa25cfb0ad4 |
|---|---|
| 1 module:set_global(); | |
| 2 | |
| 3 local helpers = require "util.helpers"; | |
| 4 | |
| 5 helpers.log_events(prosody.events, "global", module._log); | |
| 6 | |
| 7 function module.add_host(module) | |
| 8 helpers.log_events(prosody.hosts[module.host].events, module.host, module._log); | |
| 9 end | |
| 10 | |
| 11 function module.remove_host(module) | |
| 12 helpers.revert_log_events(prosody.hosts[module.host].events); | |
| 13 end |
