Software /
code /
prosody-modules
Changeset
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 |
parents | 3007:af1b3cef52e1 |
children | 3009:a6fa44eeb818 |
files | mod_pastebin/mod_pastebin.lua |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
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)