X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=plugins%2Fmuc%2Fmod_muc.lua;h=ee90d5527bffca841c46480f1c3303376f3d98c0;hb=2c5b77cf0f73aa0c7408d61195e438e0de59a0b1;hp=c514bafd375b36e810ba3d9887e460f19984abee;hpb=6a04582118287f5584534fb4c140fe2009c17136;p=prosody.git diff --git a/plugins/muc/mod_muc.lua b/plugins/muc/mod_muc.lua index c514bafd..ee90d552 100644 --- a/plugins/muc/mod_muc.lua +++ b/plugins/muc/mod_muc.lua @@ -13,8 +13,7 @@ if module:get_host_type() ~= "component" then end local muc_host = module:get_host(); -local muc_name = module:get_option("name"); -if type(muc_name) ~= "string" then muc_name = "Prosody Chatrooms"; end +local muc_name = module:get_option_string("name", "Prosody Chatrooms"); local restrict_room_creation = module:get_option("restrict_room_creation"); if restrict_room_creation then if restrict_room_creation == true then @@ -60,7 +59,7 @@ function muclib.room_mt:get_affiliation(jid) return _get_affiliation(self, jid); end function muclib.room_mt:set_affiliation(actor, jid, affiliation, callback, reason) - if is_admin(jid) then return nil, "modify", "not-acceptable"; end + if affiliation ~= "owner" and is_admin(jid) then return nil, "modify", "not-acceptable"; end return _set_affiliation(self, actor, jid, affiliation, callback, reason); end