X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=util%2Fcaps.lua;h=cd5ff9c0efdddfb6dd8fbb663a67e4464ec5acdd;hb=a8958cbe5ebad3abc12efa7a76c8aedac8f21389;hp=4723b912942e6606ccf59679e087c87c09b7597c;hpb=04bc83bc4d2668a95b4538def5b51cf8611ae111;p=prosody.git diff --git a/util/caps.lua b/util/caps.lua index 4723b912..cd5ff9c0 100644 --- a/util/caps.lua +++ b/util/caps.lua @@ -12,9 +12,9 @@ local sha1 = require "util.hashes".sha1; local t_insert, t_sort, t_concat = table.insert, table.sort, table.concat; local ipairs = ipairs; -module "caps" +local _ENV = nil; -function calculate_hash(disco_info) +local function calculate_hash(disco_info) local identities, features, extensions = {}, {}, {}; for _, tag in ipairs(disco_info) do if tag.name == "identity" then @@ -58,4 +58,6 @@ function calculate_hash(disco_info) return ver, S; end -return _M; +return { + calculate_hash = calculate_hash; +};