home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-03 | 1.4 KB | 78 lines | [TEXT/MMCC] |
- // outgoing.c
- // preserves gScratch, supposedly
-
- #include <string.h>
- #include <stdarg.h>
- #include <stdio.h>
-
- #include "mytypes.h"
- #include "error.h"
- #include "util.h"
- #include "preffile.h"
- #include "globals.h"
-
- #include "tcpstuff.h"
- #include "outgoing.h"
-
- enum {
- kOutScratchSize = 1024*4
- };
-
- static uchar outScratch[kOutScratchSize];
-
- #if TIMESTAMP
- void process_line_from_client(char *line, long len);
- #include "timeseal.h"
- #endif
-
- void bprintf( char * format, ... )
- {
- va_list params;
- short len;
-
- va_start(params, format);
- len = vsprintf((char *) outScratch, format, params);
- #if TIMESTAMP
- if (gPrefs.serverType == kIcc && gPrefs.timeseal)
- process_line_from_client((char *) outScratch, len);
- else if (gPrefs.serverType == kFics && gPrefs.timeseal)
- SealFromClient((char *) outScratch, len);
- else
- #endif
- SendData(0, outScratch, len);
-
- va_end(params);
- }
-
- void
- PrintConnectString(void)
- {
- if (gPrefs.serverType == kFics)
- bprintf("set style 12\n");
- else
- bprintf("set style 12\nset high 0\nset wrap 0\n");
- bprintf("finger adum\n"); // for checking current version
- }
-
- /*
- void
- SendMessage(uchar *dat, short len)
- {
- enum {offset = 2};
-
- short nnn;
-
- // length is maximum 255
- if (len > 255)
- len = 255; // brute force kix ass
-
- // scroll data down by offset
- nnn = len + offset - 1;
- for (;nnn >= offset; nnn--)
- outScratch[nnn] = dat[nnn - offset];
- outScratch[0] = kSMessage;
- outScratch[1] = len;
- len += offset;
- SendData(0, outScratch, len);
- }
- */