home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Professional / OS2PRO194.ISO / os2 / com / bbs / lora / lora234s.exe / SENDMSG.C < prev    next >
C/C++ Source or Header  |  1993-10-17  |  1KB  |  51 lines

  1. /*
  2.  
  3.                       LoraBBS (DOS / OS2) Ver. 2.33
  4.  
  5.     Copyright (c) 1989, 1990, 1991, 1992, 1993 by Marco Maccaferri.
  6.                           All rights reserved.
  7.  
  8.  
  9.                           Source code examples
  10.                           Send on-line message
  11.  
  12.  
  13.   You may use this structures at your own risk. The author cannot guarantee
  14.   that this structures are maintained in all future versions of the program.
  15.   You can freely (and you are encouraged on that) distribute this file
  16.   without limitations.
  17.  
  18.   You can contact the autor at one of the following address:
  19.  
  20.   Marco Maccaferri
  21.   BBS: 39-51-6331730 (2:332/402)
  22.  
  23. */
  24. #include <stdio.h>
  25. #include <string.h>
  26.  
  27. #include "lora.h"
  28.  
  29. void send_online_message(linea, name, task, ul)
  30. char *linea, *name;
  31. int task, ul;
  32. {
  33.    FILE *fp;
  34.    char filename[14];
  35.  
  36.    printf ("\nProcessing...");
  37.  
  38.    sprintf(filename, "LINE%d.BBS", ul);
  39.    fp = fopen(filename, "at");
  40.  
  41.    fprintf(fp, "\n\n** MESSAGE **\n");
  42.    fprintf(fp, "From: %s on line %d\n", name, task);
  43.    fprintf(fp, "\n\"%s\"\n\n", linea);
  44.    fprintf(fp, "\001");
  45.  
  46.    fclose(fp);
  47.  
  48.    printf("Sent\n\n");
  49. }
  50.  
  51.