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/driver/dr...


From: mldonkey-commits
Subject: [Mldonkey-commits] mldonkey distrib/ChangeLog src/daemon/driver/dr...
Date: Thu, 15 Jul 2010 18:25:24 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       10/07/15 18:25:24

Modified files:
        distrib        : ChangeLog 
        src/daemon/driver: driverCommands.ml driverControlers.ml 

Log message:
        patch #7208

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1438&r2=1.1439
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/driver/driverCommands.ml?cvsroot=mldonkey&r1=1.253&r2=1.254
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/driver/driverControlers.ml?cvsroot=mldonkey&r1=1.116&r2=1.117

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1438
retrieving revision 1.1439
diff -u -b -r1.1438 -r1.1439
--- distrib/ChangeLog   15 Jul 2010 18:22:05 -0000      1.1438
+++ distrib/ChangeLog   15 Jul 2010 18:25:23 -0000      1.1439
@@ -15,6 +15,9 @@
 =========
 
 2010/07/15
+7208: New aliases (ygrek)
+- "unpause", "continue" for command "resume"
+- "man" for command "help"
 7233: BT: Announce shared files when share_scan_interval = 0 (ygrek)
 
 2010/05/26

Index: src/daemon/driver/driverCommands.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/driver/driverCommands.ml,v
retrieving revision 1.253
retrieving revision 1.254
diff -u -b -r1.253 -r1.254
--- src/daemon/driver/driverCommands.ml 8 Apr 2010 19:05:10 -0000       1.253
+++ src/daemon/driver/driverCommands.ml 15 Jul 2010 18:25:23 -0000      1.254
@@ -2938,6 +2938,20 @@
 (*************************************************************************)
 
 let _ =
+  let resume_alias s = s, Arg_multiple (fun args o ->
+        if args = ["all"] && user2_is_admin o.conn_user.ui_user then
+          List.iter (fun file ->
+              file_resume file (admin_user ())
+          ) !!files
+        else
+          List.iter (fun num ->
+              let num = int_of_string num in
+              List.iter (fun file ->
+                  if (as_file_impl file).impl_file_num = num then
+                      file_resume file o.conn_user.ui_user
+              ) !!files) args; ""
+    ), "<num|all> :\t\t\tresume a paused download (use arg 'all' for all 
files)" 
+  in
   register_commands "Driver/Downloads"
     [
 
@@ -3104,19 +3118,9 @@
               ) !!files) args; ""
     ), "<num|all> :\t\t\tpause a download (use arg 'all' for all files)";
 
-    "resume", Arg_multiple (fun args o ->
-        if args = ["all"] && user2_is_admin o.conn_user.ui_user then
-          List.iter (fun file ->
-              file_resume file (admin_user ())
-          ) !!files
-        else
-          List.iter (fun num ->
-              let num = int_of_string num in
-              List.iter (fun file ->
-                  if (as_file_impl file).impl_file_num = num then
-                      file_resume file o.conn_user.ui_user
-              ) !!files) args; ""
-    ), "<num|all> :\t\t\tresume a paused download (use arg 'all' for all 
files)";
+    resume_alias "resume";
+    resume_alias "unpause";
+    resume_alias "continue";
 
     "release", Arg_one (fun arg o ->
        let num = int_of_string arg in

Index: src/daemon/driver/driverControlers.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/driver/driverControlers.ml,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -b -r1.116 -r1.117
--- src/daemon/driver/driverControlers.ml       25 Apr 2010 13:18:59 -0000      
1.116
+++ src/daemon/driver/driverControlers.ml       15 Jul 2010 18:25:24 -0000      
1.117
@@ -163,7 +163,7 @@
           ) list;
         end
 
-    | ["help"] | ["?"] ->
+    | ["help"] | ["?"] | ["man"] ->
           let module M = CommonMessages in
            if o.conn_output = HTML then
              begin
@@ -290,10 +290,9 @@
             ";
     | "?" :: args | "help" :: args | "man" :: args ->
           List.iter (fun arg ->
-              List.iter (fun (cmd, _, _, help) ->
-                  if cmd = arg then
-                    Printf.bprintf  buf "%s %s\n" cmd help)
-              !CommonNetwork.network_commands)
+              match List.filter (fun (cmd, _, _, _) -> cmd = arg) 
!CommonNetwork.network_commands with
+              | [] -> Printf.bprintf buf "Unknown command : %s\n" arg
+              | l -> List.iter (fun (_,_,_,help) -> Printf.bprintf  buf "%s 
%s\n" arg help) l)
           args
     | one :: two ->
         let cmd, args =



reply via email to

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