Diff

mod_vjud/mod_vjud.lua @ 1296:b1a92a87309c

mod_vjud: Move instructions into a config option
author Kim Alvefur <zash@zash.se>
date Sun, 02 Feb 2014 18:12:42 +0100
parent 882:4939788a47ea
child 1318:5d49dc72b732
line wrap: on
line diff
--- a/mod_vjud/mod_vjud.lua	Sat Feb 01 04:42:30 2014 +0500
+++ b/mod_vjud/mod_vjud.lua	Sun Feb 02 18:12:42 2014 +0100
@@ -12,15 +12,17 @@
 local st = require "util.stanza";
 local template = require "util.template";
 
+local instructions = module:get_option_string("vjud_instructions", "Fill in one or more fields to search for any matching Jabber users.");
+
 local get_reply = template[[
 <query xmlns="jabber:iq:search">
-  <instructions>Fill in one or more fields to search for any matching Jabber users.</instructions>
+  <instructions>{instructions}</instructions>
   <first/>
   <last/>
   <nick/>
   <email/>
 </query>
-]].apply({});
+]].apply({ instructions = instructions });
 local item_template = template[[
 <item xmlns="jabber:iq:search" jid="{jid}">
   <first>{first}</first>