Software /
code /
prosody-modules
Diff
mod_pastebin/mod_pastebin.lua @ 3008:26fe44c68791
mod_pastebin: Fix loading on normal hosts (thanks ppmathis)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 01 May 2018 01:59:14 +0200 |
parent | 2766:314cebb3071e |
child | 3027:ce34cbc10b5b |
line wrap: on
line diff
--- a/mod_pastebin/mod_pastebin.lua Mon Apr 30 01:49:59 2018 +0200 +++ b/mod_pastebin/mod_pastebin.lua Tue May 01 01:59:14 2018 +0200 @@ -6,7 +6,10 @@ local t_insert, t_remove = table.insert, table.remove; local add_task = require "util.timer".add_task; local jid_bare = require "util.jid".bare; -local muc_rooms = module:depends "muc".rooms; +local muc_rooms; +if module:get_host_type() == "component" then + muc_rooms = module:depends "muc".rooms; +end local utf8_pattern = "[\194-\244][\128-\191]*$"; local function drop_invalid_utf8(seq)