# HG changeset patch # User Matthew Wild # Date 1257037802 0 # Node ID 3c7189e2684870b6ae99efbb3e2b73a6f2781899 # Parent d70813f7d90a9e1aa0ade4b95313826c18befe84 mod_pastebin: Rename pastebin_message() to pastebin_text() and make it global so it can be called by other plugins diff -r d70813f7d90a -r 3c7189e26848 mod_pastebin/mod_pastebin.lua --- a/mod_pastebin/mod_pastebin.lua Sat Oct 31 21:00:02 2009 +0100 +++ b/mod_pastebin/mod_pastebin.lua Sun Nov 01 01:10:02 2009 +0000 @@ -18,7 +18,7 @@ local xmlns_xhtmlim = "http://jabber.org/protocol/xhtml-im"; local xmlns_xhtml = "http://www.w3.org/1999/xhtml"; -local function pastebin_message(text) +function pastebin_text(text) local uuid = uuid_new(); pastes[uuid] = { text = text, time = os_time() }; pastes[#pastes+1] = uuid; @@ -57,7 +57,7 @@ --module:log("debug", "Body(%s) length: %d", type(body), #(body or "")); if body and #body > length_threshold then - local url = pastebin_message(body); + local url = pastebin_text(body); module:log("debug", "Pasted message as %s", url); --module:log("debug", " stanza[bodyindex] = %q", tostring( stanza[bodyindex])); stanza[bodyindex][1] = url;