comparison 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
parents 4939788a47ea
children 5d49dc72b732
comparison
equal deleted inserted replaced
1295:dfe1818962f5 1296:b1a92a87309c
10 local s_find = string.find; 10 local s_find = string.find;
11 11
12 local st = require "util.stanza"; 12 local st = require "util.stanza";
13 local template = require "util.template"; 13 local template = require "util.template";
14 14
15 local instructions = module:get_option_string("vjud_instructions", "Fill in one or more fields to search for any matching Jabber users.");
16
15 local get_reply = template[[ 17 local get_reply = template[[
16 <query xmlns="jabber:iq:search"> 18 <query xmlns="jabber:iq:search">
17 <instructions>Fill in one or more fields to search for any matching Jabber users.</instructions> 19 <instructions>{instructions}</instructions>
18 <first/> 20 <first/>
19 <last/> 21 <last/>
20 <nick/> 22 <nick/>
21 <email/> 23 <email/>
22 </query> 24 </query>
23 ]].apply({}); 25 ]].apply({ instructions = instructions });
24 local item_template = template[[ 26 local item_template = template[[
25 <item xmlns="jabber:iq:search" jid="{jid}"> 27 <item xmlns="jabber:iq:search" jid="{jid}">
26 <first>{first}</first> 28 <first>{first}</first>
27 <last>{last}</last> 29 <last>{last}</last>
28 <nick>{nick}</nick> 30 <nick>{nick}</nick>