Mercurial > prosody-hg
comparison plugins/mod_welcome.lua @ 7227:c6f9d694d778
mod_welcome: Pass default text to config API as default value
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 02 Mar 2016 16:43:42 +0100 |
| parents | 9e380d145ad1 |
| children | 31938a0c398f |
comparison
equal
deleted
inserted
replaced
| 7226:9e380d145ad1 | 7227:c6f9d694d778 |
|---|---|
| 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 host = module:get_host(); | 9 local host = module:get_host(); |
| 10 local welcome_text = module:get_option_string("welcome_message") or "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 "util.stanza"; |
| 13 | 13 |
| 14 module:hook("user-registered", | 14 module:hook("user-registered", |
| 15 function (user) | 15 function (user) |
