# HG changeset patch # User daurnimator # Date 1398798786 14400 # Node ID 641756a6a5f75af2bc574f2595e86e07f1efc603 # Parent a791dd7812381a55bc0245696578877892d4e61e plugins/muc: Move 'module:get_option_number("max_history_messages")' from mod_muc into history lib; remove from muclib exports diff -r a791dd781238 -r 641756a6a5f7 plugins/muc/history.lib.lua --- a/plugins/muc/history.lib.lua Tue Apr 29 14:50:13 2014 -0400 +++ b/plugins/muc/history.lib.lua Tue Apr 29 15:13:06 2014 -0400 @@ -11,7 +11,8 @@ local datetime = require "util.datetime"; local st = require "util.stanza"; -local default_history_length, max_history_length = 20, math.huge; +local default_history_length = 20; +local max_history_length = module:get_option_number("max_history_messages", math.huge); local function set_max_history_length(_max_history_length) max_history_length = _max_history_length or math.huge; diff -r a791dd781238 -r 641756a6a5f7 plugins/muc/mod_muc.lua --- a/plugins/muc/mod_muc.lua Tue Apr 29 14:50:13 2014 -0400 +++ b/plugins/muc/mod_muc.lua Tue Apr 29 15:13:06 2014 -0400 @@ -33,8 +33,6 @@ rooms = {}; local rooms = rooms; --- Configurable options -muclib.set_max_history_length(module:get_option_number("max_history_messages")); module:depends("disco"); module:add_identity("conference", "text", module:get_option_string("name", "Prosody Chatrooms")); diff -r a791dd781238 -r 641756a6a5f7 plugins/muc/muc.lib.lua --- a/plugins/muc/muc.lib.lua Tue Apr 29 14:50:13 2014 -0400 +++ b/plugins/muc/muc.lib.lua Tue Apr 29 15:13:06 2014 -0400 @@ -1114,8 +1114,6 @@ local _M = {}; -- module "muc" -_M.set_max_history_length = history.set_max_length; - function _M.new_room(jid, config) return setmetatable({ jid = jid;