]> granicus.if.org Git - ejabberd/commitdiff
* src/web/ejabberd_web_admin.erl: Show in ejabberd Web Admin the
authorBadlop <badlop@process-one.net>
Fri, 26 Dec 2008 12:44:54 +0000 (12:44 +0000)
committerBadlop <badlop@process-one.net>
Fri, 26 Dec 2008 12:44:54 +0000 (12:44 +0000)
connection method and connected node of Jabber clients (thanks to
Oleg Palij)(EJAB-319)

SVN Revision: 1757

ChangeLog
src/web/ejabberd_web_admin.erl

index fe1367479aa38b490a0abdfa54507ad39c5dd087..d60614fea0156bae5ce7600509f7112821638b79 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2008-12-26  Badlop  <badlop@process-one.net>
 
+       * 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)
+
        * src/ejabberd_config.erl: Option outgoing_s2s_options to define
        s2s outgoing behaviour: IPv4, IPv6 and timeout (thanks to Stephan
        Maka)(EJAB-665)
index c7da8cf6958bc376839bb1cebf62c919ab1e44f6..8f15fd718d55acada63b6071088c9814e628dd31 100644 (file)
@@ -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)])