25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-13 15:16:49 +02:00

* src/ejabberd_auth_anonymous.erl: Added anonymous_purge_hook

(thanks to Christophe Romain and Mickael Remond)
* src/mod_offline.erl: Likewise
* src/mod_offline_odbc.erl: Likewise
* src/mod_roster.erl: Likewise
* src/mod_roster_odbc.erl: Likewise

SVN Revision: 765
This commit is contained in:
Alexey Shchepin 2007-05-12 16:28:34 +00:00
parent 737bb8888a
commit a10923c197
6 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,12 @@
2007-05-12 Alexey Shchepin <alexey@sevcom.net>
* src/ejabberd_auth_anonymous.erl: Added anonymous_purge_hook
(thanks to Christophe Romain and Mickael Remond)
* src/mod_offline.erl: Likewise
* src/mod_offline_odbc.erl: Likewise
* src/mod_roster.erl: Likewise
* src/mod_roster_odbc.erl: Likewise
2007-05-09 Alexey Shchepin <alexey@sevcom.net>
* src/mod_muc/mod_muc.erl: Bugfix

View File

@ -136,6 +136,7 @@ register_connection(SID, #jid{luser = LUser, lserver = LServer}) ->
%% Remove an anonymous user from the anonymous users table
unregister_connection(SID, #jid{luser = LUser, lserver = LServer}) ->
ejabberd_hooks:run(anonymous_purge_hook, jlib:nameprep(LServer), [LUser, LServer]),
remove_connection(SID, LUser, LServer).
%% ---------------------------------

View File

@ -41,6 +41,8 @@ start(Host, _Opts) ->
?MODULE, pop_offline_messages, 50),
ejabberd_hooks:add(remove_user, Host,
?MODULE, remove_user, 50),
ejabberd_hooks:add(anonymous_purge_hook, Host,
?MODULE, remove_user, 50),
register(gen_mod:get_module_proc(Host, ?PROCNAME),
spawn(?MODULE, init, [])).
@ -85,6 +87,8 @@ stop(Host) ->
?MODULE, pop_offline_messages, 50),
ejabberd_hooks:delete(remove_user, Host,
?MODULE, remove_user, 50),
ejabberd_hooks:delete(anonymous_purge_hook, Host,
?MODULE, remove_user, 50),
Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
exit(whereis(Proc), stop),
{wait, Proc}.

View File

@ -32,6 +32,8 @@ start(Host, _Opts) ->
?MODULE, pop_offline_messages, 50),
ejabberd_hooks:add(remove_user, Host,
?MODULE, remove_user, 50),
ejabberd_hooks:add(anonymous_purge_hook, Host,
?MODULE, remove_user, 50),
register(gen_mod:get_module_proc(Host, ?PROCNAME),
spawn(?MODULE, init, [Host])).
@ -94,6 +96,8 @@ stop(Host) ->
?MODULE, pop_offline_messages, 50),
ejabberd_hooks:delete(remove_user, Host,
?MODULE, remove_user, 50),
ejabberd_hooks:delete(anonymous_purge_hook, Host,
?MODULE, remove_user, 50),
Proc = gen_mod:get_module_proc(Host, ?PROCNAME),
exit(whereis(Proc), stop),
ok.

View File

@ -47,6 +47,8 @@ start(Host, Opts) ->
?MODULE, get_jid_info, 50),
ejabberd_hooks:add(remove_user, Host,
?MODULE, remove_user, 50),
ejabberd_hooks:add(anonymous_purge_hook, Host,
?MODULE, remove_user, 50),
ejabberd_hooks:add(resend_subscription_requests_hook, Host,
?MODULE, get_in_pending_subscriptions, 50),
gen_iq_handler:add_iq_handler(ejabberd_sm, Host, ?NS_ROSTER,
@ -65,6 +67,8 @@ stop(Host) ->
?MODULE, get_jid_info, 50),
ejabberd_hooks:delete(remove_user, Host,
?MODULE, remove_user, 50),
ejabberd_hooks:delete(anonymous_purge_hook, Host,
?MODULE, remove_user, 50),
ejabberd_hooks:delete(resend_subscription_requests_hook, Host,
?MODULE, get_in_pending_subscriptions, 50),
gen_iq_handler:remove_iq_handler(ejabberd_sm, Host, ?NS_ROSTER).

View File

@ -41,6 +41,8 @@ start(Host, Opts) ->
?MODULE, get_jid_info, 50),
ejabberd_hooks:add(remove_user, Host,
?MODULE, remove_user, 50),
ejabberd_hooks:add(anonymous_purge_hook, Host,
?MODULE, remove_user, 50),
ejabberd_hooks:add(resend_subscription_requests_hook, Host,
?MODULE, get_in_pending_subscriptions, 50),
gen_iq_handler:add_iq_handler(ejabberd_sm, Host, ?NS_ROSTER,
@ -59,6 +61,8 @@ stop(Host) ->
?MODULE, get_jid_info, 50),
ejabberd_hooks:delete(remove_user, Host,
?MODULE, remove_user, 50),
ejabberd_hooks:delete(anonymous_purge_hook, Host,
?MODULE, remove_user, 50),
ejabberd_hooks:delete(resend_subscription_requests_hook, Host,
?MODULE, get_in_pending_subscriptions, 50),
gen_iq_handler:remove_iq_handler(ejabberd_sm, Host, ?NS_ROSTER).