fix show_ip option
This commit is contained in:
parent
741a1de374
commit
92914e09db
|
@ -184,11 +184,14 @@ add_log(Io, Timezone, ShowIP, {Orientation, From, To, Packet}, _OSD) ->
|
||||||
end,
|
end,
|
||||||
LocalIPS = case ShowIP of
|
LocalIPS = case ShowIP of
|
||||||
true ->
|
true ->
|
||||||
{UserIP, _Port} = ejabberd_sm:get_user_ip(
|
case ejabberd_sm:get_user_ip(
|
||||||
LocalJID#jid.user,
|
LocalJID#jid.user,
|
||||||
LocalJID#jid.server,
|
LocalJID#jid.server,
|
||||||
LocalJID#jid.resource),
|
LocalJID#jid.resource) of
|
||||||
io_lib:format("lip=\"~s\" ", [inet_parse:ntoa(UserIP)]);
|
{UserIP, _Port} ->
|
||||||
|
io_lib:format("lip=\"~s\" ", [inet_parse:ntoa(UserIP)]);
|
||||||
|
undefined -> "lip=\"undefined\" "
|
||||||
|
end;
|
||||||
false -> ""
|
false -> ""
|
||||||
end,
|
end,
|
||||||
TimestampISO = get_now_iso(Timezone),
|
TimestampISO = get_now_iso(Timezone),
|
||||||
|
|
Loading…
Reference in New Issue