Software /
code /
prosody
Comparison
plugins/mod_disco.lua @ 7977:01d6298de991
plugins/various: Use type-specific config API
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 16 Mar 2017 20:46:06 +0100 |
parent | 7787:200f1f6306a7 |
child | 8003:15973ade9a11 |
comparison
equal
deleted
inserted
replaced
7976:2a7ef5fcaa77 | 7977:01d6298de991 |
---|---|
11 local jid_split = require "util.jid".split; | 11 local jid_split = require "util.jid".split; |
12 local jid_bare = require "util.jid".bare; | 12 local jid_bare = require "util.jid".bare; |
13 local st = require "util.stanza" | 13 local st = require "util.stanza" |
14 local calculate_hash = require "util.caps".calculate_hash; | 14 local calculate_hash = require "util.caps".calculate_hash; |
15 | 15 |
16 local disco_items = module:get_option("disco_items") or {}; | 16 local disco_items = module:get_option_array("disco_items", {}) |
17 do -- validate disco_items | 17 do -- validate disco_items |
18 for _, item in ipairs(disco_items) do | 18 for _, item in ipairs(disco_items) do |
19 local err; | 19 local err; |
20 if type(item) ~= "table" then | 20 if type(item) ~= "table" then |
21 err = "item is not a table"; | 21 err = "item is not a table"; |