Subject: HELP output email address fix

From: Robin Lunn <[email-masked]>
Date: Mon, 12 Feb 1996 14:26:16 +0200 (GMT)

The HELP command prints a list of commands followed by a helpful message
containing, frequently, an invalid email address.

Here is a patch to use the email address that was specified using the
`email' directive in the ftpaccess file, or if it was not specified then
it falls back to the old behaviour.

Patch by: Andras Salamon <[email-masked]>

--- ftpcmd.y.orig	Tue Jan 23 08:09:09 1996
+++ ftpcmd.y	Mon Feb 12 12:52:06 1996
@@ -1373,6 +1373,7 @@
     struct tab *c;
     int width, NCMDS;
     char *type;
+    struct aclmember *entry = NULL;
 
     if (ctab == sitetab)
         type = "SITE ";
@@ -1414,7 +1415,10 @@
             printf("\r\n");
         }
         (void) fflush(stdout);
-        reply(214, "Direct comments to ftp-bugs@%s.", hostname);
+        if ( (getaclentry("email", &entry)) && ARG0 )
+            reply(214, "Direct comments to %s.", ARG0); 
+        else
+            reply(214, "Direct comments to ftp-bugs@%s.", hostname);
         return;
     }
     upper(s);

-- 
_ __                  | Only my ideas here unless I say otherwise...      _
' )  )     /          | (BeamJack@IRC)                                   / \
 /--' ____/___o  __   |                                                 |  /
/  \_(_) /_) (__/) )_ |                                                 \
       "I didn't know it was impossible when I did it!"                  \
                                                                         /\
                                                                        |  |
                                                                         \/