From df5bec6e971a0e0f2dda68eb97e3c39e80114f68 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 7 Jan 2011 03:46:10 +0000 Subject: mod_motd: Process value to strip any indentation from the config --- plugins/mod_motd.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins') 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; -- cgit v1.2.3