mod_tls: Don't try to start TLS if we can't actually do it (thanks Florob)
[prosody.git] / plugins / mod_welcome.lua
index 491acb8f932970616d670c07987872280dd59526..cc50cba37b23c27d3e0e7af5af50488032f222c9 100644 (file)
@@ -1,4 +1,4 @@
--- Prosody IM v0.4
+-- Prosody IM
 -- Copyright (C) 2008-2009 Matthew Wild
 -- Copyright (C) 2008-2009 Waqas Hussain
 -- 
@@ -6,14 +6,12 @@
 -- COPYING file in the source package for more information.
 --
 
-local config = require "core.configmanager";
-
 local host = module:get_host();
-local welcome_text = config.get("*", "core", "welcome_message") or "Hello $user, welcome to the $host IM server!";
+local welcome_text = module:get_option("welcome_message") or "Hello $user, welcome to the $host IM server!";
 
 local st = require "util.stanza";
 
-module:add_event_hook("user-registered", 
+module:hook("user-registered", 
        function (user)
                local welcome_stanza = 
                        st.message({ to = user.username.."@"..user.host, from = host })