25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-26 16:26:24 +01:00

Host argument for ejabberd_hooks's functions must be in binary() format.

SVN Revision: 1932
This commit is contained in:
Pablo Polvorin 2009-03-01 19:03:35 +00:00
parent 19d27258d9
commit 3336d66fc4
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2009-03-01 Pablo Polvorin <pablo.polvorin@process-one.net>
* src/ejabberd_auth_anonymous.erl: Host argument for ejabberd_hooks's
functions must be in binary() format.
2009-02-28 Badlop <badlop@process-one.net>
* src/mod_pubsub/node_default.erl: Fix that non-subscriber could

View File

@ -65,14 +65,15 @@
%% Register to login / logout events.
start(Host) when is_list(Host) ->
HostB = list_to_binary(Host),
%% TODO: Check cluster mode
mnesia:create_table(anonymous, [{ram_copies, [node()]},
{type, bag},
{attributes, record_info(fields, anonymous)}]),
%% The hooks are needed to add / remove users from the anonymous tables
ejabberd_hooks:add(sm_register_connection_hook, Host,
ejabberd_hooks:add(sm_register_connection_hook, HostB,
?MODULE, register_connection, 100),
ejabberd_hooks:add(sm_remove_connection_hook, Host,
ejabberd_hooks:add(sm_remove_connection_hook, HostB,
?MODULE, unregister_connection, 100),
ok.