diff options
author | Matthew Wild <mwild1@gmail.com> | 2011-01-07 03:46:10 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2011-01-07 03:46:10 +0000 |
commit | df5bec6e971a0e0f2dda68eb97e3c39e80114f68 (patch) | |
tree | 7446ac953a2f1be855207dc3f82c1191c56eddd3 /plugins/mod_motd.lua | |
parent | 307c31a077ab9d56b21ba5f9d8f891d363636548 (diff) | |
download | prosody-df5bec6e971a0e0f2dda68eb97e3c39e80114f68.tar.gz prosody-df5bec6e971a0e0f2dda68eb97e3c39e80114f68.zip |
mod_motd: Process value to strip any indentation from the config
Diffstat (limited to 'plugins/mod_motd.lua')
-rw-r--r-- | plugins/mod_motd.lua | 2 |
1 files changed, 2 insertions, 0 deletions
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; |