aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_motd.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_motd.lua')
-rw-r--r--plugins/mod_motd.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_motd.lua b/plugins/mod_motd.lua
index f323e606..462670e6 100644
--- a/plugins/mod_motd.lua
+++ b/plugins/mod_motd.lua
@@ -13,6 +13,8 @@ local motd_jid = module:get_option("motd_jid") or host;
local st = require "util.stanza";
+motd_text = motd_text:gsub("^%s*(.-)%s*$", "%1"):gsub("\n%s+", "\n"); -- Strip indentation from the config
+
module:hook("resource-bind",
function (event)
local session = event.session;