home *** CD-ROM | disk | FTP | other *** search
/ The Arcade BBS / arcadebbs.zip / arcadebbs / bbstools / MODS / FMD-03A.ZIP / FMD-03A.MOD
Encoding:
Text File  |  1995-06-09  |  11.9 KB  |  352 lines

  1. Spotnick #1 @20397
  2. Mon Jun 05 02:05:03 1995
  3. 0R 34 06/09 07:13 WWIVNET 4051->8421
  4. 0R 34 06/08 18:18 WWIVNet 4001->4051
  5. 0R 34 06/08 14:07 WWIVnet 4000->4001
  6. 0R 34 06/08 05:34 WWIVnet ->4000
  7. 0R 34 06/05 22:43 WWIVnet 4001->4000
  8. 0R 34 06/06 06:35 WWIVnet 20001->4001
  9. 0R 34 06/05 02:07 WWIVnet 20397->20001
  10. 0R 34 06/05 02:10 WWIVnet ->20397
  11.  
  12.    ┌┬─── ──  ─   ─  ── ───────────────────────────────────────────────────┬─ ∙∙
  13.    ││                    Alternative Worlds Presents                      │
  14.    └┼─────────────────────────────────────────────────────────────────────┐
  15.    ││ Mod Name       » FMD-03a.MOD                                        │∙
  16.    ││ Difficulty     » █▒▒▒▒▒▒▒▒▒▒ (1/10)                                 │:
  17.    ││ WWIV Version   » 4.24                                               ││
  18.    ││ Date Affected  » 06/01/95                                           ││
  19.    :│ Files Affected » MISCCMD.C / NEWUSER.C                              ││
  20.    ∙│ Description    » New BBS Listing System For WWIV                    ││
  21.     └─────────────────────────────────────────────────────────────────────┼┐
  22.     │       A French Mod Division Release - (C) 1995 FMD Software         ││
  23. ∙∙ ─┴─────────────────────────────────────────────────── ──  ─   ─  ── ───└┘
  24.  
  25.  
  26.  ┌┬══════════════════┐
  27.  ││ Long Description ││
  28.   └══════════════════┴┘
  29.  
  30.    This modification will change your BBS list system. Users will be prompted
  31. to enter more informations about their BBS (Hard Disk Space, Group Affiliation,
  32. New User Password). This modification will also create two bbslists, one in
  33. ANSI, the other in Ascii. There is a new "download" options that will send to
  34. the user the Ascii version of the BBSlist.
  35.  
  36. Revision A:
  37.  
  38.  - Updated for WWIV v4.24
  39.  - Filename now defined in WWIV.INI
  40.  
  41.  ┌┬═══════┐
  42.  ││ Tests ││
  43.   └═══════┴┘
  44.  
  45.   This modification has been tested on a virgin WWIV v4.24 source using
  46.   Borland C++ v4.5
  47.  
  48. ──────────────────────────────────────────────────────────────────────────────
  49.                                    Legend
  50.                           ╔═══╤══════════════════┐
  51.                           │ + │ Add This Line    │
  52.                           │ - │ Delete This Line │
  53.                           │ * │ Modify This Line │
  54.                           │ = │ Existing Line    │
  55.                           └═══╧══════════════════╝
  56. ───[Step 1]────────────────────────────────────────────────────────────────────
  57.  
  58. Load MISCCMD.C and remplace void bbslist
  59.  
  60. void bbslist(void)
  61. {
  62.   int i, f, done, ok;
  63.   char s[150], s1[150], ch, ch1, *ss, *ss1, s2[150], s3[81], s4[150];
  64.   char s5[150], s6[150], phone[13], name[31], speed[6], type[11], meg[11];
  65.   char nup[11], group[11], comment[41], fname[13];
  66.   long l, l1;
  67.  
  68.   done= 0;
  69.   do
  70.   {
  71.     helpl= 0;
  72.     nl();
  73.     prt(2, "BBS list: R:ead, A:dd, N:et, D:ownload, Q:uit  :");
  74.     ch= onek("QRNAD");
  75.     switch (ch)
  76.     {
  77.       case 'Q': done= 1; break;
  78.       case 'R':
  79.          existprint("BBSLIST");
  80.          if (okansi()) {
  81.            npr("\x1b[%dA", 1);
  82.            npr("7%s╧════════════╧══════════════╧════════", charstr(40, '═'));
  83.          } else
  84.            npr("7%s+------------+--------------+--------\r\n", charstr(40, '-'));
  85.          nl();
  86.       break;
  87.       case 'N': print_net_listing(0); break;
  88.       case 'A':
  89.         helpl= 25;
  90.         if ((actsl<=10))
  91.         {
  92.           nl();
  93.           nl();
  94.           pl(get_string(490));
  95.           nl();
  96.           break;
  97.         }
  98.         if (thisuser.restrict & restrict_automessage)
  99.         {
  100.           nl();
  101.           nl();
  102.           pl(get_string(491));
  103.           nl();
  104.           break;
  105.         }
  106.         nl();
  107.         pl(get_string(492));
  108.         pl(get_string(493));
  109.         outstr(":");
  110.         mpl(12);
  111.         input(phone, 12);
  112.         if ((phone[3]!='-') || (phone[7]!='-'))
  113.           phone[0]= 0;
  114.         for (i= 0; i<12; i++)
  115.         {
  116.           if (strchr("0123456789-", phone[i])==0)
  117.                 phone[0]= 0;
  118.         }
  119.         if (strlen(phone)==12)
  120.         {
  121.           ok= 1;
  122.           sprintf(s1, "%sBBSLIST.MSG", syscfg.gfilesdir);
  123.           f= sh_open1(s1, O_RDONLY | O_BINARY);
  124.           if (f>0)
  125.           {
  126.             sh_lseek(f, 0L, SEEK_SET);
  127.             l= filelength(f);
  128.             if ((ss= malloca(l+500L))==NULL)
  129.             {
  130.               sh_close(f);
  131.               return;
  132.             }
  133.             sh_read(f, ss, (int)l);
  134.             l1= 0L;
  135.             while ((l1<l) && (ok))
  136.             {
  137.               i= 0;
  138.               do
  139.               {
  140.                  ch= ss[l1++];
  141.                  s1[i]= ch;
  142.                  if (ch==13)
  143.                    s1[i]= 0;
  144.                  ++i;
  145.               } while ((ch!=10) && (i<120) && (l1<l));
  146.               if (strstr(s1, phone)!=NULL)
  147.                 ok= 0;
  148.               if (strncmp(s1, phone, 12)==0)
  149.                 ok= 0;
  150.             }
  151.             farfree(ss);
  152.             sh_close(f);
  153.           }
  154.           if (ok)
  155.           {
  156.             pl(get_string(494));
  157.             nl();
  158.             nl();
  159.             pl("Enter the BBS name:");
  160.             outstr(":");
  161.             mpl(40);
  162.             inputl(name, 40);
  163.             nl();
  164.             pl(get_string(496));
  165.             pl(get_string(497));
  166.             outstr(":");
  167.             mpl(4);
  168.             input(speed, 4);
  169.             nl();
  170.             pl(get_string(498));
  171.             outstr(":");
  172.             mpl(9);
  173.             input(type, 9);
  174.             nl();
  175.             pl("What size is the hard disk of this BBS (<C/R>=Unknown):");
  176.             outstr(":");
  177.             mpl(10);
  178.             inputl(meg, 10);
  179.             if (meg[0]==0)
  180.               strcpy(meg, "Unknown");
  181.             nl();
  182.             pl("What is the new user password (<C/R>=None):");
  183.             outstr(":");
  184.             mpl(10);
  185.             inputl(nup, 10);
  186.             if (nup[0]==0)
  187.               strcpy(nup, "None");
  188.             nl();
  189.             pl("Enter group affilitions (<C/R>=None):");
  190.             outstr(":");
  191.             mpl(8);
  192.             inputl(group, 8);
  193.             if (group[0]==0)
  194.               strcpy(group, "None");
  195.             nl();
  196.             pl("Enter a comment about this BBS:");
  197.             outstr(":");
  198.             mpl(40);
  199.             inputl(comment, 40);
  200.             nl();
  201.             sprintf(s3, "7%s╪════════════╪══════════════╪════════\r\n", charstr(40, '═'));
  202.             sprintf(s4, "%s+------------+--------------+--------\r\n", charstr(40, '-'));
  203.             sprintf(s, "1%-40s7│9 %-10s 7│ 9%-12s 7│ 9%-5s\r\n", name, type, phone, speed);
  204.             sprintf(s5, "%-40s| %-10s | %-12s | %-5s\r\n", name, type, phone, speed);
  205.             sprintf(s2, "1%-40s7│9 %-10s 7│ 9%-12s 7│ 9%-8.8s\r\n", comment, meg, nup, group);
  206.             sprintf(s6, "%-40s| %-10s | %-12s | %-8.8s\r\n", comment, meg, nup, group);
  207.             nl();
  208.             nl();
  209.             npr(s);
  210.             npr(s2);
  211.             nl();
  212.             prt(9, get_string(499));
  213.             if (ny())
  214.             {
  215.               sprintf(s1, "%sBBSLIST.ANS", syscfg.gfilesdir);
  216.               f= sh_open(s1, O_RDWR | O_CREAT | O_BINARY, S_IREAD | S_IWRITE);
  217.               if (filelength(f))
  218.               {
  219.                 sh_lseek(f, -1L, SEEK_END);
  220.                 sh_read(f, ((void *)&ch1), 1);
  221.                 if (ch1==26)
  222.                   sh_lseek(f, -1L, SEEK_END);
  223.               }
  224.               sh_write(f, (void *)s3, strlen(s3));
  225.               sh_write(f, (void *)s, strlen(s));
  226.               sh_write(f, (void *)s2, strlen(s2));
  227.               sh_close(f);
  228.               sprintf(s1, "%sBBSLIST.MSG", syscfg.gfilesdir);
  229.               ch1=0;
  230.               f= sh_open(s1, O_RDWR | O_CREAT | O_BINARY, S_IREAD | S_IWRITE);
  231.               if (filelength(f))
  232.               {
  233.                 sh_lseek(f, -1L, SEEK_END);
  234.                 sh_read(f, ((void *)&ch1), 1);
  235.                 if (ch1==26)
  236.                   sh_lseek(f, -1L, SEEK_END);
  237.               }
  238.               sh_write(f, (void *)s4, strlen(s4));
  239.               sh_write(f, (void *)s5, strlen(s5));
  240.               sh_write(f, (void *)s6, strlen(s6));
  241.               sh_close(f);
  242.               nl();
  243.               pl(get_string(500));
  244.             }
  245.           } else  {
  246.             pl(get_string(501));
  247.             nl();
  248.             nl();
  249.           }
  250.         } else {
  251.           nl();
  252.           pl(get_string(502));
  253.           nl();
  254.         }
  255.       break;
  256.       case 'D':
  257.         strcpy(fname, "WWIV-BBS");
  258.         if (ini_init("WWIV.INI", "FMD", NULL)==0)
  259.         {
  260.           if ((ss1=ini_get("BBSLIST_NAME", -1, NULL))!=NULL)
  261.             if (ss1)
  262.               strcpy(fname, ss1);
  263.           ini_done();
  264.         }
  265.         sprintf(s, "%s\\BBSLIST.MSG", syscfg.gfilesdir);
  266.         sprintf(s1, "%s\\%s.LST", syscfgovr.tempdir, fname);
  267.         copy_file(s, s1);
  268.         sprintf(s, "%s.LST", fname);
  269.         add_arc(fname, s, 0);
  270.         download_temp_arc(fname, 0);
  271.         sprintf(s, "%s.*", fname);
  272.         remove_from_temp(s, syscfgovr.tempdir, 0);
  273.       break;
  274.     }
  275.   } while ((!done) && (!hangup));
  276. }
  277.  
  278. ───[Step 2]────────────────────────────────────────────────────────────────────
  279.  
  280. Unzip the file BBSLIST.ZIP and place the files in your GFILES directory.
  281.  
  282. ───[Step 3]────────────────────────────────────────────────────────────────────
  283.  
  284. If you're using Simple ASV, add the following lines in NEWUSER.C:
  285.  
  286. =         existprint("ASV");
  287. =         nl();
  288. =         pausescr();
  289. +         prt(5, "Do you wish to enter your BBS in our BBSlist? ");
  290. +         if (yn())
  291. +           bbslist();
  292. =       }
  293. =     }
  294.  
  295. ───[Step 4]────────────────────────────────────────────────────────────────────
  296.  
  297. Load WWIV.INI and if you don't have a [FMD] section, create it, and add the
  298. following line in it:
  299.  
  300. [FMD]
  301. ; BBS List File Name When Downloaded (No Extention)
  302. BBSLIST_NAME = WWIV-BBS
  303.  
  304. ───[Step 5]────────────────────────────────────────────────────────────────────
  305.  
  306. Recompile and enjoy, I actually did a mod that not require to compile entire
  307. BBS.
  308.  
  309. French Proverb: L'argent n'a pas d'odeur
  310.  
  311. For comments, bug report and suggestion, e-mail at the following address:
  312.  
  313. Nicolas LeBlanc  2@20302.WWIVnet (aka Spotnick)
  314.                  -> spotnick@gamemaster.qc.ca
  315. Martin Bourdages 242@20306 / 3@20302.WWIVnet (aka Dark Shadow)
  316.                  -> martin.bourdages@radio.magicnet.com
  317.  
  318.                  =>   French Mod Division Support Sub   <=
  319.                                 SubType: FMD
  320.                            Host: @20302 (WWIVnet)
  321.                       Scan sublist for other networks
  322.  
  323.         Read PRODUCTS.FMD for the full list of our support systems.
  324.  
  325. ───[EOF]──────────────────────────────────────────────────────────────────────
  326.  
  327. section 1 of 1 of file bbslist.zip  < uuencode 5.32 by R.E.M. >
  328.  
  329. begin 644 bbslist.zip
  330. M4$L#!!0``H`(````P1Z//P2-Z0```'L"```+`!L`0D)33$E35"Y!3E,'`!<`
  331. M`.420VA-X50.M)>A8!.)#E\G9N>X2F.UD<].@T`0AQ/W1L([S`O0%$07KI54
  332. M301)UI8SPBB;R"[9A?)@/H<QOI'0DOY)0UL/SNWW';[);^:*T"1Y7,+*G3@N
  333. MS&8,GKBNN7@W#=,@].O"^1D->[$3VOV&*"T1S@RAG\0')M_J-E6X`4#\N)`"
  334. M(6K*5U0#8A5BWJOO9%FBJ.%9K'N<43\$P*HTVZDC;&&A.VW<Y@.Z5[*I_G*&
  335. M[]&P%__ILB^8%4):\4>C3_;?U%\_?0NZKC>V:]UZU+J>VOZ`'&_B]>:Y0I$5
  336. M$,H<`K[BFDL!8<H%,%[CD=EVIG!@COJ7':)Y&)C&+U!+`P04``*`"````,$>
  337. MH9NI\,X```!5`@``"P```$)"4TQ)4U0N35-'K9%-;X)`$(;OF^Q_F+M9(TA;
  338. M>D6"FA1*0BOG%4;91&;)`G+QQQ<TC>W!CP/O[<EDGLSDA=M)T_4&CL[4=L#S
  339. M$OA0=:-HSQEGXLE,;L(?Y&RP1[)$>)`3)'K7=-+@&>)"$T+4EELTPZQ"S#E;
  340. MZ+)$:N"3SE??D:W\?D=F%UF$'7S7O2CN\AZ71K?5Z(^.+OS"K"`MXD-;W_WV
  341. M="GS%UXL1[RZ;V(^L]Y[M-VIRUE@D+("0IV#KXZJ5IH@E(H@40W^<UGV[`K1
  342. M4,(5@]#G[`=02P$"%``4``(`"````,$>CS\$C>D```![`@``"P`N```````%
  343. M`"!3$J$`````0D)33$E35"Y!3E,'`"H`90-EL$4X'[ML#GLYHM/"]26`'W!M
  344. M>^2L!4#(L'']M-"FAU5U6C^U'CI44$L!`A0`%``"``@```#!'J&;J?#.````
  345. M50(```L`````````!0`@37MG+0$``$)"4TQ)4U0N35-'4$L%!@`````"``(`
  346. *H````"0"`````)]X
  347. `
  348. end
  349. sum -r/size 20334/1038 section (from "begin" to "end")
  350. sum -r/size 2422/730 entire input file
  351.  
  352.