comparison plugins/mod_motd.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
parents ca0473cadd1c
children
comparison
equal deleted inserted replaced
12976:a187600ec7d6 12977:74b9e05af71e
11 local motd_text = module:get_option_string("motd_text"); 11 local motd_text = module:get_option_string("motd_text");
12 local motd_jid = module:get_option_string("motd_jid", host); 12 local motd_jid = module:get_option_string("motd_jid", host);
13 13
14 if not motd_text then return; end 14 if not motd_text then return; end
15 15
16 local st = require "util.stanza"; 16 local st = require "prosody.util.stanza";
17 17
18 motd_text = motd_text:gsub("^%s*(.-)%s*$", "%1"):gsub("\n[ \t]+", "\n"); -- Strip indentation from the config 18 motd_text = motd_text:gsub("^%s*(.-)%s*$", "%1"):gsub("\n[ \t]+", "\n"); -- Strip indentation from the config
19 19
20 module:hook("presence/initial", function (event) 20 module:hook("presence/initial", function (event)
21 local session = event.origin; 21 local session = event.origin;