comparison mod_seclabels/mod_seclabels.lua @ 937:5276e1fc26b6

mod_seclabels: Remove config-reloaded hook. Just reload the module to update
author Kim Alvefur <zash@zash.se>
date Mon, 25 Mar 2013 00:55:29 +0100
parents 48b615229509
children 020b5944a973
comparison
equal deleted inserted replaced
936:7236cdec3ea1 937:5276e1fc26b6
23 Classified = { 23 Classified = {
24 SECRET = { color = "black", bgcolor = "aqua", label = "THISISSECRET" }; 24 SECRET = { color = "black", bgcolor = "aqua", label = "THISISSECRET" };
25 PUBLIC = { label = "THISISPUBLIC" }; 25 PUBLIC = { label = "THISISPUBLIC" };
26 }; 26 };
27 }; 27 };
28 local catalog_name, catalog_desc, labels; 28 local catalog_name = module:get_option_string("security_catalog_name", "Default");
29 local function get_conf() 29 local catalog_desc = module:get_option_string("security_catalog_desc", "My labels");
30 catalog_name = module:get_option_string("security_catalog_name", "Default"); 30 local labels = module:get_option("security_labels", default_labels);
31 catalog_desc = module:get_option_string("security_catalog_desc", "My labels");
32 labels = module:get_option("security_labels", default_labels);
33 end
34 module:hook_global("config-reloaded",get_conf);
35 get_conf();
36 31
37 function handle_catalog_request(request) 32 function handle_catalog_request(request)
38 local catalog_request = request.stanza.tags[1]; 33 local catalog_request = request.stanza.tags[1];
39 local reply = st.reply(request.stanza) 34 local reply = st.reply(request.stanza)
40 :tag("catalog", { 35 :tag("catalog", {