home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / FR044.ZIP / FR044.MOD < prev   
Encoding:
Text File  |  1995-06-30  |  18.5 KB  |  474 lines

  1. Frank Reid #1 @8213
  2. Mon Jun 26 16:16:18 1995
  3. ┌───────────────────────────────────────────────────────────────────────────┐
  4. │ Mod Name: FR044.MOD         Mod Author: Frank Reid WWIVnet @8213          │
  5. │ Difficulty: Beginner              Date: June 26, 1995                     │
  6. │ WWIV Version: 4.24                                                        │
  7. │ Description: Color and pizazz to last few callers display during logon!   │
  8. └───────────────────────────────────────────────────────────────────────────┘
  9.  
  10. 1.  Back up your source!  I take NO responsibility for ill effects of this or
  11. any of my mods.  I'd be happy to help you get it working, though.  It's very
  12. easy to screw up in this section of the code, and you're regret no backup if
  13. you do!
  14.  
  15. 2.  Description:  Several visiting sysops have asked me for my last few
  16. callers mod.  I don't think there's such a thing as an "original" last few
  17. callers mod, so credits to all that have gone before!  A picture's worth a
  18. thousand words, so here's what it will look like:
  19.  
  20. D▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  21. AC▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  22.      A
  23. C      A
  24. C     A
  25. C      A
  26. C  Last Few Callers to Eagle's Dare A
  27. C                     
  28. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀A
  29. C▀▀▀▀▀▀▀▀▀▀▀▀
  30. ╒═══════╤════════╤═════════════════════════╤══════════════════════A
  31. C═══╤═══════╕
  32.  Time   A
  33. CCall #  Alias/Name A
  34. C              From     A
  35. C                Baud  A
  36. C
  37. ├───────┼────────┼─────────────────────────┼─────────────────────────┼─────A
  38. C──┤
  39. │ 19:26 │   5134 │ ElbowCA
  40. C│ Columbia, MDC│ 26400 A
  41. C
  42. │ 21:11 │   5135 │ Smith & WesA
  43. CsonC│ Ellicott City, MDC│ 1A
  44. C4400 
  45. │ 21:24 │   5136 │ Smith & WesA
  46. CsonC│ Ellicott City, MDC│ 1A
  47. C4400 
  48. │ 00:53 │   5137 │ TricksCA
  49. C│ Columbia, MDC│ 14400 A
  50. C
  51. │ 01:37 │   5138 │ SqueakyA
  52. CC│ Bowie, MDC│ 2400  A
  53. C
  54. │ 02:20 │   5139 │ MaverickA
  55. CC│ Wichita Falls, TXC│ 1440A
  56. C0 
  57. │ 03:09 │   5140 │ Chris KollmA
  58. CannC│ Laurel, MDC│ 14400 A
  59. C
  60. │ 06:39 │   5141 │ The Old MasA
  61. CterC│ Valparaiso, INC│ 144A
  62. C00 
  63. ╘═══════╧════════╧═════════════════════════╧═════════════════════════╧═════A
  64. C══╛
  65. D
  66.  
  67. 3.  Drawback:  The <L>og of the day command will display ANSI line characters
  68. to separate user information ("│" instead of "|") for non-ANSI callers, too.
  69. (The last few callers listing doesn't.  I was able to "filter" ANSI into ASCII
  70. from the strings, but I didn't feel like reading the USER.LOG character by
  71. character to convert them in the other routine -- unnecessary coding!)
  72.  
  73. Open <LILO.C>
  74.  
  75. Search for "void logon(void)" and add to the variable declarations:
  76.  
  77. ==  char s[255],s1[181],s2[81],*ss;
  78. ==  char speed[40],ch;
  79. ++  char s3[101], s4[81], s5[81];
  80. ++  int i2, ok;
  81. ==  int i,i1,dv,win,f;
  82. ==  long len,pos;
  83.  
  84. Hop down a ways (search for "LASTON.TXT") and delete the marked lines (--):
  85.  
  86. ==  sprintf(s2,"%sLASTON.TXT",syscfg.gfilesdir);
  87. ==  ss=get_file(s2,&len);
  88. ==  pos=0;
  89. ==  if (ss!=NULL) {
  90. ==    if (!cs())
  91. ==      for (i=0; i<4; i++)
  92. ==        copy_line(s1,ss,&pos,len);
  93. ==    i=1;
  94. ==    do {
  95. ==      copy_line(s1,ss,&pos,len);
  96. ==      if ((s1[0]) && live_user) {
  97. ==        if (i) {
  98. ==          nln(2);
  99. --          pl(get_string(362));
  100. --          nl();
  101. --          if (sysinfo.flags & OP_FLAGS_SHOW_CITY_ST) {
  102. --            if (syscfg.sysconfig & sysconfig_extended_info)
  103. --              pl(get_string(1429));
  104. --            else
  105. --              pl(get_string(972));
  106. --          } else {
  107. --            pl(get_string(972));
  108. --          }
  109. --          ansic(7);
  110. --          i=(okansi())?205:'=';
  111. --          pl(charstr(79,i));
  112. --          i=0;
  113. --        }
  114. --        pl(s1);
  115. --      }
  116. --    } while (pos<len);
  117. --  }
  118. --  if ((actsl!=255) || (incom)) {
  119. ==    sl1(0,"");
  120. ==    sl1(0,stripcolors(s));
  121. ==    sl1(1,"");
  122.  
  123. In place of these lines, add these (so it reads like this).  Note the lines
  124. below you must add to close the box just after that section (++):
  125.  
  126. ==      copy_line(s1,ss,&pos,len);
  127. ==      if ((s1[0]) && live_user) {
  128. ==        if (i) {
  129. ==          nln(2);
  130. /* BEGIN BLOCK READ */
  131.           sprintf(s3, "Last Few Callers to %s", syscfg.systemname);
  132.           if (okansi()) {
  133.             i1 = (40 - (strlen(s3) / 2));
  134.             npr("\x1B" "[0;1m%s\r\n",
  135.                 charstr(strlen(s3) + (i1 * 2 - 2), '▄'));
  136.             npr("\x1B" "[0;34;47m%s", charstr(i1, ' '));
  137.             npr("\x1B" "[0;34;47m%s", s3);
  138.             npr("\x1B" "[0;34;47m%s\x1B" "[40m\r\n", charstr(i1 - 2, ' '));
  139.             npr("\x1B" "[0;1;30m%s\r\n",
  140.                 charstr(strlen(s3) + (i1 * 2 - 2), '▀'));
  141.             ansic(7);
  142.           } else
  143.             pl(s3);
  144.           i1 = (okansi())?213:'+'; outchr(i1);
  145.           i1 = (okansi())?205:'-'; outstr(charstr(7,i1));
  146.           i1 = (okansi())?209:'+'; outchr(i1);
  147.           i1 = (okansi())?205:'-'; outstr(charstr(8,i1));
  148.           i1 = (okansi())?209:'+'; outchr(i1);
  149.           i1 = (okansi())?205:'-'; outstr(charstr(25,i1));
  150.           i1 = (okansi())?209:'+'; outchr(i1);
  151.           i1 = (okansi())?205:'-'; outstr(charstr(25,i1));
  152.           i1 = (okansi())?209:'+'; outchr(i1);
  153.           i1 = (okansi())?205:'-'; outstr(charstr(7,i1));
  154.           i1 = (okansi())?184:'+'; outchr(i1);
  155.           nl();
  156.           i1 = (okansi())?179:'|';
  157.           strcpy(s3, (charstr(14, ' ')));
  158.           strcpy(s4, (charstr(20, ' ')));
  159.           sprintf(s5,"\x3""7%c\x3""4 Time  \x3""7%c\x3""4 Call # \x3""7%c\x3"
  160.               "4 Alias/Name%s\x3""7%c\x3""4 From%s\x3""7%c\x3""4 Baud  \x3"
  161.               "7%c", i1, i1, i1, s3, i1, s4, i1, i1);
  162.           pl(s5);
  163.           ansic(7);
  164.           i1 = (okansi())?195:'+'; outchr(i1);
  165.           i1 = (okansi())?205:'-'; outstr(charstr(7,i1));
  166.           i1 = (okansi())?197:'+'; outchr(i1);
  167.           i1 = (okansi())?205:'-'; outstr(charstr(8,i1));
  168.           i1 = (okansi())?197:'+'; outchr(i1);
  169.           i1 = (okansi())?205:'-'; outstr(charstr(25,i1));
  170.           i1 = (okansi())?197:'+'; outchr(i1);
  171.           i1 = (okansi())?205:'-'; outstr(charstr(25,i1));
  172.           i1 = (okansi())?197:'+'; outchr(i1);
  173.           i1 = (okansi())?205:'-'; outstr(charstr(7,i1));
  174.           i1 = (okansi())?180:'+'; outchr(i1);
  175.           nl();
  176.           i=0;
  177.         }
  178.         for (i1=0;i1<strlen(s1); i1++)
  179.           if ((s1[i1] == '│') && (!okansi()))
  180.             s1[i1] = '|';
  181.         s1[i1]=0;
  182.         pl(s1);
  183.       }
  184.     } while (pos<len);
  185.     ansic(7);
  186.     i1 = (okansi())?212:'+'; outchr(i1);
  187.     i1 = (okansi())?205:'-'; outstr(charstr(7,i1));
  188.     i1 = (okansi())?207:'+'; outchr(i1);
  189.     i1 = (okansi())?205:'-'; outstr(charstr(8,i1));
  190.     i1 = (okansi())?207:'+'; outchr(i1);
  191.     i1 = (okansi())?205:'-'; outstr(charstr(25,i1));
  192.     i1 = (okansi())?207:'+'; outchr(i1);
  193.     i1 = (okansi())?205:'-'; outstr(charstr(25,i1));
  194.     i1 = (okansi())?207:'+'; outchr(i1);
  195.     i1 = (okansi())?205:'-'; outstr(charstr(7,i1));
  196.     i1 = (okansi())?190:'+'; outchr(i1);
  197.     nl();
  198.   }
  199.  
  200.   if (usernum > 1) {
  201. /* END BLOCK READ */
  202. ==    sl1(0,"");
  203. ==    sl1(0,stripcolors(s));
  204. ==    sl1(1,"");
  205.  
  206. Jump down just below to find this section and delete the indicated (--) lines:
  207.  
  208. ==    if (cid_name[0]) {
  209. ==      sprintf(s,"CID NAME: %s", cid_name);
  210. ==      sysoplog(s);
  211. ==    }
  212. ==
  213. --    if (sysinfo.flags & OP_FLAGS_SHOW_CITY_ST) {
  214. --      if (syscfg.sysconfig & sysconfig_extended_info)
  215. --        sprintf(s,"1%-6ld %-25.25s %-5.5s %-5.5s %-15.15s %-2.2s %-3.3s %-0
  216. --          status.callernum1,
  217. --          nam(&thisuser,usernum),
  218. --          times(),
  219. --          date(),
  220. --          thisuser.city,
  221. --          thisuser.state,
  222. --          thisuser.country,
  223. --          curspeed,
  224. --          thisuser.ontoday);
  225. --      else
  226. --        sprintf(s,"1%-6ld %-25.25s %-10.10s %-5.5s %-5.5s %-20.20s %2d\r\n",0
  227. --          status.callernum1,
  228. --          nam(&thisuser,usernum),
  229. --          cur_lang_name,
  230. --          times(),
  231. --          date(),
  232. --          curspeed,
  233. --          thisuser.ontoday);
  234. --    } else {
  235. --      sprintf(s,"1%-6ld %-25.25s %-10.10s %-5.5s %-5.5s %-20.20s %2d\r\n",0
  236. --        status.callernum1,
  237. --        nam(&thisuser,usernum),
  238. --        cur_lang_name,
  239. --        times(),
  240. --        date(),
  241. --        curspeed,
  242. --        thisuser.ontoday);
  243. --    }
  244. --
  245. --    if (actsl!=255) {
  246. --      sprintf(s1,"%sUSER.LOG",syscfg.gfilesdir);
  247. --      f=sh_open(s1,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  248. --      if (f>-1) {
  249. --        sh_lseek(f,0L,SEEK_END);
  250. --        sh_write(f,(void *)s,strlen(s));
  251. --        sh_close(f);
  252. --      }
  253. --
  254. --      f=sh_open(s2,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD |S_IWRITE);
  255. --      if (f>-1) {
  256. --        pos=0;
  257. --        copy_line(s1,ss,&pos,len);
  258. --        for (i=1; i<8; i++) {
  259. --          copy_line(s1,ss,&pos,len);
  260. --          strcat(s1,"\r\n");
  261. --          sh_write(f,(void *)s1,strlen(s1));
  262. --        }
  263. --        sh_write(f,(void *)s,strlen(s));
  264. --        sh_close(f);
  265. ==      }
  266. ==    }
  267. ==  }
  268. ==
  269. ==  if (ss!=NULL)
  270. ==    bbsfree(ss);
  271.  
  272. In its place, put this:
  273.  
  274. ==      sysoplog(s);
  275. ==    }
  276. ==
  277. /* BEGIN BLOCK READ */
  278.     if (usernum > 1) {
  279.       sprintf(s3, "%s, %s", thisuser.city, thisuser.state);
  280.       strcpy(s4, thisuser.name);
  281.       properize(s4);
  282.       speed[0]=0;
  283.       i1=0;
  284.       ok=1;
  285.       for (i2=0;(i2<strlen(curspeed) && (ok));i2++) {
  286.         if (curspeed[i2] != 47) {
  287.           speed[i1]=curspeed[i2];
  288.           i1++;
  289.         } else {
  290.           speed[i1]=0;
  291.           ok=0;
  292.         }
  293.       }
  294.       speed[i1]=0;
  295.       sprintf(s,"\x3""7│\x3""2 %5.5s \x3""7│\x3""2 %6ld \x3""7│\x3"
  296.           "2 %-23.23s \x3""7│\x3""2 %-23.23s \x3""7│\x3""2 %-6.6s\x3""7│\r\n",
  297.           times(), status.callernum1, s4, s3, speed);
  298.       sprintf(s1,"%sUSER.LOG",syscfg.gfilesdir);
  299.       f=sh_open(s1,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  300.       if (f>-1) {
  301.         sh_lseek(f,0L,SEEK_END);
  302.         sh_write(f,(void *)s,strlen(s));
  303.         sh_close(f);
  304.       }
  305.  
  306.       f=sh_open(s2,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
  307.       if (f>-1) {
  308.         pos=0;
  309.         copy_line(s1,ss,&pos,len);
  310.         for (i=1; i<8; i++) {
  311.           copy_line(s1,ss,&pos,len);
  312.           strcat(s1,"\r\n");
  313.           sh_write(f,(void *)s1,strlen(s1));
  314.         }
  315.         sh_write(f,(void *)s,strlen(s));
  316.         sh_close(f);
  317. /* END BLOCK READ */
  318. ==      }
  319. ==    }
  320. ==  }
  321. ==
  322. ==  if (ss!=NULL)
  323. ==    bbsfree(ss);
  324.  
  325. Save <LILO.C>
  326.  
  327. Open <MMENU.C>
  328.  
  329. We'll now make your <L>og of the day display the same format.
  330.  
  331. Search for void mainmenu(void) and replace case 'L' with this:
  332.  
  333. ==      case 'L':
  334. /* BEGIN BLOCK READ */
  335.         if (status.callstoday>0) {
  336.           sprintf(s2, "%s Log of the Day", syscfg.systemname);
  337.           if (okansi()) {
  338.             i = (40 - (strlen(s2) / 2));
  339.             npr("\x1B" "[0;1m%s\r\n",
  340.                 charstr(strlen(s2) + (i * 2 - 2), '▄'));
  341.             npr("\x1B" "[0;34;47m%s", charstr(i, ' '));
  342.             npr("\x1B" "[0;34;47m%s", s2);
  343.             npr("\x1B" "[0;34;47m%s\x1B" "[40m\r\n", charstr(i - 2, ' '));
  344.             npr("\x1B" "[0;1;30m%s\r\n",
  345.                 charstr(strlen(s2) + (i * 2 - 2), '▀'));
  346.             ansic(7);
  347.           } else
  348.             pl(s2);
  349.           i = (okansi())?213:'+'; outchr(i);
  350.           i = (okansi())?205:'-'; outstr(charstr(7,i));
  351.           i = (okansi())?209:'+'; outchr(i);
  352.           i = (okansi())?205:'-'; outstr(charstr(8,i));
  353.           i = (okansi())?209:'+'; outchr(i);
  354.           i = (okansi())?205:'-'; outstr(charstr(25,i));
  355.           i = (okansi())?209:'+'; outchr(i);
  356.           i = (okansi())?205:'-'; outstr(charstr(25,i));
  357.           i = (okansi())?209:'+'; outchr(i);
  358.           i = (okansi())?205:'-'; outstr(charstr(7,i));
  359.           i = (okansi())?184:'+'; outchr(i);
  360.           i = (okansi())?179:'|';
  361.           nl();
  362.           sprintf(s1, charstr(14, ' '));
  363.           sprintf(s2, charstr(20, ' '));
  364.           sprintf(s,"\x3""7%c\x3""4 Time  \x3""7%c\x3""4 Call # \x3""7%c\x3"
  365.               "4 Alias/Name%s\x3""7%c\x3""4 From%s\x3""7%c\x3""4 Baud  \x3"
  366.               "7%c", i, i, i, s1, i, s2, i, i);
  367.           pl(s);
  368.           ansic(7);
  369.           i = (okansi())?195:'+'; outchr(i);
  370.           i = (okansi())?196:'-'; outstr(charstr(7,i));
  371.           i = (okansi())?197:'+'; outchr(i);
  372.           i = (okansi())?196:'-'; outstr(charstr(8,i));
  373.           i = (okansi())?197:'+'; outchr(i);
  374.           i = (okansi())?196:'-'; outstr(charstr(25,i));
  375.           i = (okansi())?197:'+'; outchr(i);
  376.           i = (okansi())?196:'-'; outstr(charstr(25,i));
  377.           i = (okansi())?197:'+'; outchr(i);
  378.           i = (okansi())?196:'-'; outstr(charstr(7,i));
  379.           i = (okansi())?180:'+'; outchr(i);
  380.         }
  381. #ifdef RIPDRIVE
  382.         rd_coff();
  383. #endif
  384.         existprint(get_string(1035));
  385. #ifdef RIPDRIVE
  386.         rd_con();
  387. #endif
  388.         if (okansi()) npr("\x1b[1A");
  389.         ansic(7);
  390.         i = (okansi())?212:'+'; outchr(i);
  391.         i = (okansi())?205:'-'; outstr(charstr(7,i));
  392.         i = (okansi())?207:'+'; outchr(i);
  393.         i = (okansi())?205:'-'; outstr(charstr(8,i));
  394.         i = (okansi())?207:'+'; outchr(i);
  395.         i = (okansi())?205:'-'; outstr(charstr(25,i));
  396.         i = (okansi())?207:'+'; outchr(i);
  397.         i = (okansi())?205:'-'; outstr(charstr(25,i));
  398.         i = (okansi())?207:'+'; outchr(i);
  399.         i = (okansi())?205:'-'; outstr(charstr(7,i));
  400.         i = (okansi())?190:'+'; outchr(i);
  401.         nl();
  402.         pausescr();
  403.         break;
  404. /* END BLOCK READ */
  405. ==      case 'M':
  406.  
  407. Save <MMENU.C>
  408.  
  409. Recompile and you're done.  Remember, it won't look right until you've had a
  410. few callers, as the caller information in USER.LOG isn't in the newer format.
  411.  
  412. Look for Cerebrum's LastNet (WWLN100.ZIP) which displays network activity in
  413. the same format, like this:
  414.  
  415. D▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  416. AC▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  417.      A
  418. C      A
  419. C     A
  420. C      A
  421. CEagle's Dare Recent Network Activity                   A
  422. C 
  423. ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀A
  424. C▀▀▀▀▀▀▀▀▀▀▀▀
  425. ╒═══════╤════════════════════════════════╤═════════════════════╤══A
  426. C════╤══════╕
  427.  Time   A
  428. CSystem Name                    A
  429. C Network Address     A
  430. C Sent  RcvA
  431. C
  432. ├───────┼────────────────────────────────┼─────────────────────┼──────┼────A
  433. C──┤
  434. │ 07:34 │ UltraMegaBoardC│ A
  435. CRealityNet @7C│   0K │   A
  436. C0K 
  437. │ 07:36 │ UltraMegaBoardC│ A
  438. CIceNET @3115C│   9K │   A
  439. C0K 
  440. │ 07:37 │ Unconformity in our Dark Realm A
  441. C│ IceNET @3102C│   5K A
  442. C│   1K 
  443. │ 07:39 │ Breakaway BBS [ASV]C│ A
  444. CTerraNet @4064C│  31K │   A
  445. C8K 
  446. │ 07:40 │ Not Your Ordinary BBSC│ A
  447. CBetaLink @1C│   3K │   A
  448. C0K 
  449. │ 07:58 │ Unconformity in Our Dark Realm A
  450. C│ Fido (1:109/567)    │   0K A
  451. C│   0K 
  452. │ 08:22 │ Not Your Ordinary BBSC│ A
  453. CISAnet @3101C│   0K │   A
  454. C3K 
  455. │ 08:33 │ File_Distribution_HQ_[Line3]   A
  456. C│ Fido (1:109/700)    │   0K A
  457. C│ 746K 
  458. │ 08:41 │ Pat WalkerC│ FidA
  459. Co (1:109/566)    │ 697K │   0K A
  460. C
  461. │ 08:42 │ 24 Hour ComputersC│ A
  462. CFido (1:109/500)    │   2K │   A
  463. C1K 
  464. ╘═══════╧════════════════════════════════╧═════════════════════╧══════╧════A
  465. C══╛
  466.  --- Cerebrum's LastNet v1.0
  467. D
  468.  
  469. 4──────────────────────────────────────────────────────────────────────────────0
  470. 4  Eagle's Dare             WWIV Core Support Site              WWIVnet @8213  0
  471. 4  FILEnet @1160                  Laurel, MD                   TerraNet @3104  0
  472. 4  IceNET @3104                 (301) 498-1984              Fidonet 1:109/568  0
  473. 4──────────────────────────────────────────────────────────────────────────────0
  474.