mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-14 22:00:16 +02:00
API renaming : lnode -> prep_node
SVN Revision: 2125
This commit is contained in:
parent
7eb395b87d
commit
d5f2c41f26
|
@ -179,7 +179,7 @@ remove_connection(SID, LUser, LServer) when is_list(LUser), is_list(LServer) ->
|
||||||
%% @doc Register connection.
|
%% @doc Register connection.
|
||||||
|
|
||||||
register_connection(SID, JID, Info) when ?IS_JID(JID) ->
|
register_connection(SID, JID, Info) when ?IS_JID(JID) ->
|
||||||
LUser = exmpp_jid:lnode(JID),
|
LUser = exmpp_jid:prep_node(JID),
|
||||||
LServer = exmpp_jid:prep_domain(JID),
|
LServer = exmpp_jid:prep_domain(JID),
|
||||||
case proplists:get_value(auth_module, Info) of
|
case proplists:get_value(auth_module, Info) of
|
||||||
undefined ->
|
undefined ->
|
||||||
|
@ -200,7 +200,7 @@ register_connection(SID, JID, Info) when ?IS_JID(JID) ->
|
||||||
%% @doc Remove an anonymous user from the anonymous users table.
|
%% @doc Remove an anonymous user from the anonymous users table.
|
||||||
|
|
||||||
unregister_connection(SID, JID, _) when ?IS_JID(JID) ->
|
unregister_connection(SID, JID, _) when ?IS_JID(JID) ->
|
||||||
LUser = exmpp_jid:lnode(JID),
|
LUser = exmpp_jid:prep_node(JID),
|
||||||
LServer = exmpp_jid:prep_domain(JID),
|
LServer = exmpp_jid:prep_domain(JID),
|
||||||
purge_hook(anonymous_user_exist(LUser, LServer),
|
purge_hook(anonymous_user_exist(LUser, LServer),
|
||||||
LUser, LServer),
|
LUser, LServer),
|
||||||
|
|
|
@ -402,7 +402,7 @@ wait_for_auth({xmlstreamelement, El}, StateData) ->
|
||||||
{auth, _ID, set, {U, P, D, R}} ->
|
{auth, _ID, set, {U, P, D, R}} ->
|
||||||
try
|
try
|
||||||
JID = exmpp_jid:make(U, StateData#state.server, R),
|
JID = exmpp_jid:make(U, StateData#state.server, R),
|
||||||
UBinary = exmpp_jid:lnode(JID),
|
UBinary = exmpp_jid:prep_node(JID),
|
||||||
case acl:match_rule(ServerString,
|
case acl:match_rule(ServerString,
|
||||||
StateData#state.access, JID) of
|
StateData#state.access, JID) of
|
||||||
allow ->
|
allow ->
|
||||||
|
@ -1573,7 +1573,7 @@ check_privacy_route(From, StateData, FromRoute, To, Packet) ->
|
||||||
|
|
||||||
%% Check if privacy rules allow this delivery
|
%% Check if privacy rules allow this delivery
|
||||||
is_privacy_allow(From, To, Packet, PrivacyList) ->
|
is_privacy_allow(From, To, Packet, PrivacyList) ->
|
||||||
User = exmpp_jid:lnode(To),
|
User = exmpp_jid:prep_node(To),
|
||||||
Server = exmpp_jid:prep_domain(To),
|
Server = exmpp_jid:prep_domain(To),
|
||||||
allow == ejabberd_hooks:run_fold(
|
allow == ejabberd_hooks:run_fold(
|
||||||
privacy_check_packet, Server,
|
privacy_check_packet, Server,
|
||||||
|
|
|
@ -303,7 +303,7 @@ do_route(From, To, Packet) ->
|
||||||
?DEBUG("local route~n\tfrom ~p~n\tto ~p~n\tpacket ~P~n",
|
?DEBUG("local route~n\tfrom ~p~n\tto ~p~n\tpacket ~P~n",
|
||||||
[From, To, Packet, 8]),
|
[From, To, Packet, 8]),
|
||||||
|
|
||||||
LNode = exmpp_jid:lnode(To),
|
LNode = exmpp_jid:prep_node(To),
|
||||||
LResource = exmpp_jid:lresource(To),
|
LResource = exmpp_jid:lresource(To),
|
||||||
if
|
if
|
||||||
LNode /= undefined ->
|
LNode /= undefined ->
|
||||||
|
|
|
@ -159,7 +159,7 @@ get_user_resources(User, Server)
|
||||||
end.
|
end.
|
||||||
|
|
||||||
get_user_ip(JID) when ?IS_JID(JID) ->
|
get_user_ip(JID) when ?IS_JID(JID) ->
|
||||||
USR = {exmpp_jid:lnode(JID),
|
USR = {exmpp_jid:prep_node(JID),
|
||||||
exmpp_jid:prep_domain(JID),
|
exmpp_jid:prep_domain(JID),
|
||||||
exmpp_jid:lresource(JID)},
|
exmpp_jid:lresource(JID)},
|
||||||
case mnesia:dirty_index_read(session, USR, #session.usr) of
|
case mnesia:dirty_index_read(session, USR, #session.usr) of
|
||||||
|
@ -195,7 +195,7 @@ set_presence(SID, JID, Priority, Presence, Info) when ?IS_JID(JID) ->
|
||||||
set_session(SID, JID, Priority, Info),
|
set_session(SID, JID, Priority, Info),
|
||||||
ejabberd_hooks:run(set_presence_hook,
|
ejabberd_hooks:run(set_presence_hook,
|
||||||
exmpp_jid:prep_domain(JID),
|
exmpp_jid:prep_domain(JID),
|
||||||
[exmpp_jid:lnode(JID),
|
[exmpp_jid:prep_node(JID),
|
||||||
exmpp_jid:prep_domain(JID),
|
exmpp_jid:prep_domain(JID),
|
||||||
exmpp_jid:lresource(JID),
|
exmpp_jid:lresource(JID),
|
||||||
Presence]).
|
Presence]).
|
||||||
|
@ -204,7 +204,7 @@ unset_presence(SID, JID, Status, Info) when ?IS_JID(JID)->
|
||||||
set_session(SID, JID, undefined, Info),
|
set_session(SID, JID, undefined, Info),
|
||||||
ejabberd_hooks:run(unset_presence_hook,
|
ejabberd_hooks:run(unset_presence_hook,
|
||||||
exmpp_jid:prep_domain(JID),
|
exmpp_jid:prep_domain(JID),
|
||||||
[exmpp_jid:lnode(JID),
|
[exmpp_jid:prep_node(JID),
|
||||||
exmpp_jid:prep_domain(JID),
|
exmpp_jid:prep_domain(JID),
|
||||||
exmpp_jid:lresource(JID),
|
exmpp_jid:lresource(JID),
|
||||||
Status]).
|
Status]).
|
||||||
|
@ -213,13 +213,13 @@ close_session_unset_presence(SID, JID, Status) when ?IS_JID(JID) ->
|
||||||
close_session(SID, JID),
|
close_session(SID, JID),
|
||||||
ejabberd_hooks:run(unset_presence_hook,
|
ejabberd_hooks:run(unset_presence_hook,
|
||||||
exmpp_jid:prep_domain(JID),
|
exmpp_jid:prep_domain(JID),
|
||||||
[exmpp_jid:lnode(JID),
|
[exmpp_jid:prep_node(JID),
|
||||||
exmpp_jid:prep_domain(JID),
|
exmpp_jid:prep_domain(JID),
|
||||||
exmpp_jid:lresource(JID),
|
exmpp_jid:lresource(JID),
|
||||||
Status]).
|
Status]).
|
||||||
|
|
||||||
get_session_pid(JID) when ?IS_JID(JID) ->
|
get_session_pid(JID) when ?IS_JID(JID) ->
|
||||||
USR = {exmpp_jid:lnode(JID),
|
USR = {exmpp_jid:prep_node(JID),
|
||||||
exmpp_jid:prep_domain(JID),
|
exmpp_jid:prep_domain(JID),
|
||||||
exmpp_jid:lresource(JID)},
|
exmpp_jid:lresource(JID)},
|
||||||
case catch mnesia:dirty_index_read(session, USR, #session.usr) of
|
case catch mnesia:dirty_index_read(session, USR, #session.usr) of
|
||||||
|
@ -385,8 +385,8 @@ code_change(_OldVsn, State, _Extra) ->
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
set_session(SID, JID, Priority, Info) ->
|
set_session(SID, JID, Priority, Info) ->
|
||||||
US = {exmpp_jid:lnode(JID), exmpp_jid:prep_domain(JID)},
|
US = {exmpp_jid:prep_node(JID), exmpp_jid:prep_domain(JID)},
|
||||||
USR = {exmpp_jid:lnode(JID),
|
USR = {exmpp_jid:prep_node(JID),
|
||||||
exmpp_jid:prep_domain(JID),
|
exmpp_jid:prep_domain(JID),
|
||||||
exmpp_jid:lresource(JID)},
|
exmpp_jid:lresource(JID)},
|
||||||
F = fun() ->
|
F = fun() ->
|
||||||
|
@ -429,7 +429,7 @@ do_route(From, To, Packet) ->
|
||||||
roster_in_subscription,
|
roster_in_subscription,
|
||||||
exmpp_jid:prep_domain(To),
|
exmpp_jid:prep_domain(To),
|
||||||
false,
|
false,
|
||||||
[exmpp_jid:lnode(To), exmpp_jid:prep_domain(To), From, subscribe, Reason]),
|
[exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To), From, subscribe, Reason]),
|
||||||
true};
|
true};
|
||||||
'subscribed' ->
|
'subscribed' ->
|
||||||
{is_privacy_allow(From, To, Packet) andalso
|
{is_privacy_allow(From, To, Packet) andalso
|
||||||
|
@ -437,7 +437,7 @@ do_route(From, To, Packet) ->
|
||||||
roster_in_subscription,
|
roster_in_subscription,
|
||||||
exmpp_jid:prep_domain(To),
|
exmpp_jid:prep_domain(To),
|
||||||
false,
|
false,
|
||||||
[exmpp_jid:lnode(To), exmpp_jid:prep_domain(To), From, subscribed, <<>>]),
|
[exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To), From, subscribed, <<>>]),
|
||||||
true};
|
true};
|
||||||
'unsubscribe' ->
|
'unsubscribe' ->
|
||||||
{is_privacy_allow(From, To, Packet) andalso
|
{is_privacy_allow(From, To, Packet) andalso
|
||||||
|
@ -445,7 +445,7 @@ do_route(From, To, Packet) ->
|
||||||
roster_in_subscription,
|
roster_in_subscription,
|
||||||
exmpp_jid:prep_domain(To),
|
exmpp_jid:prep_domain(To),
|
||||||
false,
|
false,
|
||||||
[exmpp_jid:lnode(To), exmpp_jid:prep_domain(To), From, unsubscribe, <<>>]),
|
[exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To), From, unsubscribe, <<>>]),
|
||||||
true};
|
true};
|
||||||
'unsubscribed' ->
|
'unsubscribed' ->
|
||||||
{is_privacy_allow(From, To, Packet) andalso
|
{is_privacy_allow(From, To, Packet) andalso
|
||||||
|
@ -453,14 +453,14 @@ do_route(From, To, Packet) ->
|
||||||
roster_in_subscription,
|
roster_in_subscription,
|
||||||
exmpp_jid:prep_domain(To),
|
exmpp_jid:prep_domain(To),
|
||||||
false,
|
false,
|
||||||
[exmpp_jid:lnode(To), exmpp_jid:prep_domain(To), From, unsubscribed, <<>>]),
|
[exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To), From, unsubscribed, <<>>]),
|
||||||
true};
|
true};
|
||||||
_ ->
|
_ ->
|
||||||
{true, false}
|
{true, false}
|
||||||
end,
|
end,
|
||||||
if Pass ->
|
if Pass ->
|
||||||
PResources = get_user_present_resources(
|
PResources = get_user_present_resources(
|
||||||
exmpp_jid:lnode(To), exmpp_jid:prep_domain(To)),
|
exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To)),
|
||||||
lists:foreach(
|
lists:foreach(
|
||||||
fun({_, R}) ->
|
fun({_, R}) ->
|
||||||
do_route(
|
do_route(
|
||||||
|
@ -481,13 +481,13 @@ do_route(From, To, Packet) ->
|
||||||
do_route(From,
|
do_route(From,
|
||||||
exmpp_jid:full(To, R),
|
exmpp_jid:full(To, R),
|
||||||
Packet)
|
Packet)
|
||||||
end, get_user_resources(exmpp_jid:lnode(To),
|
end, get_user_resources(exmpp_jid:prep_node(To),
|
||||||
exmpp_jid:prep_domain(To)));
|
exmpp_jid:prep_domain(To)));
|
||||||
_ ->
|
_ ->
|
||||||
ok
|
ok
|
||||||
end;
|
end;
|
||||||
_ ->
|
_ ->
|
||||||
USR = {exmpp_jid:lnode(To),
|
USR = {exmpp_jid:prep_node(To),
|
||||||
exmpp_jid:prep_domain(To),
|
exmpp_jid:prep_domain(To),
|
||||||
exmpp_jid:lresource(To)},
|
exmpp_jid:lresource(To)},
|
||||||
case mnesia:dirty_index_read(session, USR, #session.usr) of
|
case mnesia:dirty_index_read(session, USR, #session.usr) of
|
||||||
|
@ -521,7 +521,7 @@ do_route(From, To, Packet) ->
|
||||||
%% for the target session/resource to which a stanza is addressed,
|
%% for the target session/resource to which a stanza is addressed,
|
||||||
%% or if there are no current sessions for the user.
|
%% or if there are no current sessions for the user.
|
||||||
is_privacy_allow(From, To, Packet) ->
|
is_privacy_allow(From, To, Packet) ->
|
||||||
User = exmpp_jid:lnode(To),
|
User = exmpp_jid:prep_node(To),
|
||||||
Server = exmpp_jid:prep_domain(To),
|
Server = exmpp_jid:prep_domain(To),
|
||||||
PrivacyList = ejabberd_hooks:run_fold(privacy_get_user_list, Server,
|
PrivacyList = ejabberd_hooks:run_fold(privacy_get_user_list, Server,
|
||||||
#userlist{}, [User, Server]),
|
#userlist{}, [User, Server]),
|
||||||
|
@ -530,7 +530,7 @@ is_privacy_allow(From, To, Packet) ->
|
||||||
%% Check if privacy rules allow this delivery
|
%% Check if privacy rules allow this delivery
|
||||||
%% Function copied from ejabberd_c2s.erl
|
%% Function copied from ejabberd_c2s.erl
|
||||||
is_privacy_allow(From, To, Packet, PrivacyList) ->
|
is_privacy_allow(From, To, Packet, PrivacyList) ->
|
||||||
User = exmpp_jid:lnode(To),
|
User = exmpp_jid:prep_node(To),
|
||||||
Server = exmpp_jid:prep_domain(To),
|
Server = exmpp_jid:prep_domain(To),
|
||||||
allow == ejabberd_hooks:run_fold(
|
allow == ejabberd_hooks:run_fold(
|
||||||
privacy_check_packet, Server,
|
privacy_check_packet, Server,
|
||||||
|
@ -542,7 +542,7 @@ is_privacy_allow(From, To, Packet, PrivacyList) ->
|
||||||
in]).
|
in]).
|
||||||
|
|
||||||
route_message(From, To, Packet) ->
|
route_message(From, To, Packet) ->
|
||||||
LUser = exmpp_jid:lnode(To),
|
LUser = exmpp_jid:prep_node(To),
|
||||||
LServer = exmpp_jid:prep_domain(To),
|
LServer = exmpp_jid:prep_domain(To),
|
||||||
PrioRes = get_user_present_resources(LUser, LServer),
|
PrioRes = get_user_present_resources(LUser, LServer),
|
||||||
case catch lists:max(PrioRes) of
|
case catch lists:max(PrioRes) of
|
||||||
|
@ -635,7 +635,7 @@ check_for_sessions_to_replace(JID) ->
|
||||||
check_max_sessions(JID).
|
check_max_sessions(JID).
|
||||||
|
|
||||||
check_existing_resources(JID) ->
|
check_existing_resources(JID) ->
|
||||||
USR = {exmpp_jid:lnode(JID),
|
USR = {exmpp_jid:prep_node(JID),
|
||||||
exmpp_jid:prep_domain(JID),
|
exmpp_jid:prep_domain(JID),
|
||||||
exmpp_jid:lresource(JID)},
|
exmpp_jid:lresource(JID)},
|
||||||
%% A connection exist with the same resource. We replace it:
|
%% A connection exist with the same resource. We replace it:
|
||||||
|
@ -659,7 +659,7 @@ check_max_sessions(JID) ->
|
||||||
SIDs = mnesia:dirty_select(
|
SIDs = mnesia:dirty_select(
|
||||||
session,
|
session,
|
||||||
[{#session{sid = '$1',
|
[{#session{sid = '$1',
|
||||||
us = {exmpp_jid:lnode(JID), exmpp_jid:prep_domain(JID)},
|
us = {exmpp_jid:prep_node(JID), exmpp_jid:prep_domain(JID)},
|
||||||
_ = '_'}, [],
|
_ = '_'}, [],
|
||||||
['$1']}]),
|
['$1']}]),
|
||||||
MaxSessions = get_max_user_sessions(JID),
|
MaxSessions = get_max_user_sessions(JID),
|
||||||
|
|
|
@ -60,7 +60,7 @@ end,
|
||||||
gen_server:start_link({local, ?MODULE}, ?MODULE, Opts, []).
|
gen_server:start_link({local, ?MODULE}, ?MODULE, Opts, []).
|
||||||
|
|
||||||
process_command(From, To, Packet) ->
|
process_command(From, To, Packet) ->
|
||||||
case {exmpp_jid:lnode(To), exmpp_jid:lresource(To) } of
|
case {exmpp_jid:prep_node(To), exmpp_jid:lresource(To) } of
|
||||||
{undefined, <<"watchdog">>} ->
|
{undefined, <<"watchdog">>} ->
|
||||||
case Packet#xmlel.name of
|
case Packet#xmlel.name of
|
||||||
'message' ->
|
'message' ->
|
||||||
|
@ -217,7 +217,7 @@ get_admin_jids() ->
|
||||||
fun(S) ->
|
fun(S) ->
|
||||||
try
|
try
|
||||||
JID = exmpp_jid:parse(S),
|
JID = exmpp_jid:parse(S),
|
||||||
[{exmpp_jid:lnode(JID),
|
[{exmpp_jid:prep_node(JID),
|
||||||
exmpp_jid:prep_domain(JID),
|
exmpp_jid:prep_domain(JID),
|
||||||
exmpp_jid:lresource(JID)}]
|
exmpp_jid:lresource(JID)}]
|
||||||
catch
|
catch
|
||||||
|
|
|
@ -382,7 +382,7 @@ short_bare_jid(JID) ->
|
||||||
short_jid(exmpp_jid:bare(JID)).
|
short_jid(exmpp_jid:bare(JID)).
|
||||||
|
|
||||||
short_prepd_jid(JID) ->
|
short_prepd_jid(JID) ->
|
||||||
{exmpp_jid:lnode(JID),
|
{exmpp_jid:prep_node(JID),
|
||||||
exmpp_jid:prep_domain(JID),
|
exmpp_jid:prep_domain(JID),
|
||||||
exmpp_jid:lresource(JID)}.
|
exmpp_jid:lresource(JID)}.
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ stop(Host) ->
|
||||||
|
|
||||||
%% Announcing via messages to a custom resource
|
%% Announcing via messages to a custom resource
|
||||||
announce(From, To, Packet) ->
|
announce(From, To, Packet) ->
|
||||||
case {exmpp_jid:lnode(To), exmpp_jid:lresource(To)} of
|
case {exmpp_jid:prep_node(To), exmpp_jid:lresource(To)} of
|
||||||
{undefined, Res} ->
|
{undefined, Res} ->
|
||||||
Name = Packet#xmlel.name,
|
Name = Packet#xmlel.name,
|
||||||
Proc = gen_mod:get_module_proc(exmpp_jid:prep_domain_as_list(To), ?PROCNAME),
|
Proc = gen_mod:get_module_proc(exmpp_jid:prep_domain_as_list(To), ?PROCNAME),
|
||||||
|
|
|
@ -314,7 +314,7 @@ handle_cast({note_caps, From,
|
||||||
%% XXX: this leads to race conditions where ejabberd will send
|
%% XXX: this leads to race conditions where ejabberd will send
|
||||||
%% lots of caps disco requests.
|
%% lots of caps disco requests.
|
||||||
%#jid{node = U, domain = S, resource = R} = From,
|
%#jid{node = U, domain = S, resource = R} = From,
|
||||||
U = exmpp_jid:lnode(From),
|
U = exmpp_jid:prep_node(From),
|
||||||
S = exmpp_jid:prep_domain(From),
|
S = exmpp_jid:prep_domain(From),
|
||||||
R = exmpp_jid:resource(From),
|
R = exmpp_jid:resource(From),
|
||||||
BJID = exmpp_jid:jid_to_binary(From),
|
BJID = exmpp_jid:jid_to_binary(From),
|
||||||
|
|
|
@ -298,7 +298,7 @@ get_sm_items(Acc, From, To, Node, Lang) ->
|
||||||
end.
|
end.
|
||||||
|
|
||||||
get_user_resources(BareJID) ->
|
get_user_resources(BareJID) ->
|
||||||
Rs = ejabberd_sm:get_user_resources(exmpp_jid:lnode(BareJID),
|
Rs = ejabberd_sm:get_user_resources(exmpp_jid:prep_node(BareJID),
|
||||||
exmpp_jid:prep_domain(BareJID)),
|
exmpp_jid:prep_domain(BareJID)),
|
||||||
lists:map(fun(R) ->
|
lists:map(fun(R) ->
|
||||||
#xmlel{ns = ?NS_DISCO_ITEMS, name = 'item', attrs =
|
#xmlel{ns = ?NS_DISCO_ITEMS, name = 'item', attrs =
|
||||||
|
@ -306,7 +306,7 @@ get_user_resources(BareJID) ->
|
||||||
exmpp_jid:jid_to_binary(
|
exmpp_jid:jid_to_binary(
|
||||||
exmpp_jid:full(BareJID, R))),
|
exmpp_jid:full(BareJID, R))),
|
||||||
?XMLATTR('name',
|
?XMLATTR('name',
|
||||||
exmpp_jid:lnode(BareJID))]}
|
exmpp_jid:prep_node(BareJID))]}
|
||||||
end, lists:sort(Rs)).
|
end, lists:sort(Rs)).
|
||||||
|
|
||||||
%%%-----------------------------------------------------------------------
|
%%%-----------------------------------------------------------------------
|
||||||
|
@ -1640,7 +1640,7 @@ set_form(From, Host, ?NS_ADMINL("get-user-lastlogin"), Lang, XData) ->
|
||||||
%% Code copied from web/ejabberd_web_admin.erl
|
%% Code copied from web/ejabberd_web_admin.erl
|
||||||
%% TODO: Update time format to XEP-0202: Entity Time
|
%% TODO: Update time format to XEP-0202: Entity Time
|
||||||
FLast =
|
FLast =
|
||||||
case ejabberd_sm:get_user_resources(exmpp_jid:lnode(User),
|
case ejabberd_sm:get_user_resources(exmpp_jid:prep_node(User),
|
||||||
exmpp_jid:prep_domain(Server)) of
|
exmpp_jid:prep_domain(Server)) of
|
||||||
[] ->
|
[] ->
|
||||||
_US = {User, Server},
|
_US = {User, Server},
|
||||||
|
@ -1675,7 +1675,7 @@ set_form(From, Host, ?NS_ADMINL("user-stats"), Lang, XData) ->
|
||||||
Server = exmpp_jid:prep_domain_as_list(JID),
|
Server = exmpp_jid:prep_domain_as_list(JID),
|
||||||
true = (Server == Host) orelse (get_permission_level(From) == global),
|
true = (Server == Host) orelse (get_permission_level(From) == global),
|
||||||
|
|
||||||
Resources = ejabberd_sm:get_user_resources(exmpp_jid:lnode(JID),
|
Resources = ejabberd_sm:get_user_resources(exmpp_jid:prep_node(JID),
|
||||||
exmpp_jid:prep_domain(JID)),
|
exmpp_jid:prep_domain(JID)),
|
||||||
IPs1 = [ejabberd_sm:get_user_ip(exmpp_jid:full(JID,Resource))
|
IPs1 = [ejabberd_sm:get_user_ip(exmpp_jid:full(JID,Resource))
|
||||||
|| Resource <- Resources],
|
|| Resource <- Resources],
|
||||||
|
|
|
@ -392,13 +392,13 @@ get_sm_features(Acc, _From, _To, _Node, _Lang) ->
|
||||||
|
|
||||||
|
|
||||||
get_user_resources(JID) ->
|
get_user_resources(JID) ->
|
||||||
Rs = ejabberd_sm:get_user_resources(exmpp_jid:lnode(JID),
|
Rs = ejabberd_sm:get_user_resources(exmpp_jid:prep_node(JID),
|
||||||
exmpp_jid:prep_domain(JID)),
|
exmpp_jid:prep_domain(JID)),
|
||||||
lists:map(fun(R) ->
|
lists:map(fun(R) ->
|
||||||
#xmlel{ns = ?NS_DISCO_ITEMS, name = 'item', attrs = [
|
#xmlel{ns = ?NS_DISCO_ITEMS, name = 'item', attrs = [
|
||||||
?XMLATTR('jid',
|
?XMLATTR('jid',
|
||||||
exmpp_jid:jid_to_binary(exmpp_jid:full(JID, R))),
|
exmpp_jid:jid_to_binary(exmpp_jid:full(JID, R))),
|
||||||
?XMLATTR('name', exmpp_jid:lnode(JID))
|
?XMLATTR('name', exmpp_jid:prep_node(JID))
|
||||||
]}
|
]}
|
||||||
end, lists:sort(Rs)).
|
end, lists:sort(Rs)).
|
||||||
|
|
||||||
|
|
|
@ -106,22 +106,22 @@ process_sm_iq(From, To, #iq{type = get} = IQ_Rec) ->
|
||||||
{Subscription, _Groups} =
|
{Subscription, _Groups} =
|
||||||
ejabberd_hooks:run_fold(
|
ejabberd_hooks:run_fold(
|
||||||
roster_get_jid_info, exmpp_jid:prep_domain(To),
|
roster_get_jid_info, exmpp_jid:prep_domain(To),
|
||||||
{none, []}, [exmpp_jid:lnode(To), exmpp_jid:prep_domain(To), From]),
|
{none, []}, [exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To), From]),
|
||||||
if
|
if
|
||||||
(Subscription == both) or (Subscription == from) ->
|
(Subscription == both) or (Subscription == from) ->
|
||||||
UserListRecord = ejabberd_hooks:run_fold(
|
UserListRecord = ejabberd_hooks:run_fold(
|
||||||
privacy_get_user_list, exmpp_jid:prep_domain(To),
|
privacy_get_user_list, exmpp_jid:prep_domain(To),
|
||||||
#userlist{},
|
#userlist{},
|
||||||
[exmpp_jid:lnode(To), exmpp_jid:prep_domain(To)]),
|
[exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To)]),
|
||||||
case ejabberd_hooks:run_fold(
|
case ejabberd_hooks:run_fold(
|
||||||
privacy_check_packet, exmpp_jid:prep_domain(To),
|
privacy_check_packet, exmpp_jid:prep_domain(To),
|
||||||
allow,
|
allow,
|
||||||
[exmpp_jid:lnode(To), exmpp_jid:prep_domain(To), UserListRecord,
|
[exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To), UserListRecord,
|
||||||
{From, To,
|
{From, To,
|
||||||
exmpp_presence:available()},
|
exmpp_presence:available()},
|
||||||
out]) of
|
out]) of
|
||||||
allow ->
|
allow ->
|
||||||
get_last(IQ_Rec, exmpp_jid:lnode(To), exmpp_jid:prep_domain(To));
|
get_last(IQ_Rec, exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To));
|
||||||
deny ->
|
deny ->
|
||||||
exmpp_iq:error(IQ_Rec, 'not-allowed')
|
exmpp_iq:error(IQ_Rec, 'not-allowed')
|
||||||
end;
|
end;
|
||||||
|
|
|
@ -100,17 +100,17 @@ process_sm_iq(From, To, #iq{type = get} = IQ_Rec) ->
|
||||||
{Subscription, _Groups} =
|
{Subscription, _Groups} =
|
||||||
ejabberd_hooks:run_fold(
|
ejabberd_hooks:run_fold(
|
||||||
roster_get_jid_info, exmpp_jid:prep_domain(To),
|
roster_get_jid_info, exmpp_jid:prep_domain(To),
|
||||||
{none, []}, [exmpp_jid:lnode(To), exmpp_jid:prep_domain(To), From]),
|
{none, []}, [exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To), From]),
|
||||||
if
|
if
|
||||||
(Subscription == both) or (Subscription == from) ->
|
(Subscription == both) or (Subscription == from) ->
|
||||||
UserListRecord = ejabberd_hooks:run_fold(
|
UserListRecord = ejabberd_hooks:run_fold(
|
||||||
privacy_get_user_list, exmpp_jid:prep_domain(To),
|
privacy_get_user_list, exmpp_jid:prep_domain(To),
|
||||||
#userlist{},
|
#userlist{},
|
||||||
[exmpp_jid:lnode(To), exmpp_jid:prep_domain(To)]),
|
[exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To)]),
|
||||||
case ejabberd_hooks:run_fold(
|
case ejabberd_hooks:run_fold(
|
||||||
privacy_check_packet, exmpp_jid:prep_domain(To),
|
privacy_check_packet, exmpp_jid:prep_domain(To),
|
||||||
allow,
|
allow,
|
||||||
[exmpp_jid:lnode(To), exmpp_jid:prep_domain(To), UserListRecord,
|
[exmpp_jid:prep_node(To), exmpp_jid:prep_domain(To), UserListRecord,
|
||||||
{From, To,
|
{From, To,
|
||||||
exmpp_presence:available()},
|
exmpp_presence:available()},
|
||||||
out]) of
|
out]) of
|
||||||
|
|
|
@ -146,7 +146,7 @@ process_iq_disco_items(Host, From, To, #iq{lang = Lang} = IQ) when is_binary(Hos
|
||||||
can_use_nick(_Host, _JID, <<>>) ->
|
can_use_nick(_Host, _JID, <<>>) ->
|
||||||
false;
|
false;
|
||||||
can_use_nick(Host, JID, Nick) when is_binary(Host), is_binary(Nick) ->
|
can_use_nick(Host, JID, Nick) when is_binary(Host), is_binary(Nick) ->
|
||||||
LUS = {exmpp_jid:lnode(JID), exmpp_jid:prep_domain(JID)},
|
LUS = {exmpp_jid:prep_node(JID), exmpp_jid:prep_domain(JID)},
|
||||||
case catch mnesia:dirty_select(
|
case catch mnesia:dirty_select(
|
||||||
muc_registered,
|
muc_registered,
|
||||||
[{#muc_registered{us_host = '$1',
|
[{#muc_registered{us_host = '$1',
|
||||||
|
@ -344,7 +344,7 @@ do_route(Host, ServerHost, Access, HistorySize, RoomShaper,
|
||||||
do_route1(Host, ServerHost, Access, HistorySize, RoomShaper,
|
do_route1(Host, ServerHost, Access, HistorySize, RoomShaper,
|
||||||
From, To, Packet, DefRoomOpts) ->
|
From, To, Packet, DefRoomOpts) ->
|
||||||
{_AccessRoute, AccessCreate, AccessAdmin, _AccessPersistent} = Access,
|
{_AccessRoute, AccessCreate, AccessAdmin, _AccessPersistent} = Access,
|
||||||
Room = exmpp_jid:lnode(To),
|
Room = exmpp_jid:prep_node(To),
|
||||||
Nick = exmpp_jid:lresource(To),
|
Nick = exmpp_jid:lresource(To),
|
||||||
#xmlel{name = Name} = Packet,
|
#xmlel{name = Name} = Packet,
|
||||||
case Room of
|
case Room of
|
||||||
|
@ -661,7 +661,7 @@ flush() ->
|
||||||
children = [#xmlcdata{cdata = Val}]}]}).
|
children = [#xmlcdata{cdata = Val}]}]}).
|
||||||
|
|
||||||
iq_get_register_info(Host, From, Lang) ->
|
iq_get_register_info(Host, From, Lang) ->
|
||||||
LUser = exmpp_jid:lnode(From),
|
LUser = exmpp_jid:prep_node(From),
|
||||||
LServer = exmpp_jid:prep_domain(From),
|
LServer = exmpp_jid:prep_domain(From),
|
||||||
LUS = {LUser, LServer},
|
LUS = {LUser, LServer},
|
||||||
{Nick, Registered} =
|
{Nick, Registered} =
|
||||||
|
@ -691,7 +691,7 @@ iq_get_register_info(Host, From, Lang) ->
|
||||||
|
|
||||||
|
|
||||||
iq_set_register_info(Host, From, Nick, Lang) when is_binary(Host), is_binary(Nick) ->
|
iq_set_register_info(Host, From, Nick, Lang) when is_binary(Host), is_binary(Nick) ->
|
||||||
LUser = exmpp_jid:lnode(From),
|
LUser = exmpp_jid:prep_node(From),
|
||||||
LServer = exmpp_jid:prep_domain(From),
|
LServer = exmpp_jid:prep_domain(From),
|
||||||
LUS = {LUser, LServer},
|
LUS = {LUser, LServer},
|
||||||
F = fun() ->
|
F = fun() ->
|
||||||
|
|
|
@ -2208,7 +2208,7 @@ process_admin_items_set(UJID, Items, Lang, StateData) ->
|
||||||
case catch (
|
case catch (
|
||||||
case E of
|
case E of
|
||||||
{JID, affiliation, owner, _} ->
|
{JID, affiliation, owner, _} ->
|
||||||
case exmpp_jid:lnode(JID) of
|
case exmpp_jid:prep_node(JID) of
|
||||||
<<>> ->
|
<<>> ->
|
||||||
SD;
|
SD;
|
||||||
%% TODO: <<>> or 'undefined' ?
|
%% TODO: <<>> or 'undefined' ?
|
||||||
|
@ -3494,7 +3494,7 @@ add_to_log(Type, Data, StateData) ->
|
||||||
%% Users number checking
|
%% Users number checking
|
||||||
|
|
||||||
tab_add_online_user(JID, StateData) ->
|
tab_add_online_user(JID, StateData) ->
|
||||||
LUser = exmpp_jid:lnode(JID),
|
LUser = exmpp_jid:prep_node(JID),
|
||||||
LServer = exmpp_jid:prep_domain(JID),
|
LServer = exmpp_jid:prep_domain(JID),
|
||||||
US = {LUser, LServer},
|
US = {LUser, LServer},
|
||||||
Room = StateData#state.room,
|
Room = StateData#state.room,
|
||||||
|
@ -3506,7 +3506,7 @@ tab_add_online_user(JID, StateData) ->
|
||||||
|
|
||||||
|
|
||||||
tab_remove_online_user(JID, StateData) when ?IS_JID(JID) ->
|
tab_remove_online_user(JID, StateData) when ?IS_JID(JID) ->
|
||||||
LUser = exmpp_jid:lnode(JID),
|
LUser = exmpp_jid:prep_node(JID),
|
||||||
LServer = exmpp_jid:prep_domain(JID),
|
LServer = exmpp_jid:prep_domain(JID),
|
||||||
tab_remove_online_user({LUser, LServer, none},StateData);
|
tab_remove_online_user({LUser, LServer, none},StateData);
|
||||||
|
|
||||||
|
@ -3519,7 +3519,7 @@ tab_remove_online_user({LUser, LServer,_}, StateData) ->
|
||||||
#muc_online_users{us = US, room = Room, host = Host}).
|
#muc_online_users{us = US, room = Room, host = Host}).
|
||||||
|
|
||||||
tab_count_user(JID) ->
|
tab_count_user(JID) ->
|
||||||
LUser = exmpp_jid:lnode(JID),
|
LUser = exmpp_jid:prep_node(JID),
|
||||||
LServer = exmpp_jid:prep_domain(JID),
|
LServer = exmpp_jid:prep_domain(JID),
|
||||||
US = {LUser, LServer},
|
US = {LUser, LServer},
|
||||||
case catch ets:select(
|
case catch ets:select(
|
||||||
|
|
|
@ -660,7 +660,7 @@ is_type_match(Type, Value, JID, Subscription, Groups) ->
|
||||||
case Type of
|
case Type of
|
||||||
jid ->
|
jid ->
|
||||||
{User, Server, Resource} = Value,
|
{User, Server, Resource} = Value,
|
||||||
((User == undefined) orelse (User == []) orelse (User == exmpp_jid:lnode(JID)))
|
((User == undefined) orelse (User == []) orelse (User == exmpp_jid:prep_node(JID)))
|
||||||
andalso ((Server == undefined) orelse (Server == []) orelse (Server == exmpp_jid:prep_domain(JID)))
|
andalso ((Server == undefined) orelse (Server == []) orelse (Server == exmpp_jid:prep_domain(JID)))
|
||||||
andalso ((Resource == undefined) orelse (Resource == []) orelse (Resource == exmpp_jid:lresource(JID)));
|
andalso ((Resource == undefined) orelse (Resource == []) orelse (Resource == exmpp_jid:lresource(JID)));
|
||||||
subscription ->
|
subscription ->
|
||||||
|
|
|
@ -659,7 +659,7 @@ is_type_match(Type, Value, JID, Subscription, Groups) ->
|
||||||
case Type of
|
case Type of
|
||||||
jid ->
|
jid ->
|
||||||
{User, Server, Resource} = Value,
|
{User, Server, Resource} = Value,
|
||||||
((User == undefined) orelse (User == []) orelse (User == exmpp_jid:lnode(JID)))
|
((User == undefined) orelse (User == []) orelse (User == exmpp_jid:prep_node(JID)))
|
||||||
andalso ((Server == undefined) orelse (Server == []) orelse (Server == exmpp_jid:prep_domain(JID)))
|
andalso ((Server == undefined) orelse (Server == []) orelse (Server == exmpp_jid:prep_domain(JID)))
|
||||||
andalso ((Resource == undefined) orelse (Resource == []) orelse (Resource == exmpp_jid:lresource(JID)));
|
andalso ((Resource == undefined) orelse (Resource == []) orelse (Resource == exmpp_jid:lresource(JID)));
|
||||||
subscription ->
|
subscription ->
|
||||||
|
|
|
@ -73,7 +73,7 @@ process_sm_iq(From, To, #iq{type = Type} = IQ_Rec) ->
|
||||||
end.
|
end.
|
||||||
|
|
||||||
process_iq_get(From, _To, #iq{payload = SubEl} = IQ_Rec) ->
|
process_iq_get(From, _To, #iq{payload = SubEl} = IQ_Rec) ->
|
||||||
LUser = exmpp_jid:lnode(From),
|
LUser = exmpp_jid:prep_node(From),
|
||||||
LServer = exmpp_jid:prep_domain(From),
|
LServer = exmpp_jid:prep_domain(From),
|
||||||
case catch get_data(LUser,
|
case catch get_data(LUser,
|
||||||
LServer,
|
LServer,
|
||||||
|
@ -88,7 +88,7 @@ process_iq_get(From, _To, #iq{payload = SubEl} = IQ_Rec) ->
|
||||||
|
|
||||||
|
|
||||||
process_iq_set(From, _To, #iq{payload = SubEl} = IQ_Rec) ->
|
process_iq_set(From, _To, #iq{payload = SubEl} = IQ_Rec) ->
|
||||||
LUser = exmpp_jid:lnode(From),
|
LUser = exmpp_jid:prep_node(From),
|
||||||
LServer = exmpp_jid:prep_domain(From),
|
LServer = exmpp_jid:prep_domain(From),
|
||||||
F = fun() ->
|
F = fun() ->
|
||||||
lists:foreach(
|
lists:foreach(
|
||||||
|
|
|
@ -828,7 +828,7 @@ code_change(_OldVsn, State, _Extra) ->
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
do_route(ServerHost, Access, Plugins, Host, From, To, Packet) ->
|
do_route(ServerHost, Access, Plugins, Host, From, To, Packet) ->
|
||||||
#xmlel{name = Name} = Packet,
|
#xmlel{name = Name} = Packet,
|
||||||
LNode = exmpp_jid:lnode(To),
|
LNode = exmpp_jid:prep_node(To),
|
||||||
LRes = exmpp_jid:lresource(To),
|
LRes = exmpp_jid:lresource(To),
|
||||||
case {LNode, LRes} of
|
case {LNode, LRes} of
|
||||||
{undefined, undefined} ->
|
{undefined, undefined} ->
|
||||||
|
|
|
@ -163,7 +163,7 @@ process_local_iq(From, To, #iq{type = set} = IQ_Rec)
|
||||||
%% IQ_Result = exmpp_iq:iq()
|
%% IQ_Result = exmpp_iq:iq()
|
||||||
|
|
||||||
process_iq_get(From, To, IQ_Rec) ->
|
process_iq_get(From, To, IQ_Rec) ->
|
||||||
US = {exmpp_jid:lnode(From), exmpp_jid:prep_domain(From)},
|
US = {exmpp_jid:prep_node(From), exmpp_jid:prep_domain(From)},
|
||||||
case catch ejabberd_hooks:run_fold(roster_get, exmpp_jid:prep_domain(To), [], [US]) of
|
case catch ejabberd_hooks:run_fold(roster_get, exmpp_jid:prep_domain(To), [], [US]) of
|
||||||
Items when is_list(Items) ->
|
Items when is_list(Items) ->
|
||||||
XItems = lists:map(fun item_to_xml/1, Items),
|
XItems = lists:map(fun item_to_xml/1, Items),
|
||||||
|
@ -250,7 +250,7 @@ process_item_set(From, To, #xmlel{} = El) ->
|
||||||
try
|
try
|
||||||
JID1 = exmpp_jid:parse(exmpp_xml:get_attribute_as_binary(El, 'jid', <<>>)),
|
JID1 = exmpp_jid:parse(exmpp_xml:get_attribute_as_binary(El, 'jid', <<>>)),
|
||||||
User = exmpp_jid:node(From),
|
User = exmpp_jid:node(From),
|
||||||
LUser = exmpp_jid:lnode(From),
|
LUser = exmpp_jid:prep_node(From),
|
||||||
LServer = exmpp_jid:prep_domain(From),
|
LServer = exmpp_jid:prep_domain(From),
|
||||||
JID = jlib:short_jid(JID1),
|
JID = jlib:short_jid(JID1),
|
||||||
LJID = jlib:short_prepd_jid(JID1),
|
LJID = jlib:short_prepd_jid(JID1),
|
||||||
|
@ -844,7 +844,7 @@ process_item_attrs_ws(Item, []) ->
|
||||||
get_in_pending_subscriptions(Ls, User, Server)
|
get_in_pending_subscriptions(Ls, User, Server)
|
||||||
when is_binary(User), is_binary(Server) ->
|
when is_binary(User), is_binary(Server) ->
|
||||||
JID = exmpp_jid:make(User, Server),
|
JID = exmpp_jid:make(User, Server),
|
||||||
US = {exmpp_jid:lnode(JID), exmpp_jid:prep_domain(JID)},
|
US = {exmpp_jid:prep_node(JID), exmpp_jid:prep_domain(JID)},
|
||||||
case mnesia:dirty_index_read(roster, US, #roster.us) of
|
case mnesia:dirty_index_read(roster, US, #roster.us) of
|
||||||
Result when is_list(Result) ->
|
Result when is_list(Result) ->
|
||||||
Ls ++ lists:map(
|
Ls ++ lists:map(
|
||||||
|
@ -1185,7 +1185,7 @@ user_roster(User, Server, Query, Lang) ->
|
||||||
build_contact_jid_td({U, S, R}) ->
|
build_contact_jid_td({U, S, R}) ->
|
||||||
%% Convert {U, S, R} into {jid, U, S, R, U, S, R}:
|
%% Convert {U, S, R} into {jid, U, S, R, U, S, R}:
|
||||||
ContactJID = exmpp_jid:make(U, S, R),
|
ContactJID = exmpp_jid:make(U, S, R),
|
||||||
JIDURI = case {exmpp_jid:lnode(ContactJID), exmpp_jid:prep_domain(ContactJID)} of
|
JIDURI = case {exmpp_jid:prep_node(ContactJID), exmpp_jid:prep_domain(ContactJID)} of
|
||||||
{undefined, _} -> "";
|
{undefined, _} -> "";
|
||||||
{CUser, CServer} ->
|
{CUser, CServer} ->
|
||||||
CUser_S = binary_to_list(CUser),
|
CUser_S = binary_to_list(CUser),
|
||||||
|
|
|
@ -119,7 +119,7 @@ process_local_iq(From, To, #iq{type = set} = IQ_Rec) ->
|
||||||
|
|
||||||
|
|
||||||
process_iq_get(From, To, IQ_Rec) ->
|
process_iq_get(From, To, IQ_Rec) ->
|
||||||
US = {exmpp_jid:lnode(From), exmpp_jid:prep_domain(From)},
|
US = {exmpp_jid:prep_node(From), exmpp_jid:prep_domain(From)},
|
||||||
case catch ejabberd_hooks:run_fold(roster_get, exmpp_jid:prep_domain(To), [], [US]) of
|
case catch ejabberd_hooks:run_fold(roster_get, exmpp_jid:prep_domain(To), [], [US]) of
|
||||||
Items when is_list(Items) ->
|
Items when is_list(Items) ->
|
||||||
XItems = lists:map(fun item_to_xml/1, Items),
|
XItems = lists:map(fun item_to_xml/1, Items),
|
||||||
|
@ -217,7 +217,7 @@ process_iq_set(From, To, #iq{payload = Request} = IQ_Rec) ->
|
||||||
process_item_set(From, To, #xmlel{} = El) ->
|
process_item_set(From, To, #xmlel{} = El) ->
|
||||||
try
|
try
|
||||||
JID1 = exmpp_jid:parse(exmpp_xml:get_attribute_as_binary(El, 'jid', <<>>)),
|
JID1 = exmpp_jid:parse(exmpp_xml:get_attribute_as_binary(El, 'jid', <<>>)),
|
||||||
User = exmpp_jid:lnode(From),
|
User = exmpp_jid:prep_node(From),
|
||||||
Server = exmpp_jid:prep_domain(From),
|
Server = exmpp_jid:prep_domain(From),
|
||||||
LServer = binary_to_list(Server),
|
LServer = binary_to_list(Server),
|
||||||
{U0, S0, R0} = LJID = jlib:short_prepd_jid(JID1),
|
{U0, S0, R0} = LJID = jlib:short_prepd_jid(JID1),
|
||||||
|
@ -755,7 +755,7 @@ process_item_attrs_ws(Item, []) ->
|
||||||
get_in_pending_subscriptions(Ls, User, Server)
|
get_in_pending_subscriptions(Ls, User, Server)
|
||||||
when is_binary(User), is_binary(Server) ->
|
when is_binary(User), is_binary(Server) ->
|
||||||
JID = exmpp_jid:make(User, Server),
|
JID = exmpp_jid:make(User, Server),
|
||||||
LUser = exmpp_jid:lnode(JID),
|
LUser = exmpp_jid:prep_node(JID),
|
||||||
LServer = exmpp_jid:prep_domain_as_list(JID),
|
LServer = exmpp_jid:prep_domain_as_list(JID),
|
||||||
Username = ejabberd_odbc:escape(LUser),
|
Username = ejabberd_odbc:escape(LUser),
|
||||||
case catch odbc_queries:get_roster(LServer, Username) of
|
case catch odbc_queries:get_roster(LServer, Username) of
|
||||||
|
@ -1020,7 +1020,7 @@ user_roster(User, Server, Query, Lang) ->
|
||||||
build_contact_jid_td({U, S, R}) ->
|
build_contact_jid_td({U, S, R}) ->
|
||||||
%% Convert {U, S, R} into {jid, U, S, R, U, S, R}:
|
%% Convert {U, S, R} into {jid, U, S, R, U, S, R}:
|
||||||
ContactJID = exmpp_jid:make(U, S, R),
|
ContactJID = exmpp_jid:make(U, S, R),
|
||||||
JIDURI = case {exmpp_jid:lnode(ContactJID), exmpp_jid:prep_domain(ContactJID)} of
|
JIDURI = case {exmpp_jid:prep_node(ContactJID), exmpp_jid:prep_domain(ContactJID)} of
|
||||||
{undefined, _} -> "";
|
{undefined, _} -> "";
|
||||||
{CUser, CServer} ->
|
{CUser, CServer} ->
|
||||||
CUser_S = binary_to_list(CUser),
|
CUser_S = binary_to_list(CUser),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user