plugins/muc/mod_muc: No need to treat the host room specially
authordaurnimator <quae@daurnimator.com>
Mon, 28 Apr 2014 20:31:21 +0000 (16:31 -0400)
committerdaurnimator <quae@daurnimator.com>
Mon, 28 Apr 2014 20:31:21 +0000 (16:31 -0400)
plugins/muc/mod_muc.lua

index 8a7ae9c7a3d4564879a8e0232337a6e848e70122..ecc136f10528d9635b33eab78bb261a57ecdd14f 100644 (file)
@@ -12,7 +12,6 @@ if module:get_host_type() ~= "component" then
        error("MUC should be loaded as a component, please see http://prosody.im/doc/components", 0);
 end
 
        error("MUC should be loaded as a component, please see http://prosody.im/doc/components", 0);
 end
 
-local muc_host = module:get_host();
 local restrict_room_creation = module:get_option("restrict_room_creation");
 if restrict_room_creation then
        if restrict_room_creation == true then
 local restrict_room_creation = module:get_option("restrict_room_creation");
 if restrict_room_creation then
        if restrict_room_creation == true then
@@ -120,10 +119,6 @@ for jid in pairs(persistent_rooms) do
 end
 if persistent_errors then persistent_rooms_storage:set(nil, persistent_rooms); end
 
 end
 if persistent_errors then persistent_rooms_storage:set(nil, persistent_rooms); end
 
-local host_room = muc_new_room(muc_host);
-host_room.save = room_save;
-rooms[muc_host] = host_room;
-
 module:hook("host-disco-items", function(event)
        local reply = event.reply;
        module:log("debug", "host-disco-items called");
 module:hook("host-disco-items", function(event)
        local reply = event.reply;
        module:log("debug", "host-disco-items called");
@@ -227,7 +222,6 @@ function shutdown_component()
                for roomjid, room in pairs(rooms) do
                        room:clear(x);
                end
                for roomjid, room in pairs(rooms) do
                        room:clear(x);
                end
-               host_room:clear(x);
        end
 end
 module.unload = shutdown_component;
        end
 end
 module.unload = shutdown_component;