# HG changeset patch # User Thilo Cestonaro # Date 1253997033 -7200 # Node ID 14b18ef8b554ca72a09c9d7c60a8ca6a8d0714c6 # Parent 5298192053793d62b6f40624dd2ab86e93835a37# Parent 0892941186f247593c3c1d40b577408a1387dede merge with repos diff -r 529819205379 -r 14b18ef8b554 mod_pastebin/mod_pastebin.lua --- 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])); diff -r 529819205379 -r 14b18ef8b554 mod_privacy/mod_privacy.lua --- 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;