diff options
author | Badlop <badlop@process-one.net> | 2008-12-26 12:44:54 +0000 |
---|---|---|
committer | Badlop <badlop@process-one.net> | 2008-12-26 12:44:54 +0000 |
commit | 394245620e0097161da5e1321892f3b9afd410ea (patch) | |
tree | 6046c1576d383a638826c8e4c42aeaf73080946a /src/web/ejabberd_web_admin.erl | |
parent | * src/ejabberd_config.erl: Option outgoing_s2s_options to define (diff) |
* src/web/ejabberd_web_admin.erl: Show in ejabberd Web Admin the
connection method and connected node of Jabber clients (thanks to
Oleg Palij)(EJAB-319)
SVN Revision: 1757
Diffstat (limited to 'src/web/ejabberd_web_admin.erl')
-rw-r--r-- | src/web/ejabberd_web_admin.erl | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/web/ejabberd_web_admin.erl b/src/web/ejabberd_web_admin.erl index c7da8cf69..8f15fd718 100644 --- a/src/web/ejabberd_web_admin.erl +++ b/src/web/ejabberd_web_admin.erl @@ -1442,15 +1442,24 @@ user_info(User, Server, Query, Lang) -> _ -> [?XE("ul", lists:map(fun(R) -> - FIP = case ejabberd_sm:get_user_ip( + FIP = case ejabberd_sm:get_user_info( User, Server, R) of - undefined -> + offline -> ""; - {IP, Port} -> + [{node, Node}, {conn, Conn}, {ip, {IP, Port}}] -> + ConnS = case Conn of + c2s -> "plain"; + c2s_tls -> "tls"; + c2s_compressed -> "zlib"; + http_bind -> "http-bind"; + http_poll -> "http-poll" + end, " (" ++ + ConnS ++ "://" ++ inet_parse:ntoa(IP) ++ ":" ++ integer_to_list(Port) + ++ "#" ++ atom_to_list(Node) ++ ")" end, ?LI([?C(R ++ FIP)]) |