home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 12 / CD_ASCQ_12_0294.iso / vrac / 5mods_4.zip / SPOT013D.MOD < prev   
Text File  |  1994-01-20  |  8KB  |  265 lines

  1. ╓────────────────────────────────────────────────────────────────────────────╖
  2. ║ Mod Name      : SPOT013D.MOD         Mod Author: Spotnick 1@5497 WWIVnet   ║█
  3. ║ Difficulty    : █▒▒▒▒▒▒▒▒▒                                1@5497 WWIVlink  ║█
  4. ║ WWIV Version  : 4.23                                      1@5497 IceNET    ║█
  5. ║ Mod Date      : 01/06/93                                  1@5497 TerraNET  ║█
  6. ║ Files Affected: MISCCMD.C                                 1@5497 RockNET   ║█
  7. ║ Description   : New BBSLIST For WWIV v4.23                                 ║█
  8. ╙────────────────────────────────────────────────────────────────────────────╜█
  9.   ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  10.  
  11. Hello folks, this is the 13th mod I released since v4.22, and it is now time
  12. to go through 4.23 which I had the chance to beta test.
  13.  
  14. /* Long Description */
  15.  
  16.         This adds a lot of features to your BBSLIST, idea has been stolen from
  17. the Vision-X software, it will put your BBSlist in a box and ask more
  18. informations about for it, check it out, much better than standard.
  19.  
  20. Revision D note:
  21.  
  22.   There was a bug when user enter a data at full capacity, now it's fixed, this
  23. should be the last revision I will do for that modification (I hope). Sorry
  24. for all trouble, simply remplace the function or add 1 to each variable on
  25. the 2 lines of chars.
  26.  
  27.  
  28. Revision C note:
  29.  
  30. Seems like I forgot one of the up() functions, I was sure there was only one.
  31.  
  32. Revision B note:
  33.  
  34. I delete the name[0]=0; and I encourage you to do so, don't mind asking me why
  35. I put that there, I'm on medication these days *Sigh*, this was clearing the
  36. BBS name only a few times, still don't know why but... this is the only
  37. change in this revision.
  38.  
  39.  
  40. Step 1 and ONLY step in source code:
  41. ------------------------------------
  42.  
  43. Load MISCCMD.C and remplace void bbslist(void) with this new one
  44.  
  45.  
  46. void bbslist(void)
  47. {
  48.   int i,f,done,ok;
  49.   char s[150],s1[150],ch,ch1,*ss,s2[150],s3[81];
  50.   char phone[13], name[31], speed[6], type[11], meg[11], nup[11], group[11],
  51.        comment[31];
  52.   long l,l1;
  53.  
  54.   done=0;
  55.   do {
  56.     helpl=0;
  57.     nl();
  58.     prt(3,get_string(489));
  59.     ch=onek("QRNA");
  60.     switch(ch) {
  61.       case 'Q':
  62.         done=1;
  63.         break;
  64.       case 'R':
  65.         printfile("BBSLIST.MSG");
  66.         if (okansi())
  67.           npr("\x1b[%dA",1);
  68.         
  69. pl("══════════════════════════════╧════════════╧══════════════╧════════");
  70.         break;
  71.       case 'N':
  72.         print_net_listing(0);
  73.         break;
  74.       case 'A':
  75.         helpl=25;
  76.         if ((actsl<=10)) {
  77.           nl();
  78.           nl();
  79.           pl(get_string(490));
  80.           nl();
  81.           break;
  82.         }
  83.         if (thisuser.restrict & restrict_automessage) {
  84.           nl();
  85.           nl();
  86.           pl(get_string(491));
  87.           nl();
  88.           break;
  89.         }
  90.         nl();
  91.         pl(get_string(492));
  92.         pl(get_string(493));
  93.         outstr(":");
  94.         mpl(12);
  95.         input(phone,12);
  96.         if ((phone[3]!='-') || (phone[7]!='-'))
  97.           phone[0]=0;
  98.         for (i=0; i<12; i++) {
  99.           if (strchr("0123456789-",phone[i])==0)
  100.             phone[0]=0;
  101.         }
  102.         if (strlen(phone)==12) {
  103.           ok=1;
  104.           sprintf(s1,"%sBBSLIST.MSG",syscfg.gfilesdir);
  105.           f=sh_open1(s1,O_RDONLY | O_BINARY);
  106.           if (f>0) {
  107.             sh_lseek(f,0L,SEEK_SET);
  108.             l=filelength(f);
  109.             if ((ss=malloca(l+500L))==NULL) {
  110.               sh_close(f);
  111.               return;
  112.             }
  113.             sh_read(f,ss,(int)l);
  114.             l1=0L;
  115.             while ((l1<l) && (ok)) {
  116.               i=0;
  117.               do {
  118.                 ch=ss[l1++];
  119.                 s1[i]=ch;
  120.                 if (ch==13)
  121.                   s1[i]=0;
  122.                 ++i;
  123.               } while ((ch!=10) && (i<120) && (l1<l));
  124.               if (strstr(s1,phone)!=NULL)
  125.                 ok=0;
  126.               if (strncmp(s1,phone,12)==0)
  127.                 ok=0;
  128.             }
  129.             farfree(ss);
  130.             sh_close(f);
  131.           }
  132.           if (ok) {
  133.             pl(get_string(494));
  134.             nl();
  135.             nl();
  136.             pl(get_string(495));
  137.             outstr(":");
  138.             mpl(30);
  139.             inputl(name,30);
  140.             nl();
  141.             pl(get_string(496));
  142.             pl(get_string(497));
  143.             outstr(":");
  144.             mpl(4);
  145.             input(speed,4);
  146.             nl();
  147.             pl(get_string(498));
  148.             outstr(":");
  149.             mpl(9);
  150.             input(type,9);
  151.             nl();
  152.            pl("How many hard disk space this BBS has?");
  153.            outstr(":");
  154.            mpl(10);
  155.            inputl(meg,10);
  156.            if (meg[0]==0)
  157.              strcpy(meg,"Unknown");
  158.            nl();
  159.            pl("What is the new user password?");
  160.            outstr(":");
  161.            mpl(10);
  162.            inputl(nup,10);
  163.            if (nup[0]==0)
  164.              strcpy(nup,"None");
  165.            nl();
  166.            pl("Enter Group Affiliations");
  167.            outstr(":");
  168.            mpl(10);
  169.            inputl(group,10);
  170.            if (group[0]==0)
  171.              strcpy(group,"None");
  172.            nl();
  173.            pl("Enter Comment About This BBS");
  174.            outstr(":");
  175.            mpl(30);
  176.            inputl(comment,30);
  177.            nl();
  178.            
  179. sprintf(s3,"══════════════════════════════╪════════════╪══════════════╪═══════
  180. ═\r\n");
  181.            sprintf(s,"%-30s│ %-10s │ %-12s │ %-5s\r\n",name, type, phone, 
  182. speed);
  183.            sprintf(s2,"%-30s│ %-10s │ %-12s │ %-5s\r\n",comment, meg, nup, 
  184. group);
  185.            nl();
  186.            nl();
  187.            pl(s);
  188.            if (okansi())
  189.              npr("\x1b[%dA",1);
  190.            pl(s2);
  191.            nl();
  192.            prt(9,get_string(499));
  193.             if (yn()) {
  194.               sprintf(s1,"%sBBSLIST.MSG",syscfg.gfilesdir);
  195.               f=sh_open(s1,O_RDWR | O_CREAT | O_BINARY, S_IREAD | S_IWRITE);
  196.               if (filelength(f)) {
  197.                 sh_lseek(f,-1L,SEEK_END);
  198.                 sh_read(f,((void *)&ch1),1);
  199.                 if (ch1==26)
  200.                   sh_lseek(f,-1L,SEEK_END);
  201.               }
  202.               sh_write(f,(void *)s3,strlen(s3));
  203.               sh_write(f,(void *)s,strlen(s));
  204.               sh_write(f,(void *)s2,strlen(s2));
  205.               sh_close(f);
  206.               nl();
  207.               pl(get_string(500));
  208.             }
  209.           } else {
  210.             pl(get_string(501));
  211.             nl();
  212.             nl();
  213.           }
  214.         } else {
  215.           nl();
  216.           pl(get_string(502));
  217.           nl();
  218.         }
  219.         break;
  220.     }
  221.   } while ((!done) && (!hangup));
  222. }
  223.  
  224. Step 2:
  225.  
  226. Delete your old BBSLIST.MSG in Gfiles dir, and ask other people to re-enter
  227. their datas in your new bbslist
  228.  
  229. Here is the attach file for header of the BBSLIST.MSG file, to explain how
  230. to read the new BBSLIST:
  231.  
  232. Cut as BBSLIST.MSG and change to your BBS name please.
  233. -------------------------------------------------------------------------
  234.                          Alternative Worlds BBS Listing
  235.  
  236. ══════════════════════════════╤════════════╤══════════════╤════════
  237. BBS Name                      │ Software   │ Phone Number │ Speed
  238. Comment On BBS                │ HD Space   │ New User Pwd │ Group
  239. ══════════════════════════════╧════════════╧══════════════╧════════
  240.  
  241. ══════════════════════════════╤════════════╤══════════════╤════════
  242. -------------------------------------------------------------------------
  243.  
  244.  
  245. Step 3:
  246.  
  247. Recompile and enjoy, I actually did a mod that not require to compile entire
  248. BBS (thank me).
  249.  
  250. If you use this mod, let me know! I love to know who's using my mod and that
  251. way you'll be informed of maybe new updates. Also, if you see this mod on my
  252. system the color is very different I assure, but it's the same thing.
  253.  
  254. Hope you'll like it.
  255.  
  256. Where to reach me?
  257.  
  258.         At all header's address, and through my bulletin board:
  259.  
  260. Alternative Worlds, Official WWIV Support Board, (514)-664-4503
  261. From Montréal, Québec, Canada, Auto-SysOp Validation With No Ratio At 1st Call
  262.  
  263.  
  264.  
  265.