mod_motd: Send no message (instead of 'blank') if no message is set in the config...
authorMatthew Wild <mwild1@gmail.com>
Tue, 27 Sep 2011 18:05:14 +0000 (19:05 +0100)
committerMatthew Wild <mwild1@gmail.com>
Tue, 27 Sep 2011 18:05:14 +0000 (19:05 +0100)
plugins/mod_motd.lua

index 462670e60804a431d5bc2fd4425c5a34651c3103..7c532a6bd058cb0e21b5365c56cad6e5058a9150 100644 (file)
@@ -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