# HG changeset patch # User Kim Alvefur # Date 1391679861 -3600 # Node ID 1579b53351e240eb01a1cabc46939093e9da76f9 # Parent 95ce7bfbfa6f88aba66eb1d46b98530c86496c04 mod_motd: Strip indentation only, leave multiple newlines diff -r 95ce7bfbfa6f -r 1579b53351e2 plugins/mod_motd.lua --- a/plugins/mod_motd.lua Mon Jan 27 16:47:54 2014 +0100 +++ b/plugins/mod_motd.lua Thu Feb 06 10:44:21 2014 +0100 @@ -15,7 +15,7 @@ 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;