Software /
code /
prosody-modules
Diff
mod_archive_muc/mod_archive_muc.lua @ 243:6202ce4d12d6
mod_archive: added some config options.
mod_archive_muc: added some config options.
author | shinysky<shinysky1986(AT)gmail.com> |
---|---|
date | Fri, 13 Aug 2010 20:21:39 +0800 |
parent | 240:ef0b580f434d |
child | 476:2c85635318a5 |
line wrap: on
line diff
--- a/mod_archive_muc/mod_archive_muc.lua Thu Aug 12 23:07:14 2010 +0200 +++ b/mod_archive_muc/mod_archive_muc.lua Fri Aug 13 20:21:39 2010 +0800 @@ -15,7 +15,7 @@ local PREFS_DIR = "archive_muc_prefs"; local ARCHIVE_DIR = "archive_muc"; -local AUTO_ARCHIVING_ENABLED = true; +local AUTO_MUC_ARCHIVING_ENABLED = module:get_option_boolean("auto_muc_archiving_enabled", true); module:add_feature("urn:xmpp:archive#preferences"); module:add_feature("urn:xmpp:archive#management"); @@ -143,7 +143,7 @@ local function apply_pref(node, host, jid) local pref = load_prefs(node, host); if not pref then - return AUTO_ARCHIVING_ENABLED; + return AUTO_MUC_ARCHIVING_ENABLED; end local always = pref:child_with_name('always'); if always and is_in(always, jid) then @@ -161,7 +161,7 @@ elseif default == 'never' then return false; end - return AUTO_ARCHIVING_ENABLED; + return AUTO_MUC_ARCHIVING_ENABLED; end local function store_msg(msg, node, host) @@ -196,4 +196,3 @@ module:hook("message/bare", msg_handler, 20); --- TODO prefs: [1] = "\n ";