# HG changeset patch # User Kim Alvefur # Date 1525132754 -7200 # Node ID 26fe44c68791b5a15095e3984d52f4744cfb3592 # Parent af1b3cef52e1c4fba8e764b556eda62bd96ca855 mod_pastebin: Fix loading on normal hosts (thanks ppmathis) diff -r af1b3cef52e1 -r 26fe44c68791 mod_pastebin/mod_pastebin.lua --- 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)