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

Support multiple sessions per nick in muc_online_users, relevant for max_user_conferences (EJAB-305)

This commit is contained in:
Badlop 2011-08-23 21:53:41 +02:00
parent 9a190f3bc4
commit 84486dcb2c
2 changed files with 5 additions and 4 deletions

View File

@ -3811,23 +3811,23 @@ add_to_log(Type, Data, StateData) ->
%% Users number checking
tab_add_online_user(JID, StateData) ->
{LUser, LServer, _} = jlib:jid_tolower(JID),
{LUser, LServer, LResource} = jlib:jid_tolower(JID),
US = {LUser, LServer},
Room = StateData#state.room,
Host = StateData#state.host,
catch ets:insert(
muc_online_users,
#muc_online_users{us = US, room = Room, host = Host}).
#muc_online_users{us = US, resource = LResource, room = Room, host = Host}).
tab_remove_online_user(JID, StateData) ->
{LUser, LServer, _} = jlib:jid_tolower(JID),
{LUser, LServer, LResource} = jlib:jid_tolower(JID),
US = {LUser, LServer},
Room = StateData#state.room,
Host = StateData#state.host,
catch ets:delete_object(
muc_online_users,
#muc_online_users{us = US, room = Room, host = Host}).
#muc_online_users{us = US, resource = LResource, room = Room, host = Host}).
tab_count_user(JID) ->
{LUser, LServer, _} = jlib:jid_tolower(JID),

View File

@ -81,5 +81,6 @@
room_queue = queue:new()}).
-record(muc_online_users, {us,
resource,
room,
host}).