diff options
author | Kim Alvefur <zash@zash.se> | 2015-02-21 10:36:37 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2015-02-21 10:36:37 +0100 |
commit | eaa823a5971bfd2e9cb38dd8f30fefee2da95c2e (patch) | |
tree | f7609b77dfead0a8d6994597c5799196676080bd /util/pubsub.lua | |
parent | b49513cdeb2bb123625fb87f53a04d42b7eb6fb2 (diff) | |
download | prosody-eaa823a5971bfd2e9cb38dd8f30fefee2da95c2e.tar.gz prosody-eaa823a5971bfd2e9cb38dd8f30fefee2da95c2e.zip |
util.*: Remove use of module() function, make all module functions local and return them in a table at the end
Diffstat (limited to 'util/pubsub.lua')
-rw-r--r-- | util/pubsub.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/pubsub.lua b/util/pubsub.lua index c15a41d7..6d12690a 100644 --- a/util/pubsub.lua +++ b/util/pubsub.lua @@ -1,8 +1,6 @@ local events = require "util.events"; local t_remove = table.remove; -module("pubsub", package.seeall); - local service = {}; local service_mt = { __index = service }; @@ -15,7 +13,7 @@ local default_node_config = { __index = { ["pubsub#max_items"] = "20"; } }; -function new(config) +local function new(config) config = config or {}; return setmetatable({ config = setmetatable(config, default_config); @@ -442,4 +440,6 @@ function service:set_node_config(node, actor, new_config) return true; end -return _M; +return { + new = new; +}; |