Comparison

mod_support_contact/mod_support_contact.lua @ 986:8b1250df82e8

mod_support_contact: Use module:get_option_string()
author Kim Alvefur <zash@zash.se>
date Wed, 24 Apr 2013 10:20:55 +0200
parent 777:e5413b66aeec
child 1343:7dbde05b48a9
comparison
equal deleted inserted replaced
985:93ef813dfd06 986:8b1250df82e8
5 -- support_contact_nick = "Support!"; -- roster nick 5 -- support_contact_nick = "Support!"; -- roster nick
6 -- support_contact_group = "Users being supported!"; -- the roster group in the support contact's roster 6 -- support_contact_group = "Users being supported!"; -- the roster group in the support contact's roster
7 7
8 local host = module:get_host(); 8 local host = module:get_host();
9 9
10 local support_contact = module:get_option("support_contact") or "support@"..host; 10 local support_contact = module:get_option_string("support_contact", "support@"..host);
11 local support_contact_nick = module:get_option("support_contact_nick") or "Support"; 11 local support_contact_nick = module:get_option_string("support_contact_nick", "Support");
12 local support_contact_group = module:get_option("support_contact_group") or "Users"; 12 local support_contact_group = module:get_option_string("support_contact_group", "Users");
13 13
14 if not(support_contact and support_contact_nick) then return; end 14 if not(support_contact and support_contact_nick) then return; end
15 15
16 local rostermanager = require "core.rostermanager"; 16 local rostermanager = require "core.rostermanager";
17 local datamanager = require "util.datamanager";
18 local jid_split = require "util.jid".split; 17 local jid_split = require "util.jid".split;
19 local st = require "util.stanza"; 18 local st = require "util.stanza";
20 19
21 module:hook("user-registered", function(event) 20 module:hook("user-registered", function(event)
22 module:log("debug", "Adding support contact"); 21 module:log("debug", "Adding support contact");