home *** CD-ROM | disk | FTP | other *** search
- Frank Reid #1 @8213
- Mon Jun 26 16:16:18 1995
- ┌───────────────────────────────────────────────────────────────────────────┐
- │ Mod Name: FR044.MOD Mod Author: Frank Reid WWIVnet @8213 │
- │ Difficulty: Beginner Date: June 26, 1995 │
- │ WWIV Version: 4.24 │
- │ Description: Color and pizazz to last few callers display during logon! │
- └───────────────────────────────────────────────────────────────────────────┘
-
- 1. Back up your source! I take NO responsibility for ill effects of this or
- any of my mods. I'd be happy to help you get it working, though. It's very
- easy to screw up in this section of the code, and you're regret no backup if
- you do!
-
- 2. Description: Several visiting sysops have asked me for my last few
- callers mod. I don't think there's such a thing as an "original" last few
- callers mod, so credits to all that have gone before! A picture's worth a
- thousand words, so here's what it will look like:
-
- D▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
- AC▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
- A
- C A
- C A
- C A
- C Last Few Callers to Eagle's Dare A
- C
- ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀A
- C▀▀▀▀▀▀▀▀▀▀▀▀
- ╒═══════╤════════╤═════════════════════════╤══════════════════════A
- C═══╤═══════╕
- │ Time │ A
- CCall # │ Alias/Name A
- C │ From A
- C │ Baud A
- C│
- ├───────┼────────┼─────────────────────────┼─────────────────────────┼─────A
- C──┤
- │ 19:26 │ 5134 │ ElbowCA
- C│ Columbia, MDC│ 26400 A
- C│
- │ 21:11 │ 5135 │ Smith & WesA
- CsonC│ Ellicott City, MDC│ 1A
- C4400 │
- │ 21:24 │ 5136 │ Smith & WesA
- CsonC│ Ellicott City, MDC│ 1A
- C4400 │
- │ 00:53 │ 5137 │ TricksCA
- C│ Columbia, MDC│ 14400 A
- C│
- │ 01:37 │ 5138 │ SqueakyA
- CC│ Bowie, MDC│ 2400 A
- C│
- │ 02:20 │ 5139 │ MaverickA
- CC│ Wichita Falls, TXC│ 1440A
- C0 │
- │ 03:09 │ 5140 │ Chris KollmA
- CannC│ Laurel, MDC│ 14400 A
- C│
- │ 06:39 │ 5141 │ The Old MasA
- CterC│ Valparaiso, INC│ 144A
- C00 │
- ╘═══════╧════════╧═════════════════════════╧═════════════════════════╧═════A
- C══╛
- D
-
- 3. Drawback: The <L>og of the day command will display ANSI line characters
- to separate user information ("│" instead of "|") for non-ANSI callers, too.
- (The last few callers listing doesn't. I was able to "filter" ANSI into ASCII
- from the strings, but I didn't feel like reading the USER.LOG character by
- character to convert them in the other routine -- unnecessary coding!)
-
- Open <LILO.C>
-
- Search for "void logon(void)" and add to the variable declarations:
-
- == char s[255],s1[181],s2[81],*ss;
- == char speed[40],ch;
- ++ char s3[101], s4[81], s5[81];
- ++ int i2, ok;
- == int i,i1,dv,win,f;
- == long len,pos;
-
- Hop down a ways (search for "LASTON.TXT") and delete the marked lines (--):
-
- == sprintf(s2,"%sLASTON.TXT",syscfg.gfilesdir);
- == ss=get_file(s2,&len);
- == pos=0;
- == if (ss!=NULL) {
- == if (!cs())
- == for (i=0; i<4; i++)
- == copy_line(s1,ss,&pos,len);
- == i=1;
- == do {
- == copy_line(s1,ss,&pos,len);
- == if ((s1[0]) && live_user) {
- == if (i) {
- == nln(2);
- -- pl(get_string(362));
- -- nl();
- -- if (sysinfo.flags & OP_FLAGS_SHOW_CITY_ST) {
- -- if (syscfg.sysconfig & sysconfig_extended_info)
- -- pl(get_string(1429));
- -- else
- -- pl(get_string(972));
- -- } else {
- -- pl(get_string(972));
- -- }
- -- ansic(7);
- -- i=(okansi())?205:'=';
- -- pl(charstr(79,i));
- -- i=0;
- -- }
- -- pl(s1);
- -- }
- -- } while (pos<len);
- -- }
- -- if ((actsl!=255) || (incom)) {
- == sl1(0,"");
- == sl1(0,stripcolors(s));
- == sl1(1,"");
-
- In place of these lines, add these (so it reads like this). Note the lines
- below you must add to close the box just after that section (++):
-
- == copy_line(s1,ss,&pos,len);
- == if ((s1[0]) && live_user) {
- == if (i) {
- == nln(2);
- /* BEGIN BLOCK READ */
- sprintf(s3, "Last Few Callers to %s", syscfg.systemname);
- if (okansi()) {
- i1 = (40 - (strlen(s3) / 2));
- npr("\x1B" "[0;1m%s\r\n",
- charstr(strlen(s3) + (i1 * 2 - 2), '▄'));
- npr("\x1B" "[0;34;47m%s", charstr(i1, ' '));
- npr("\x1B" "[0;34;47m%s", s3);
- npr("\x1B" "[0;34;47m%s\x1B" "[40m\r\n", charstr(i1 - 2, ' '));
- npr("\x1B" "[0;1;30m%s\r\n",
- charstr(strlen(s3) + (i1 * 2 - 2), '▀'));
- ansic(7);
- } else
- pl(s3);
- i1 = (okansi())?213:'+'; outchr(i1);
- i1 = (okansi())?205:'-'; outstr(charstr(7,i1));
- i1 = (okansi())?209:'+'; outchr(i1);
- i1 = (okansi())?205:'-'; outstr(charstr(8,i1));
- i1 = (okansi())?209:'+'; outchr(i1);
- i1 = (okansi())?205:'-'; outstr(charstr(25,i1));
- i1 = (okansi())?209:'+'; outchr(i1);
- i1 = (okansi())?205:'-'; outstr(charstr(25,i1));
- i1 = (okansi())?209:'+'; outchr(i1);
- i1 = (okansi())?205:'-'; outstr(charstr(7,i1));
- i1 = (okansi())?184:'+'; outchr(i1);
- nl();
- i1 = (okansi())?179:'|';
- strcpy(s3, (charstr(14, ' ')));
- strcpy(s4, (charstr(20, ' ')));
- sprintf(s5,"\x3""7%c\x3""4 Time \x3""7%c\x3""4 Call # \x3""7%c\x3"
- "4 Alias/Name%s\x3""7%c\x3""4 From%s\x3""7%c\x3""4 Baud \x3"
- "7%c", i1, i1, i1, s3, i1, s4, i1, i1);
- pl(s5);
- ansic(7);
- i1 = (okansi())?195:'+'; outchr(i1);
- i1 = (okansi())?205:'-'; outstr(charstr(7,i1));
- i1 = (okansi())?197:'+'; outchr(i1);
- i1 = (okansi())?205:'-'; outstr(charstr(8,i1));
- i1 = (okansi())?197:'+'; outchr(i1);
- i1 = (okansi())?205:'-'; outstr(charstr(25,i1));
- i1 = (okansi())?197:'+'; outchr(i1);
- i1 = (okansi())?205:'-'; outstr(charstr(25,i1));
- i1 = (okansi())?197:'+'; outchr(i1);
- i1 = (okansi())?205:'-'; outstr(charstr(7,i1));
- i1 = (okansi())?180:'+'; outchr(i1);
- nl();
- i=0;
- }
- for (i1=0;i1<strlen(s1); i1++)
- if ((s1[i1] == '│') && (!okansi()))
- s1[i1] = '|';
- s1[i1]=0;
- pl(s1);
- }
- } while (pos<len);
- ansic(7);
- i1 = (okansi())?212:'+'; outchr(i1);
- i1 = (okansi())?205:'-'; outstr(charstr(7,i1));
- i1 = (okansi())?207:'+'; outchr(i1);
- i1 = (okansi())?205:'-'; outstr(charstr(8,i1));
- i1 = (okansi())?207:'+'; outchr(i1);
- i1 = (okansi())?205:'-'; outstr(charstr(25,i1));
- i1 = (okansi())?207:'+'; outchr(i1);
- i1 = (okansi())?205:'-'; outstr(charstr(25,i1));
- i1 = (okansi())?207:'+'; outchr(i1);
- i1 = (okansi())?205:'-'; outstr(charstr(7,i1));
- i1 = (okansi())?190:'+'; outchr(i1);
- nl();
- }
-
- if (usernum > 1) {
- /* END BLOCK READ */
- == sl1(0,"");
- == sl1(0,stripcolors(s));
- == sl1(1,"");
-
- Jump down just below to find this section and delete the indicated (--) lines:
-
- == if (cid_name[0]) {
- == sprintf(s,"CID NAME: %s", cid_name);
- == sysoplog(s);
- == }
- ==
- -- if (sysinfo.flags & OP_FLAGS_SHOW_CITY_ST) {
- -- if (syscfg.sysconfig & sysconfig_extended_info)
- -- sprintf(s,"1%-6ld %-25.25s %-5.5s %-5.5s %-15.15s %-2.2s %-3.3s %-0
- -- status.callernum1,
- -- nam(&thisuser,usernum),
- -- times(),
- -- date(),
- -- thisuser.city,
- -- thisuser.state,
- -- thisuser.country,
- -- curspeed,
- -- thisuser.ontoday);
- -- else
- -- sprintf(s,"1%-6ld %-25.25s %-10.10s %-5.5s %-5.5s %-20.20s %2d\r\n",0
- -- status.callernum1,
- -- nam(&thisuser,usernum),
- -- cur_lang_name,
- -- times(),
- -- date(),
- -- curspeed,
- -- thisuser.ontoday);
- -- } else {
- -- sprintf(s,"1%-6ld %-25.25s %-10.10s %-5.5s %-5.5s %-20.20s %2d\r\n",0
- -- status.callernum1,
- -- nam(&thisuser,usernum),
- -- cur_lang_name,
- -- times(),
- -- date(),
- -- curspeed,
- -- thisuser.ontoday);
- -- }
- --
- -- if (actsl!=255) {
- -- sprintf(s1,"%sUSER.LOG",syscfg.gfilesdir);
- -- f=sh_open(s1,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
- -- if (f>-1) {
- -- sh_lseek(f,0L,SEEK_END);
- -- sh_write(f,(void *)s,strlen(s));
- -- sh_close(f);
- -- }
- --
- -- f=sh_open(s2,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD |S_IWRITE);
- -- if (f>-1) {
- -- pos=0;
- -- copy_line(s1,ss,&pos,len);
- -- for (i=1; i<8; i++) {
- -- copy_line(s1,ss,&pos,len);
- -- strcat(s1,"\r\n");
- -- sh_write(f,(void *)s1,strlen(s1));
- -- }
- -- sh_write(f,(void *)s,strlen(s));
- -- sh_close(f);
- == }
- == }
- == }
- ==
- == if (ss!=NULL)
- == bbsfree(ss);
-
- In its place, put this:
-
- == sysoplog(s);
- == }
- ==
- /* BEGIN BLOCK READ */
- if (usernum > 1) {
- sprintf(s3, "%s, %s", thisuser.city, thisuser.state);
- strcpy(s4, thisuser.name);
- properize(s4);
- speed[0]=0;
- i1=0;
- ok=1;
- for (i2=0;(i2<strlen(curspeed) && (ok));i2++) {
- if (curspeed[i2] != 47) {
- speed[i1]=curspeed[i2];
- i1++;
- } else {
- speed[i1]=0;
- ok=0;
- }
- }
- speed[i1]=0;
- sprintf(s,"\x3""7│\x3""2 %5.5s \x3""7│\x3""2 %6ld \x3""7│\x3"
- "2 %-23.23s \x3""7│\x3""2 %-23.23s \x3""7│\x3""2 %-6.6s\x3""7│\r\n",
- times(), status.callernum1, s4, s3, speed);
- sprintf(s1,"%sUSER.LOG",syscfg.gfilesdir);
- f=sh_open(s1,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
- if (f>-1) {
- sh_lseek(f,0L,SEEK_END);
- sh_write(f,(void *)s,strlen(s));
- sh_close(f);
- }
-
- f=sh_open(s2,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
- if (f>-1) {
- pos=0;
- copy_line(s1,ss,&pos,len);
- for (i=1; i<8; i++) {
- copy_line(s1,ss,&pos,len);
- strcat(s1,"\r\n");
- sh_write(f,(void *)s1,strlen(s1));
- }
- sh_write(f,(void *)s,strlen(s));
- sh_close(f);
- /* END BLOCK READ */
- == }
- == }
- == }
- ==
- == if (ss!=NULL)
- == bbsfree(ss);
-
- Save <LILO.C>
-
- Open <MMENU.C>
-
- We'll now make your <L>og of the day display the same format.
-
- Search for void mainmenu(void) and replace case 'L' with this:
-
- == case 'L':
- /* BEGIN BLOCK READ */
- if (status.callstoday>0) {
- sprintf(s2, "%s Log of the Day", syscfg.systemname);
- if (okansi()) {
- i = (40 - (strlen(s2) / 2));
- npr("\x1B" "[0;1m%s\r\n",
- charstr(strlen(s2) + (i * 2 - 2), '▄'));
- npr("\x1B" "[0;34;47m%s", charstr(i, ' '));
- npr("\x1B" "[0;34;47m%s", s2);
- npr("\x1B" "[0;34;47m%s\x1B" "[40m\r\n", charstr(i - 2, ' '));
- npr("\x1B" "[0;1;30m%s\r\n",
- charstr(strlen(s2) + (i * 2 - 2), '▀'));
- ansic(7);
- } else
- pl(s2);
- i = (okansi())?213:'+'; outchr(i);
- i = (okansi())?205:'-'; outstr(charstr(7,i));
- i = (okansi())?209:'+'; outchr(i);
- i = (okansi())?205:'-'; outstr(charstr(8,i));
- i = (okansi())?209:'+'; outchr(i);
- i = (okansi())?205:'-'; outstr(charstr(25,i));
- i = (okansi())?209:'+'; outchr(i);
- i = (okansi())?205:'-'; outstr(charstr(25,i));
- i = (okansi())?209:'+'; outchr(i);
- i = (okansi())?205:'-'; outstr(charstr(7,i));
- i = (okansi())?184:'+'; outchr(i);
- i = (okansi())?179:'|';
- nl();
- sprintf(s1, charstr(14, ' '));
- sprintf(s2, charstr(20, ' '));
- sprintf(s,"\x3""7%c\x3""4 Time \x3""7%c\x3""4 Call # \x3""7%c\x3"
- "4 Alias/Name%s\x3""7%c\x3""4 From%s\x3""7%c\x3""4 Baud \x3"
- "7%c", i, i, i, s1, i, s2, i, i);
- pl(s);
- ansic(7);
- i = (okansi())?195:'+'; outchr(i);
- i = (okansi())?196:'-'; outstr(charstr(7,i));
- i = (okansi())?197:'+'; outchr(i);
- i = (okansi())?196:'-'; outstr(charstr(8,i));
- i = (okansi())?197:'+'; outchr(i);
- i = (okansi())?196:'-'; outstr(charstr(25,i));
- i = (okansi())?197:'+'; outchr(i);
- i = (okansi())?196:'-'; outstr(charstr(25,i));
- i = (okansi())?197:'+'; outchr(i);
- i = (okansi())?196:'-'; outstr(charstr(7,i));
- i = (okansi())?180:'+'; outchr(i);
- }
- #ifdef RIPDRIVE
- rd_coff();
- #endif
- existprint(get_string(1035));
- #ifdef RIPDRIVE
- rd_con();
- #endif
- if (okansi()) npr("\x1b[1A");
- ansic(7);
- i = (okansi())?212:'+'; outchr(i);
- i = (okansi())?205:'-'; outstr(charstr(7,i));
- i = (okansi())?207:'+'; outchr(i);
- i = (okansi())?205:'-'; outstr(charstr(8,i));
- i = (okansi())?207:'+'; outchr(i);
- i = (okansi())?205:'-'; outstr(charstr(25,i));
- i = (okansi())?207:'+'; outchr(i);
- i = (okansi())?205:'-'; outstr(charstr(25,i));
- i = (okansi())?207:'+'; outchr(i);
- i = (okansi())?205:'-'; outstr(charstr(7,i));
- i = (okansi())?190:'+'; outchr(i);
- nl();
- pausescr();
- break;
- /* END BLOCK READ */
- == case 'M':
-
- Save <MMENU.C>
-
- Recompile and you're done. Remember, it won't look right until you've had a
- few callers, as the caller information in USER.LOG isn't in the newer format.
-
- Look for Cerebrum's LastNet (WWLN100.ZIP) which displays network activity in
- the same format, like this:
-
- D▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
- AC▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
- A
- C A
- C A
- C A
- CEagle's Dare Recent Network Activity A
- C
- ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀A
- C▀▀▀▀▀▀▀▀▀▀▀▀
- ╒═══════╤════════════════════════════════╤═════════════════════╤══A
- C════╤══════╕
- │ Time │ A
- CSystem Name │A
- C Network Address │A
- C Sent │ RcvA
- Cd │
- ├───────┼────────────────────────────────┼─────────────────────┼──────┼────A
- C──┤
- │ 07:34 │ UltraMegaBoardC│ A
- CRealityNet @7C│ 0K │ A
- C0K │
- │ 07:36 │ UltraMegaBoardC│ A
- CIceNET @3115C│ 9K │ A
- C0K │
- │ 07:37 │ Unconformity in our Dark Realm A
- C│ IceNET @3102C│ 5K A
- C│ 1K │
- │ 07:39 │ Breakaway BBS [ASV]C│ A
- CTerraNet @4064C│ 31K │ A
- C8K │
- │ 07:40 │ Not Your Ordinary BBSC│ A
- CBetaLink @1C│ 3K │ A
- C0K │
- │ 07:58 │ Unconformity in Our Dark Realm A
- C│ Fido (1:109/567) │ 0K A
- C│ 0K │
- │ 08:22 │ Not Your Ordinary BBSC│ A
- CISAnet @3101C│ 0K │ A
- C3K │
- │ 08:33 │ File_Distribution_HQ_[Line3] A
- C│ Fido (1:109/700) │ 0K A
- C│ 746K │
- │ 08:41 │ Pat WalkerC│ FidA
- Co (1:109/566) │ 697K │ 0K A
- C│
- │ 08:42 │ 24 Hour ComputersC│ A
- CFido (1:109/500) │ 2K │ A
- C1K │
- ╘═══════╧════════════════════════════════╧═════════════════════╧══════╧════A
- C══╛
- --- Cerebrum's LastNet v1.0
- D
-
- 4──────────────────────────────────────────────────────────────────────────────0
- 4 Eagle's Dare WWIV Core Support Site WWIVnet @8213 0
- 4 FILEnet @1160 Laurel, MD TerraNet @3104 0
- 4 IceNET @3104 (301) 498-1984 Fidonet 1:109/568 0
- 4──────────────────────────────────────────────────────────────────────────────0
-