From 9a9dd21edf4c6ad318fcd31c0fe740cf1b7dba81 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 6 Feb 2014 10:44:21 +0100 Subject: mod_motd: Strip indentation only, leave multiple newlines --- plugins/mod_motd.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_motd.lua b/plugins/mod_motd.lua index ed78294b..3dd6b816 100644 --- a/plugins/mod_motd.lua +++ b/plugins/mod_motd.lua @@ -15,7 +15,7 @@ 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 +motd_text = motd_text:gsub("^%s*(.-)%s*$", "%1"):gsub("\n[ \t]+", "\n"); -- Strip indentation from the config module:hook("presence/bare", function (event) local session, stanza = event.origin, event.stanza; -- cgit v1.2.3