aboutsummaryrefslogtreecommitdiffstats
path: root/util/pubsub.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-02-21 10:36:37 +0100
committerKim Alvefur <zash@zash.se>2015-02-21 10:36:37 +0100
commit3015aac8bcb38ed2d00b8f5205bd54d82b96e71a (patch)
treef7609b77dfead0a8d6994597c5799196676080bd /util/pubsub.lua
parent2b0b78b8b0210906d14f52f70fffefac2a744dba (diff)
downloadprosody-3015aac8bcb38ed2d00b8f5205bd54d82b96e71a.tar.gz
prosody-3015aac8bcb38ed2d00b8f5205bd54d82b96e71a.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.lua8
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;
+};