Software /
code /
prosody-modules
Changeset
15:14b18ef8b554
merge with repos
author | Thilo Cestonaro <thilo@cestona.ro> |
---|---|
date | Sat, 26 Sep 2009 22:30:33 +0200 |
parents | 11:529819205379 (current diff) 14:0892941186f2 (diff) |
children | 16:35e74c1094a7 |
files | mod_privacy/mod_privacy.lua |
diffstat | 2 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_pastebin/mod_pastebin.lua Sat Sep 26 22:22:51 2009 +0200 +++ b/mod_pastebin/mod_pastebin.lua Sat Sep 26 22:30:33 2009 +0200 @@ -2,8 +2,9 @@ local st = require "util.stanza"; local httpserver = require "net.httpserver"; local uuid_new = require "util.uuid".generate; +local os_time = os.time; -local os_time = os.time; +local length_threshold = config.get("*", "core", "pastebin_threshold") or 500; local base_url; @@ -46,7 +47,7 @@ module:log("debug", "Body(%s) length: %d", type(body), #(body or "")); - if body and #body > 500 then + if body and #body > length_threshold then local url = pastebin_message(body); module:log("debug", "Pasted message as %s", url); --module:log("debug", " stanza[bodyindex] = %q", tostring( stanza[bodyindex]));
--- a/mod_privacy/mod_privacy.lua Sat Sep 26 22:22:51 2009 +0200 +++ b/mod_privacy/mod_privacy.lua Sat Sep 26 22:30:33 2009 +0200 @@ -96,7 +96,7 @@ list.items = {}; for _,item in ipairs(entries) do - tmp = {}; + local tmp = {}; tmp["type"] = item.attr.type; tmp["value"] = item.attr.value; tmp["action"] = item.attr.action;