MUC: Fix global access when setting 'whois', probably resulted in wrong status code...
authorKim Alvefur <zash@zash.se>
Mon, 11 Jan 2016 12:44:48 +0000 (13:44 +0100)
committerKim Alvefur <zash@zash.se>
Mon, 11 Jan 2016 12:44:48 +0000 (13:44 +0100)
plugins/muc/whois.lib.lua

index a8e1f8d419bd0c89591e0b11dfa72633bc690692..2f492c450dcbc5eb968d11c3730f761800fa1ff2 100644 (file)
@@ -43,7 +43,7 @@ end);
 
 module:hook("muc-config-submitted/muc#roomconfig_whois", function(event)
        if set_whois(event.room, event.value) then
-               local code = (new == 'moderators') and "173" or "172";
+               local code = (event.value == 'moderators') and "173" or "172";
                event.status_codes[code] = true;
        end
 end);