mod_motd: Strip indentation only, leave multiple newlines
authorKim Alvefur <zash@zash.se>
Thu, 6 Feb 2014 09:44:21 +0000 (10:44 +0100)
committerKim Alvefur <zash@zash.se>
Thu, 6 Feb 2014 09:44:21 +0000 (10:44 +0100)
plugins/mod_motd.lua

index ed78294b1fd07a78ced7c9fb5cc04c78974241b3..3dd6b8168aefbacc7e28eacf705183a9cb36df57 100644 (file)
@@ -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;