diff options
author | Matthew Wild <mwild1@gmail.com> | 2011-09-27 19:05:14 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2011-09-27 19:05:14 +0100 |
commit | 4bb6deaaa3e0e0f8978dbb77564cf85f5f88991d (patch) | |
tree | f6829bf77ab7c8da9dfba84de8caec2b791a5673 /plugins | |
parent | b07e6ff42eba66c6dd1af02da6964136f16a53df (diff) | |
download | prosody-4bb6deaaa3e0e0f8978dbb77564cf85f5f88991d.tar.gz prosody-4bb6deaaa3e0e0f8978dbb77564cf85f5f88991d.zip |
mod_motd: Send no message (instead of 'blank') if no message is set in the config (thanks medics)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_motd.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_motd.lua b/plugins/mod_motd.lua index 462670e6..7c532a6b 100644 --- a/plugins/mod_motd.lua +++ b/plugins/mod_motd.lua @@ -8,9 +8,11 @@ -- local host = module:get_host(); -local motd_text = module:get_option("motd_text") or "MOTD: (blank)"; +local motd_text = module:get_option("motd_text"); local motd_jid = module:get_option("motd_jid") or host; +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 |