Software /
code /
prosody
Comparison
plugins/muc/history.lib.lua @ 6240:641756a6a5f7
plugins/muc: Move 'module:get_option_number("max_history_messages")' from mod_muc into history lib; remove from muclib exports
author | daurnimator <quae@daurnimator.com> |
---|---|
date | Tue, 29 Apr 2014 15:13:06 -0400 |
parent | 6231:bc12a8253f94 |
child | 6277:f2c9c36979b3 |
comparison
equal
deleted
inserted
replaced
6239:a791dd781238 | 6240:641756a6a5f7 |
---|---|
9 | 9 |
10 local gettime = os.time; | 10 local gettime = os.time; |
11 local datetime = require "util.datetime"; | 11 local datetime = require "util.datetime"; |
12 local st = require "util.stanza"; | 12 local st = require "util.stanza"; |
13 | 13 |
14 local default_history_length, max_history_length = 20, math.huge; | 14 local default_history_length = 20; |
15 local max_history_length = module:get_option_number("max_history_messages", math.huge); | |
15 | 16 |
16 local function set_max_history_length(_max_history_length) | 17 local function set_max_history_length(_max_history_length) |
17 max_history_length = _max_history_length or math.huge; | 18 max_history_length = _max_history_length or math.huge; |
18 end | 19 end |
19 | 20 |