projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe6a98b
)
mod_motd: Strip indentation only, leave multiple newlines
author
Kim Alvefur
<zash@zash.se>
Thu, 6 Feb 2014 09:44:21 +0000
(10:44 +0100)
committer
Kim Alvefur
<zash@zash.se>
Thu, 6 Feb 2014 09:44:21 +0000
(10:44 +0100)
plugins/mod_motd.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_motd.lua
b/plugins/mod_motd.lua
index ed78294b1fd07a78ced7c9fb5cc04c78974241b3..3dd6b8168aefbacc7e28eacf705183a9cb36df57 100644
(file)
--- 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;