Comparison

plugins/mod_welcome.lua @ 12977:74b9e05af71e

plugins: Prefix module imports with prosody namespace
author Kim Alvefur <zash@zash.se>
date Fri, 24 Mar 2023 13:15:28 +0100
parent 8161:31938a0c398f
comparison
equal deleted inserted replaced
12976:a187600ec7d6 12977:74b9e05af71e
7 -- 7 --
8 8
9 local host = module:get_host(); 9 local host = module:get_host();
10 local welcome_text = module:get_option_string("welcome_message", "Hello $username, welcome to the $host IM server!"); 10 local welcome_text = module:get_option_string("welcome_message", "Hello $username, welcome to the $host IM server!");
11 11
12 local st = require "util.stanza"; 12 local st = require "prosody.util.stanza";
13 13
14 module:hook("user-registered", 14 module:hook("user-registered",
15 function (user) 15 function (user)
16 local welcome_stanza = 16 local welcome_stanza =
17 st.message({ to = user.username.."@"..user.host, from = host }, 17 st.message({ to = user.username.."@"..user.host, from = host },