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: Thu, 25 Jan 2007 13:55:38 +0000

CVSROOT:        /sources/mldonkey
Module name:    mldonkey
Changes by:     spiralvoice <spiralvoice>       07/01/25 13:55:37

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

Log message:
        patch #5712

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/mldonkey/distrib/ChangeLog?cvsroot=mldonkey&r1=1.1164&r2=1.1165
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/common/commonOptions.ml?cvsroot=mldonkey&r1=1.195&r2=1.196
http://cvs.savannah.gnu.org/viewcvs/mldonkey/src/daemon/driver/driverCommands.ml?cvsroot=mldonkey&r1=1.214&r2=1.215

Patches:
Index: distrib/ChangeLog
===================================================================
RCS file: /sources/mldonkey/mldonkey/distrib/ChangeLog,v
retrieving revision 1.1164
retrieving revision 1.1165
diff -u -b -r1.1164 -r1.1165
--- distrib/ChangeLog   25 Jan 2007 13:29:04 -0000      1.1164
+++ distrib/ChangeLog   25 Jan 2007 13:55:37 -0000      1.1165
@@ -15,6 +15,7 @@
 =========
 
 2007/01/25
+5712: Multiuser: New verbosity "com" to log commands by non-admin users
 5711: Multiuser: Block commands preferred, bs, bp, port for non-admin users
 5642: Swarmer: swarming_block_selection_algorithm = 3 (TripleM)
 - this new algorithm select always the rarest choice, if average availability

Index: src/daemon/common/commonOptions.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/common/commonOptions.ml,v
retrieving revision 1.195
retrieving revision 1.196
diff -u -b -r1.195 -r1.196
--- src/daemon/common/commonOptions.ml  25 Jan 2007 13:09:16 -0000      1.195
+++ src/daemon/common/commonOptions.ml  25 Jan 2007 13:55:37 -0000      1.196
@@ -561,6 +561,7 @@
   swarming : debug swarming
   hc : http_client messages
   hs : http_server messages
+  com : commands by non-admin users
   act : debug activity
   bw : debug bandwidth
   unexp : debug unexpected messages"
@@ -1863,6 +1864,7 @@
 let verbose_supernode = ref false
 let verbose_swarming = ref false
 let verbose_activity = ref false
+let verbose_user_commands = ref false
 let verbose_unexpected_messages = ref false
 
 let set_all v =
@@ -1891,6 +1893,7 @@
   Http_client.verbose := v;
   Http_server.verbose := v;
   verbose_activity := v;
+  verbose_user_commands := v;
   verbose_unexpected_messages := v
 
 let _ =
@@ -1926,6 +1929,7 @@
           | "act" -> verbose_activity := true
           | "bw" -> incr BasicSocket.verbose_bandwidth
           | "unexp" -> verbose_unexpected_messages := true
+          | "com" -> verbose_user_commands := true
 
           | "all" ->
 

Index: src/daemon/driver/driverCommands.ml
===================================================================
RCS file: /sources/mldonkey/mldonkey/src/daemon/driver/driverCommands.ml,v
retrieving revision 1.214
retrieving revision 1.215
diff -u -b -r1.214 -r1.215
--- src/daemon/driver/driverCommands.ml 21 Jan 2007 15:50:27 -0000      1.214
+++ src/daemon/driver/driverCommands.ml 25 Jan 2007 13:55:37 -0000      1.215
@@ -78,7 +78,12 @@
         [] ->
           Gettext.buftext buf no_such_command cmd
       | (command, _, arg_kind, help) :: tail ->
-          if command = cmd then
+          if command = cmd then begin
+            if !verbose_user_commands && not (user2_is_admin 
output.conn_user.ui_user) then
+              lprintf_nl "user %s issued command %s%s"
+                output.conn_user.ui_user.user_name
+                cmd
+                (if args = [] then "" else ", args " ^ String.concat " " args);
             Buffer.add_string buf (
               match arg_kind, args with
                 Arg_none f, [] -> f output
@@ -88,6 +93,7 @@
               | Arg_three f, [a1;a2;a3] -> f a1 a2 a3 output
               | _ -> bad_number_of_args command help
             )
+            end
           else
             iter tail
     in




reply via email to

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