local log = require "util.logger".init("mod_muc");\r
local multitable_new = require "util.multitable".new;\r
\r
local log = require "util.logger".init("mod_muc");\r
local multitable_new = require "util.multitable".new;\r
\r
-local muc_domain = "conference."..module:get_host();\r
+if module:get_host_type() ~= "component" then\r
+ error("MUC should be loaded as a component, please see http://prosody.im/doc/components", 0);\r
+end\r
+\r
+local muc_domain = module:get_host();\r
+\r
local to_node, to_host, to_resource = jid_split(stanza.attr.to);\r
if stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" then\r
if type == "error" or type == "result" then return; end\r
local to_node, to_host, to_resource = jid_split(stanza.attr.to);\r
if stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" then\r
if type == "error" or type == "result" then return; end\r
if type == "error" or type == "result" then return; end\r
handle_to_domain(origin, stanza);\r
end\r
if type == "error" or type == "result" then return; end\r
handle_to_domain(origin, stanza);\r
end\r