]> gitweb.fluxo.info Git - firma.git/commitdiff
EmailListAdministration third fix
authorrhatto <rhatto>
Wed, 11 Oct 2006 23:15:06 +0000 (23:15 +0000)
committerrhatto <rhatto>
Wed, 11 Oct 2006 23:15:06 +0000 (23:15 +0000)
firma

diff --git a/firma b/firma
index 0427e77159124c73342a50c72ed419a2bb89f471..6067cb21211feab7373f4f18dac572ede1e5df99 100755 (executable)
--- a/firma
+++ b/firma
@@ -1783,15 +1783,23 @@ function AdminLog {
   #+or email and then log a message according to the
   #+display mode
   #
-  # parameter(s): string
+  # parameter(s): string / --send (to send a message back)
   # depends on function(s): none
   # returns: 0
   #-------------------------------------------------------------
 
   if [ "$MODE" == "admin-interactive" ]; then
     echo >&2 "$*"
+  elif [ "$MODE" == "admin-non-interactive" ]; then
+    if [ "$1" == "--send" ]; then
+       # TODO: send encrypted
+       MESSAGE_BODY="`echo -e "$ADMIN_MESSAGE"`"
+       ComposeAndSendBounceMessage
+    else
+      ADMIN_MESSAGE="$ADMIN_MESSAGE\n$*"
+    fi
   else
-    ADMIN_MESSAGE="`echo -e "$ADMIN_MESSAGE\n$*"`"
+    echo $*
   fi
 }
 
@@ -1826,9 +1834,7 @@ function EmailListAdministration {
         ListAdministration $command
       fi
     done
-    # TODO: send encrypted
-    MESSAGE_BODY="$ADMIN_MESSAGE"
-    ComposeAndSendBounceMessage
+    AdminLog --send
   else
     # message was sent by a normal subscriber
     # this is the body of the message to be sent, so no indentation here