mod_statsdx: Fix user registration counters

Closes #82.
This commit is contained in:
Holger Weiss 2015-03-10 01:38:33 +01:00
parent ac36d6c6dc
commit bc7bff10bd
1 changed files with 10 additions and 8 deletions

View File

@ -212,15 +212,17 @@ finish_stats(Host) ->
%%%================================== %%%==================================
%%%% Hooks Handlers %%%% Hooks Handlers
register_user(_User, Server) -> register_user(_User, Host) ->
Table = table_name(Server), TableHost = table_name(Host),
ets:update_counter(Table, {register_user, Server}, 1), TableServer = table_name("server"),
ets:update_counter(Table, {register_user, server}, 1). ets:update_counter(TableHost, {register_user, Host}, 1),
ets:update_counter(TableServer, {register_user, server}, 1).
remove_user(_User, Server) -> remove_user(_User, Host) ->
Table = table_name(Server), TableHost = table_name(Host),
ets:update_counter(Table, {remove_user, Server}, 1), TableServer = table_name("server"),
ets:update_counter(Table, {remove_user, server}, 1). ets:update_counter(TableHost, {remove_user, Host}, 1),
ets:update_counter(TableServer, {remove_user, server}, 1).
user_send_packet(FromJID, ToJID, NewEl) -> user_send_packet(FromJID, ToJID, NewEl) ->
%% Registrarse para tramitar Host/mod_stats2file %% Registrarse para tramitar Host/mod_stats2file