Mercurial > prosody-modules
view mod_log_events/mod_log_events.lua @ 5040:fa99279f9d40
mod_invites_adhoc: Set non-nil defaults for options, fixes traceback (thanks Martin)
Fixes an error when attempting to call the :empty() method on the
default implicit default nil value.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 14 Sep 2022 17:21:42 +0200 |
parents | 0e008f36a91c |
children |
line wrap: on
line source
module:set_global(); local helpers = require "util.helpers"; local function init(module, events, name) helpers.log_events(events, name, module._log); function module.unload() helpers.revert_log_events(events); end end init(module, prosody.events, "global"); function module.add_host(module) init(module, prosody.hosts[module.host].events, module.host); end