Mercurial > prosody-hg
comparison plugins/muc/whois.lib.lua @ 7075:47a2deb74b56
MUC: Fix global access when setting 'whois', probably resulted in wrong status code return (thanks EmilyRose)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 11 Jan 2016 13:44:48 +0100 |
| parents | 84e01dbb739e |
| children | 50b24b3476e6 |
comparison
equal
deleted
inserted
replaced
| 7074:3ff83773ffc0 | 7075:47a2deb74b56 |
|---|---|
| 41 }); | 41 }); |
| 42 end); | 42 end); |
| 43 | 43 |
| 44 module:hook("muc-config-submitted/muc#roomconfig_whois", function(event) | 44 module:hook("muc-config-submitted/muc#roomconfig_whois", function(event) |
| 45 if set_whois(event.room, event.value) then | 45 if set_whois(event.room, event.value) then |
| 46 local code = (new == 'moderators') and "173" or "172"; | 46 local code = (event.value == 'moderators') and "173" or "172"; |
| 47 event.status_codes[code] = true; | 47 event.status_codes[code] = true; |
| 48 end | 48 end |
| 49 end); | 49 end); |
| 50 | 50 |
| 51 -- Mask 'from' jid as occupant jid if room is anonymous | 51 -- Mask 'from' jid as occupant jid if room is anonymous |
