projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2fa42a7
)
mod_motd: Send no message (instead of 'blank') if no message is set in the config...
author
Matthew Wild
<mwild1@gmail.com>
Tue, 27 Sep 2011 18:05:14 +0000
(19:05 +0100)
committer
Matthew Wild
<mwild1@gmail.com>
Tue, 27 Sep 2011 18:05:14 +0000
(19:05 +0100)
plugins/mod_motd.lua
patch
|
blob
|
history
diff --git
a/plugins/mod_motd.lua
b/plugins/mod_motd.lua
index 462670e60804a431d5bc2fd4425c5a34651c3103..7c532a6bd058cb0e21b5365c56cad6e5058a9150 100644
(file)
--- 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