home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / ListSERV1_4.lha / ListSERV / source / info.c < prev    next >
Encoding:
Text File  |  1993-12-28  |  2.2 KB  |  70 lines

  1. /*
  2.  * Currently, the INFO-command is disabled!!
  3.  *                                      -peter
  4.  *
  5.  * #include "listserv.h"
  6.  * #include "protos.h"
  7.  *
  8.  * static char rcsid[] = "$Id: info.c,v 1.1.1.3 1993/12/27 17:24:01 simons Exp simons $";
  9.  *
  10.  * void infoindex(from,request)
  11.  * char *from, *request;
  12.  *         {
  13.  *         printf("called sendhelp with %s %s\n", from, request);
  14.  *         callmailer("", from, request);
  15.  *         mailcat(INFOFILE,"");
  16.  *         pclose(mailer);
  17.  *         return;
  18.  *         }
  19.  *
  20.  * void sendinfo(from, command)
  21.  * char *from, *command;
  22.  *         {
  23.  *         int i;
  24.  *         char *p;
  25.  *         char doc[256],
  26.  *              tmp[512],
  27.  *              buf[BUFSIZ];
  28.  *
  29.  *         printf("called sendfaq with %s %s\n", from, command);
  30.  *         / * Grab filenames trailing after word "info" * /
  31.  *         strcpy(buf, command);
  32.  *         while(p = index(buf, ' '))
  33.  *                 {
  34.  *                 / * Get rid of extra blanks
  35.  *                   * and return if only trailing whitespace remains * /
  36.  *                 while(*(++p) == ' ')
  37.  *                         ;
  38.  *                 if(!strlen(p))
  39.  *                         return;
  40.  *
  41.  *                 strcpy(buf, p);
  42.  *                 sscanf(buf, "%s", doc);
  43.  *                 if (index(doc, '*'))
  44.  *                         {
  45.  *                         callmailer("", from, command);
  46.  *                         sprintf(tmp, "%sINFOHELP", SERVDIR);
  47.  *                         mailcat(tmp, "\t");
  48.  *                         fflush(mailer);
  49.  *                         pclose(mailer);
  50.  *                         continue;
  51.  *                         }
  52.  *                 sprintf(tmp, "%s/%s", INFODIR, doc);
  53.  *                 callmailer("", from, command);
  54.  *                 if(access(tmp,R_OK) == 0)
  55.  *                         {
  56.  *                         mailcat(tmp, "\t");
  57.  *                         fflush(mailer);
  58.  *                         pclose(mailer);
  59.  *                         }
  60.  *                 else
  61.  *                         {
  62.  *                         fprintf(mailer, "File %s does not exist.", doc);
  63.  *                         fflush(mailer);
  64.  *                         pclose(mailer);
  65.  *                         }
  66.  *                 }
  67.  *
  68.  *         }
  69.  */
  70.