# HG changeset patch # User Kim Alvefur # Date 1527841314 -7200 # Node ID 2096742859c13bcbb60db4d2944872d1ef8c0016 # Parent f4cc818db995c36efb6c7a5ca59b5cfa70cf5f9a MUC: Invert final conditional to be consistent with the other if statements diff -r f4cc818db995 -r 2096742859c1 plugins/muc/moderated.lib.lua --- a/plugins/muc/moderated.lib.lua Fri Jun 01 10:20:19 2018 +0200 +++ b/plugins/muc/moderated.lib.lua Fri Jun 01 10:21:54 2018 +0200 @@ -82,9 +82,11 @@ return; end - if affected_occupant.role == "visitor" then - event.room:set_role(actor, affected_occupant.nick, "participant", "Voice granted"); + if affected_occupant.role ~= "visitor" then + return; end + + event.room:set_role(actor, affected_occupant.nick, "participant", "Voice granted"); end);