MUC: Expose room metatable on module
authorKim Alvefur <zash@zash.se>
Sat, 18 Jan 2014 17:28:50 +0000 (18:28 +0100)
committerKim Alvefur <zash@zash.se>
Sat, 18 Jan 2014 17:28:50 +0000 (18:28 +0100)
plugins/muc/mod_muc.lua

index 042d3891efc6df0c2e6bd9bd745cb2e69781a270..7bb1d8b2df918a98247507f60ce54e31dcbd5a57 100644 (file)
@@ -52,8 +52,9 @@ local function is_admin(jid)
        return um_is_admin(jid, module.host);
 end
 
-local _set_affiliation = muc_new_room.room_mt.set_affiliation;
-local _get_affiliation = muc_new_room.room_mt.get_affiliation;
+room_mt = muclib.room_mt; -- Yes, global.
+local _set_affiliation = room_mt.set_affiliation;
+local _get_affiliation = room_mt.get_affiliation;
 function muclib.room_mt:get_affiliation(jid)
        if is_admin(jid) then return "owner"; end
        return _get_affiliation(self, jid);