Comparison

plugins/muc/whois.lib.lua @ 7401:e16b3fd0bd80

MUC: Assign priorities to config form hooks so they have a consistent order on each start
author Kim Alvefur <zash@zash.se>
date Tue, 19 Apr 2016 20:31:39 +0200
parent 7353:ca31d3271cf8
child 9034:1c709e3d2e5e
comparison
equal deleted inserted replaced
7400:f1ff321178d4 7401:e16b3fd0bd80
36 value = { 36 value = {
37 { value = 'moderators', label = 'Moderators Only', default = whois == 'moderators' }, 37 { value = 'moderators', label = 'Moderators Only', default = whois == 'moderators' },
38 { value = 'anyone', label = 'Anyone', default = whois == 'anyone' } 38 { value = 'anyone', label = 'Anyone', default = whois == 'anyone' }
39 } 39 }
40 }); 40 });
41 end); 41 end, 100-9);
42 42
43 module:hook("muc-config-submitted/muc#roomconfig_whois", function(event) 43 module:hook("muc-config-submitted/muc#roomconfig_whois", function(event)
44 if set_whois(event.room, event.value) then 44 if set_whois(event.room, event.value) then
45 local code = (event.value == 'moderators') and "173" or "172"; 45 local code = (event.value == 'moderators') and "173" or "172";
46 event.status_codes[code] = true; 46 event.status_codes[code] = true;