From 241c49dc3c7cee38d0d6e96eae0b50f9bb742e2c Mon Sep 17 00:00:00 2001 From: Alexey Shchepin Date: Sun, 10 Jun 2007 18:13:37 +0000 Subject: [PATCH] * src/web/ejabberd_web_admin.erl: Show IP address of connected resources on user info page (thanks to Oleg Palij) SVN Revision: 781 --- ChangeLog | 5 +++++ src/web/ejabberd_web_admin.erl | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 456daaf47..872c01c7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-06-10 Alexey Shchepin + + * src/web/ejabberd_web_admin.erl: Show IP address of connected + resources on user info page (thanks to Oleg Palij) + 2007-06-07 Alexey Shchepin * src/ejabberd_config.erl: Fixed "language" option processing diff --git a/src/web/ejabberd_web_admin.erl b/src/web/ejabberd_web_admin.erl index cd054a62f..58b0ecb12 100644 --- a/src/web/ejabberd_web_admin.erl +++ b/src/web/ejabberd_web_admin.erl @@ -1493,7 +1493,18 @@ user_info(User, Server, Query, Lang) -> _ -> [?XE("ul", lists:map(fun(R) -> - ?LI([?C(R)]) + FIP = case ejabberd_sm:get_user_ip( + User, Server, R) of + undefined -> + ""; + {IP, Port} -> + " (" ++ + inet_parse:ntoa(IP) ++ + ":" ++ + integer_to_list(Port) + ++ ")" + end, + ?LI([?C(R ++ FIP)]) end, lists:sort(Resources)))] end, Password = ejabberd_auth:get_password_s(User, Server),