aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristophe Romain <christophe.romain@process-one.net>2008-04-28 13:02:07 +0000
committerChristophe Romain <christophe.romain@process-one.net>2008-04-28 13:02:07 +0000
commitedf1ed5c87abcff4f633f05e01a1d7a9f5a3950b (patch)
tree5938dc80c356d57480b0da8e5e88466ce5f2f84e /src
parent* src/mod_muc/mod_muc_room.erl: Fixed room shaper processing (diff)
remove unused served_hosts option
SVN Revision: 1306
Diffstat (limited to 'src')
-rw-r--r--src/mod_pubsub/mod_pubsub.erl18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl
index 134629c27..b1a9639bb 100644
--- a/src/mod_pubsub/mod_pubsub.erl
+++ b/src/mod_pubsub/mod_pubsub.erl
@@ -151,9 +151,8 @@ stop(Host) ->
%% Description: Initiates the server
%%--------------------------------------------------------------------
init([ServerHost, Opts]) ->
- ?INFO_MSG("pubsub init ~p ~p",[ServerHost,Opts]),
+ ?DEBUG("pubsub init ~p ~p",[ServerHost,Opts]),
Host = gen_mod:get_opt_host(ServerHost, Opts, "pubsub.@HOST@"),
- ServedHosts = gen_mod:get_opt(served_hosts, Opts, []),
Access = gen_mod:get_opt(access_createnode, Opts, all),
mod_disco:register_feature(ServerHost, ?NS_PUBSUB),
ejabberd_hooks:add(disco_local_identity, ServerHost, ?MODULE, disco_local_identity, 75),
@@ -183,7 +182,7 @@ init([ServerHost, Opts]) ->
ets:new(gen_mod:get_module_proc(ServerHost, pubsub_state), [set, named_table]),
ets:insert(gen_mod:get_module_proc(ServerHost, pubsub_state), {nodetree, NodeTree}),
ets:insert(gen_mod:get_module_proc(ServerHost, pubsub_state), {plugins, Plugins}),
- init_nodes(Host, ServerHost, ServedHosts),
+ init_nodes(Host, ServerHost),
{ok, #state{host = Host,
server_host = ServerHost,
access = Access,
@@ -206,11 +205,11 @@ init([ServerHost, Opts]) ->
init_plugins(Host, ServerHost, Opts) ->
TreePlugin = list_to_atom(?TREE_PREFIX ++
gen_mod:get_opt(nodetree, Opts, ?STDTREE)),
- ?INFO_MSG("** tree plugin is ~p",[TreePlugin]),
+ ?DEBUG("** tree plugin is ~p",[TreePlugin]),
TreePlugin:init(Host, ServerHost, Opts),
Plugins = lists:usort(gen_mod:get_opt(plugins, Opts, []) ++ [?STDNODE]),
lists:foreach(fun(Name) ->
- ?INFO_MSG("** init ~s plugin",[Name]),
+ ?DEBUG("** init ~s plugin",[Name]),
Plugin = list_to_atom(?PLUGIN_PREFIX ++ Name),
Plugin:init(Host, ServerHost, Opts)
end, Plugins),
@@ -218,21 +217,18 @@ init_plugins(Host, ServerHost, Opts) ->
terminate_plugins(Host, ServerHost, Plugins, TreePlugin) ->
lists:foreach(fun(Name) ->
- ?INFO_MSG("** terminate ~s plugin",[Name]),
+ ?DEBUG("** terminate ~s plugin",[Name]),
Plugin = list_to_atom(?PLUGIN_PREFIX++Name),
Plugin:terminate(Host, ServerHost)
end, Plugins),
TreePlugin:terminate(Host, ServerHost),
ok.
-init_nodes(Host, ServerHost, ServedHosts) ->
+init_nodes(Host, ServerHost) ->
create_node(Host, ServerHost, ["pubsub"], service_jid(Host), ?STDNODE),
create_node(Host, ServerHost, ["pubsub", "nodes"], service_jid(Host), ?STDNODE),
create_node(Host, ServerHost, ["home"], service_jid(Host), ?STDNODE),
- lists:foreach(
- fun(H) ->
- create_node(Host, ServerHost, ["home", H], service_jid(Host), ?STDNODE)
- end, lists:usort([ServerHost | ServedHosts])),
+ create_node(Host, ServerHost, ["home", ServerHost], service_jid(Host), ?STDNODE),
ok.
update_database(Host) ->