home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / ALLMODS.ZIP / BEAM202.ZIP / BEAM202.MOD next >
Encoding:
Text File  |  1995-07-03  |  6.4 KB  |  211 lines

  1. 1Frank #1 @8339 7(1- the abstract -7)
  2. Fri Jun 30 12:09:22 1995
  3. 9Re2: 1I made a mod for the BBS Listing program0
  4. Beamer #1 @3453
  5. Tue Jun 27 12:09:48 1995
  6. RE: 9Re2: 1I made a mod for the BBS Listing program0
  7.  
  8. 7[2Reply7]1: 9Please Reply d00d!0
  9.  
  10. ╔═══════════════════════════════════════════════════════════════════════════╗
  11. ║ MOD Desc     : Adds the Digital BBS listing Program to run inside WWIV    ║
  12. ║                REQUIRES that you have DBLST1+.ZIP BBS Listing Program in  ║
  13. ║         you WWIV directory!!!!!!                                   ║
  14. ║ Filename     : BEAM202.mod                  Mod Version  : 1              ║
  15. ║ Author       : Beamer                       WWIV Version : 4.24           ║
  16. ║                                                                           ║
  17. ║ Network      : 7@2148 WWIVnet                                             ║
  18. ║ Addresses      1@3450 DesertNet                                           ║
  19. ║                1@3453 DigiNet                                             ║
  20. ║                1@3452 Infiniti                                            ║
  21. ║                1@3459 TerraNet                                            ║
  22. ║                                                                           ║
  23. ║ Last updated : 6/27/95                                                    ║
  24. ║ Difficulty   : █░░░░░░░░                                            ║
  25. ║                                                                           ║
  26. ╚═══════════════════════════════════════════════════════════════════════════╝
  27. ┌───────────────────────────────────────────────────────────────────────────┐
  28. │ Legend:                                                                   │
  29. │                                                                           │
  30. │  - Commeny out or delete                                                  │
  31. │  + Add this                                                               │
  32. │  = Leave alone                                                            │
  33. │  @ Change this                                                            │
  34. └───────────────────────────────────────────────────────────────────────────┘
  35.  
  36.  
  37. ──────────────────────────────────────────────────────────────────────────────
  38. Step 0: Dahhhhh!!!
  39. ──────────────────────────────────────────────────────────────────────────────
  40.  
  41. ──────────────────────────────────────────────────────────────────────────────
  42. Step 1: If you want a //slash command, then add this to MMENU.C just above
  43.     'if (strcmp(s,"CLS")==0) {'
  44. ──────────────────────────────────────────────────────────────────────────────
  45.  
  46. +  if (strcmp(s,"BBS")==0) {
  47. +    if ((okansi()) && (!rip_on())) {
  48. +      CLS();
  49. +      prt(7,"Please hold while program is loading2...");0
  50. +      extern_prog("BBSLIST.EXE",EFLAG_SHRINK|EFLAG_NOPAUSE|EFLAG_TOPSCREEN);
  51. +    } else {
  52. +      nl();
  53. +      pl("7This is a NON-RIP 'ANSI' option3, 7Sorry2.");0
  54. +      nl();
  55. +    }
  56. +  }
  57. =  if (strcmp(s,"CLS")==0) {
  58. =    outstr("\f");
  59. =    if (rip_on()) {
  60.  
  61.  
  62. ──────────────────────────────────────────────────────────────────────────────
  63. Step 2: If you want this to replace your stock WWIV BBS Listing program,
  64.     then open MISCCMD.C and replace 'void bbslist(void)' with mine...
  65. ──────────────────────────────────────────────────────────────────────────────
  66.  
  67.  
  68. void bbslist(void)
  69. {
  70.   int i,f,done,ok;
  71.   char s[150],s1[150],ch,ch1,*ss;
  72.   char phone[13], name[51], speed[5], type[5];
  73.   long l,l1;
  74.  
  75.   if ((okansi()) && (!rip_on())) {
  76.     CLS();
  77.     prt(7,"Please hold while program is loading2...");0
  78.     extern_prog("BBSLIST.EXE",EFLAG_SHRINK|EFLAG_NOPAUSE|EFLAG_TOPSCREEN);
  79.   } else {
  80.     done=0;
  81.     do {
  82.       helpl=0;
  83.       nl();
  84.       prt(2,get_string(489));
  85.       ch=onek("QRNA");
  86.       switch(ch) {
  87.     case 'Q':
  88.       done=1;
  89.       break;
  90.     case 'R':
  91.       printfile("BBSLIST.MSG");
  92.       break;
  93.     case 'N':
  94.       print_net_listing(0);
  95.       break;
  96.     case 'A':
  97.       helpl=25;
  98.       if ((actsl<=10)) {
  99.         nln(2);
  100.         pl(get_string(490));
  101.         nl();
  102.         break;
  103.       }
  104.       if (thisuser.restrict & restrict_automessage) {
  105.         nln(2);
  106.         pl(get_string(491));
  107.         nl();
  108.         break;
  109.       }
  110.       nl();
  111.       pl(get_string(492));
  112.       pl(get_string(493));
  113.       outstr(":");
  114.       mpl(12);
  115.       input(phone,12);
  116.       if ((phone[3]!='-') || (phone[7]!='-'))
  117.         phone[0]=0;
  118.       for (i=0; i<12; i++) {
  119.         if (strchr("0123456789-",phone[i])==0)
  120.           phone[0]=0;
  121.       }
  122.       if (strlen(phone)==12) {
  123.         ok=1;
  124.         sprintf(s1,"%sBBSLIST.MSG",syscfg.gfilesdir);
  125.           f=sh_open1(s1,O_RDONLY | O_BINARY);
  126.         if (f>0) {
  127.           sh_lseek(f,0L,SEEK_SET);
  128.           l=filelength(f);
  129.           if ((ss=malloca(l+500L))==NULL) {
  130.         sh_close(f);
  131.         return;
  132.           }
  133.           sh_read(f,ss,(int)l);
  134.           l1=0L;
  135.           while ((l1<l) && (ok)) {
  136.         i=0;
  137.         do {
  138.           ch=ss[l1++];
  139.           s1[i]=ch;
  140.           if (ch==13)
  141.             s1[i]=0;
  142.           ++i;
  143.         } while ((ch!=10) && (i<120) && (l1<l));
  144.         if (strstr(s1,phone)!=NULL)
  145.           ok=0;
  146.         if (strncmp(s1,phone,12)==0)
  147.           ok=0;
  148.           }
  149.           bbsfree(ss);
  150.           sh_close(f);
  151.         }
  152.         if (ok) {
  153.           pl(get_string(494));
  154.           nln(2);
  155.           pl(get_string(495));
  156.           outstr(":");
  157.           mpl(50);
  158.           inputl(name,50);
  159.           nl();
  160.           pl(get_string(496));
  161.           pl(get_string(497));
  162.           outstr(":");
  163.           mpl(4);
  164.           input(speed,4);
  165.           nl();
  166.           pl(get_string(498));
  167.           outstr(":");
  168.           mpl(4);
  169.           input(type,4);
  170.           sprintf(s,"%12s  %-50s  [%4s] (%4s)\r\n",
  171.         phone, name, speed, type);
  172.           nln(2);
  173.           pl(s);
  174.           nl();
  175.           prt(5,get_string(499));
  176.           if (yn()) {
  177.         sprintf(s1,"%sBBSLIST.MSG",syscfg.gfilesdir);
  178.         f=sh_open(s1,O_RDWR | O_CREAT | O_BINARY, S_IREAD | S_IWRITE);
  179.         if (filelength(f)) {
  180.           sh_lseek(f,-1L,SEEK_END);
  181.           sh_read(f,((void *)&ch1),1);
  182.           if (ch1==26)
  183.             sh_lseek(f,-1L,SEEK_END);
  184.         }
  185.         sh_write(f,(void *)s,strlen(s));
  186.         sh_close(f);
  187.         nl();
  188.         pl(get_string(500));
  189.           }
  190.         } else {
  191.           pl(get_string(501));
  192.           nln(2);
  193.         }
  194.       } else {
  195.         nl();
  196.         pl(get_string(502));
  197.         nl();
  198.       }
  199.       break;
  200.       }
  201.     } while ((!done) && (!hangup));
  202.   }
  203. }
  204.  
  205. ──────────────────────────────────────────────────────────────────────────────
  206. Step 3: Save, Compile, and Enjoy!
  207. ──────────────────────────────────────────────────────────────────────────────
  208.  
  209.                 After Dark BBs
  210.                 (314) 946-1730
  211.