mldonkey-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/common/co...
Date: Wed, 31 May 2006 20:06:02 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Branch:         
Changes by:     spiralvoice <address@hidden>    06/05/31 20:06:02

Modified files:
        distrib        : ChangeLog 
        src/daemon/common: commonServer.ml 

Log message:
        patch #5143

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/distrib/ChangeLog.diff?tr1=1.863&tr2=1.864&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/mldonkey/mldonkey/src/daemon/common/commonServer.ml.diff?tr1=1.30&tr2=1.31&r1=text&r2=text

Patches:
Index: mldonkey/distrib/ChangeLog
diff -u mldonkey/distrib/ChangeLog:1.863 mldonkey/distrib/ChangeLog:1.864
--- mldonkey/distrib/ChangeLog:1.863    Wed May 31 20:02:57 2006
+++ mldonkey/distrib/ChangeLog  Wed May 31 20:06:02 2006
@@ -15,6 +15,7 @@
 =========
 
 2006/05/31
+5143: HTML/Telnet: Country codes for servers
 5147: G1/G2: Display proper filename (and therefore support rename) (zet)
 5145: EDK: Fix md4 hashing when filesize is an exact multiple
       of edk chunk size, MLDonkey is now eMule-compatible (zet)
Index: mldonkey/src/daemon/common/commonServer.ml
diff -u mldonkey/src/daemon/common/commonServer.ml:1.30 
mldonkey/src/daemon/common/commonServer.ml:1.31
--- mldonkey/src/daemon/common/commonServer.ml:1.30     Fri May 19 23:43:54 2006
+++ mldonkey/src/daemon/common/commonServer.ml  Wed May 31 20:06:02 2006
@@ -351,7 +351,7 @@
       info.G.server_banner
 
 let server_print_html_header buf ext =
-    html_mods_table_header buf "serversTable" (Printf.sprintf "servers%s" ext) 
[
+    html_mods_table_header buf "serversTable" (Printf.sprintf "servers%s" ext) 
([
     ( "1", "srh", "Server number", "#" ) ;
     ( "0", "srh", "Connect|Disconnect", "C/D" ) ;
     ( "0", "srh", "Remove", "Rem" ) ;
@@ -359,6 +359,7 @@
     ( "0", "srh", "[Hi]gh or [Lo]w ID", "ID" ) ;
     ( "0", "srh", "Network name", "Network" ) ;
     ( "0", "srh", "Connection status", "Status" ) ;
+    ] @ (if !Geoip.active then [( "0", "srh", "Country Code/Name", "CC" )] 
else []) @ [
     ( "0", "srh br", "IP address", "IP address" ) ;
     ( "1", "srh ar", "Number of connected users", "Users" ) ;
     ( "1", "srh ar br", "Max number of users", "MaxUsers" ) ;
@@ -369,7 +370,7 @@
     ( "0", "srh ar br", "Ping (ms)", "Ping" ) ;
     ( "0", "srh", "Server version", "Version" ) ;
     ( "0", "srh", "Server name", "Name" ) ;
-    ( "0", "srh", "Server details", "Details" ) ]
+    ( "0", "srh", "Server details", "Details" ) ])
 
 let server_print s o =
   let impl = as_server_impl s in
@@ -381,7 +382,7 @@
           lprintf_nl "Exception %s in server_info (%s)\n"
             (Printexc2.to_string e) n.network_name;
           raise e in
-
+    let cc,cn = Geoip.get_country (Ip.ip_of_addr info.G.server_addr) in
     let buf = o.conn_buf in
   
   if use_html_mods o then begin
@@ -396,6 +397,7 @@
     \\<td class=\\\"sr\\\" %s\\</td\\>
     \\<td class=\\\"sr\\\"\\>%s\\</td\\>
     \\<td class=\\\"sr\\\"\\>%s\\</td\\>
+    %s
     \\<td class=\\\"sr br\\\"\\>%s:%s\\</td\\>
     \\<td class=\\\"sr ar\\\"\\>%Ld\\</td\\>
     \\<td class=\\\"sr ar br\\\"\\>%Ld\\</td\\>
@@ -488,6 +490,9 @@
         NotConnected _ -> if server_blocked s then "IP blocked"
         else (string_of_connection_state impl.impl_server_state)
       | _ -> (string_of_connection_state impl.impl_server_state))
+      (if !Geoip.active then 
+        Printf.sprintf "\\<td class=\\\"sr\\\" title=\\\"%s\\\" 
\\>%s\\</td\\>" cn cc
+       else "")
       (Ip.string_of_addr info.G.server_addr)
       (Printf.sprintf "%s%s"
        (string_of_int info.G.server_port)
@@ -518,7 +523,8 @@
           (if info.G.server_realport <> 0 
             then "(" ^ (string_of_int info.G.server_realport) ^ ")" 
             else ""))
-          (info.G.server_name) ("")
+          (info.G.server_name)
+         (if !Geoip.active then Printf.sprintf "%33s/%-2s%9s" cn cc "" else "")
           (info.G.server_nusers)
           (info.G.server_nfiles)
           (if server_blocked s 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]