Comparison

plugins/mod_welcome.lua @ 1650:b010d6711527

mod_welcome: Updated to use module:get_option instead of configmanager
author Waqas Hussain <waqas20@gmail.com>
date Sat, 08 Aug 2009 23:38:02 +0500
parent 1523:841d61be198f
child 1816:1c0bde3db7d8
comparison
equal deleted inserted replaced
1649:a6698ab04039 1650:b010d6711527
4 -- 4 --
5 -- This project is MIT/X11 licensed. Please see the 5 -- This project is MIT/X11 licensed. Please see the
6 -- COPYING file in the source package for more information. 6 -- COPYING file in the source package for more information.
7 -- 7 --
8 8
9 local config = require "core.configmanager";
10
11 local host = module:get_host(); 9 local host = module:get_host();
12 local welcome_text = config.get("*", "core", "welcome_message") or "Hello $user, welcome to the $host IM server!"; 10 local welcome_text = module:get_option("welcome_message") or "Hello $user, welcome to the $host IM server!";
13 11
14 local st = require "util.stanza"; 12 local st = require "util.stanza";
15 13
16 module:hook("user-registered", 14 module:hook("user-registered",
17 function (user) 15 function (user)