From 4bb6deaaa3e0e0f8978dbb77564cf85f5f88991d Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Tue, 27 Sep 2011 19:05:14 +0100 Subject: mod_motd: Send no message (instead of 'blank') if no message is set in the config (thanks medics) --- plugins/mod_motd.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plugins') 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 -- cgit v1.2.3