aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_motd.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_motd.lua b/plugins/mod_motd.lua
index 462670e6..7c532a6b 100644
--- a/plugins/mod_motd.lua
+++ b/plugins/mod_motd.lua
@@ -8,9 +8,11 @@
--
local host = module:get_host();
-local motd_text = module:get_option("motd_text") or "MOTD: (blank)";
+local motd_text = module:get_option("motd_text");
local motd_jid = module:get_option("motd_jid") or host;
+if not motd_text then return; end
+
local st = require "util.stanza";
motd_text = motd_text:gsub("^%s*(.-)%s*$", "%1"):gsub("\n%s+", "\n"); -- Strip indentation from the config