aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2011-01-07 03:46:10 +0000
committerMatthew Wild <mwild1@gmail.com>2011-01-07 03:46:10 +0000
commitdf5bec6e971a0e0f2dda68eb97e3c39e80114f68 (patch)
tree7446ac953a2f1be855207dc3f82c1191c56eddd3 /plugins
parent307c31a077ab9d56b21ba5f9d8f891d363636548 (diff)
downloadprosody-df5bec6e971a0e0f2dda68eb97e3c39e80114f68.tar.gz
prosody-df5bec6e971a0e0f2dda68eb97e3c39e80114f68.zip
mod_motd: Process value to strip any indentation from the config
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_motd.lua2
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;