Software /
code /
prosody-modules
Changeset
75:3c7189e26848
mod_pastebin: Rename pastebin_message() to pastebin_text() and make it global so it can be called by other plugins
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 01 Nov 2009 01:10:02 +0000 |
parents | 74:d70813f7d90a |
children | 76:1fc4e8dc66a6 |
files | mod_pastebin/mod_pastebin.lua |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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;