home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / SYSOP / MODS1.ZIP / CBDFLT.MOD < prev    next >
Text File  |  1995-06-12  |  13KB  |  411 lines

  1.  
  2.                    CBDFLT.MOD v1.3
  3.            Display your Defaults Section in Full Screen ANSI
  4.                    For WWIV v4.23+
  5.  
  6. ------------------------------------------------------------------------------
  7.   As always, you should backup your source code before using this mod.  It 
  8.   could save your butt if something goes wrong.
  9. ------------------------------------------------------------------------------
  10.  
  11.       The idea for this mod came from looking at the generic default section
  12. and wishing that it wasn't so generic.  I've seen other mods for ANSI Default
  13. Sections, but they either weren't good enough or added stuff I didn't want.
  14. This mod is just what I wanted to find, but couldn't.  I hope this mod is just
  15. what you've been looking for also.  I adopted the ansi, with a few changes,
  16. from the French Mod Division.  The mod itself is an original creation, using
  17. other mods strictly for reference.
  18.  
  19. FIXED: Version 1.0 did not work correctly in Non-ANSI mode, this problem was
  20.        corrected in v1.1.
  21.  
  22. FIXED: Options in Non-ANSI mode did not correspond with those in ANSI, this 
  23.        has been corrected in v1.2.
  24.  
  25. FIXED: In previous versions, the clear screen option only worked with public 
  26.        messages.  Starting with v1.3 it works with E-mail also.
  27.  
  28.  
  29. >> If upgrading from v1.2 do Step 4, and in Step 6 add heart codes shown  <<
  30. >> in lines 391 and 398-1149.  This will correct spacing problems and add <<
  31. >> the clear screen option to E-Mail.  You have now upgraded to v1.3      <<
  32.  
  33.  
  34. /*Add*/     =Add this line
  35. /*Change*/  =Change this line
  36. /*Remove*/  =Remove this line
  37.  
  38. ------------------------------------------------------------------------------
  39. Step 1: Replace print_cur_stat() in DEFAULTS.C with the following...
  40.  
  41.     NOTE: Make sure the string number in line 114 of this mod is the same
  42.           as the string number you add in Step 5.
  43.  
  44.  
  45. void print_cur_stat(void)
  46. {
  47.   userrec ur;
  48.  
  49.   outchr(12);
  50.  
  51.  if (okansi()) {   
  52.    existprint("DEFAULT.ANS");
  53.    goxy(23,6);
  54.      npr("%s",cur_lang_name);
  55.    goxy(63,6);
  56.      npr("%d X %d\r\n", thisuser.screenchars,thisuser.screenlines);
  57.    goxy(23,7);
  58.      npr("%s\r\n", (thisuser.sysstatus & sysstatus_ansi)?
  59.        ((thisuser.sysstatus & sysstatus_color)? get_string(385):get_string(386)):
  60.        get_string(387));
  61.    goxy(63,7);
  62.      npr("%s\r\n",(thisuser.sysstatus & sysstatus_pause_on_page)?
  63.        get_string(389):get_string(390));
  64.    goxy(23,8);
  65.      npr("%s\r\n",(thisuser.sysstatus & sysstatus_clr_scrn)?
  66.        str_yes:str_no);
  67.    goxy(63,8);
  68.      npr("%s\r\n",((thisuser.defed) && (thisuser.defed<=numed))?
  69.        editors[thisuser.defed-1].description:get_string(5));
  70.    goxy(23,9);
  71.      npr("%s\r\n",(thisuser.sysstatus & sysstatus_extra_color)?
  72.        str_yes:str_no);
  73.    goxy(63,9);
  74.      npr("%d\r\n",thisuser.optional_val);
  75.    goxy(23,10);
  76.      npr("%s\r\n",(thisuser.sysstatus & sysstatus_conference)?
  77.        str_yes:str_no);
  78.    goxy(63,10);
  79.      if (thisuser.wwiv_regnum)
  80.        npr("%ld\r\n",thisuser.wwiv_regnum);
  81.      else
  82.        npr(get_string(402));
  83.    goxy(23,11);
  84.      if ((thisuser.forwardsys==0) && (thisuser.forwardusr==0))
  85.        npr("%s\r\n",(get_string(392)));
  86.      else {
  87.      if (thisuser.forwardsys) {
  88.        outstr(get_string(393));    
  89.        npr("%s #%u @%u.\r\n",
  90.      net_networks[thisuser.net_num].name,
  91.      thisuser.forwardusr,thisuser.forwardsys);
  92.      } else {
  93.        if (thisuser.forwardusr==65535) {
  94.        npr("%s\r\n",(get_string(300)));
  95.        } else {
  96.     read_user(thisuser.forwardusr,&ur);
  97.     if (ur.inact & inact_deleted) {
  98.        thisuser.forwardusr=0;
  99.        npr("%s\r\n",(get_string(392)));
  100.     } else {
  101.       outstr(get_string(393));
  102.       npr("%s\r\n",nam(&ur,thisuser.forwardusr));
  103.     }
  104.       }
  105.      }
  106.     }
  107.   } else { 
  108.   if (num_languages>1) {
  109.     outstr(get_string(936));
  110.     pl(cur_lang_name);
  111.   }
  112.   outstr(get_string(383));
  113.   npr("%d X %d\r\n",
  114.     thisuser.screenchars,
  115.     thisuser.screenlines);
  116.   outstr(get_string(384)); npr("%s\r\n",
  117.      (thisuser.sysstatus & sysstatus_ansi)?
  118.        ((thisuser.sysstatus & sysstatus_color)? get_string(385):get_string(386)):
  119.      get_string(387));
  120.   outstr(get_string(388)); npr("%s\r\n",
  121.      (thisuser.sysstatus & sysstatus_pause_on_page)?get_string(389):get_string(390));
  122.   outstr(get_string(1429)); npr("%s\r\n",
  123.      (thisuser.sysstatus & sysstatus_clr_scrn)? str_yes:str_no);
  124.   if (okansi()) {
  125.     outstr(get_string(398)); npr("%s\r\n",
  126.       ((thisuser.defed) && (thisuser.defed<=numed))?
  127.     editors[thisuser.defed-1].description:get_string(5));
  128.     outstr(get_string(399)); npr("%s\r\n",
  129.       (thisuser.sysstatus & sysstatus_extra_color)?str_yes:str_no);
  130.   }
  131.   outstr(get_string(400)); npr("%d\r\n",thisuser.optional_val);
  132.   outstr(get_string(1149)); npr("%s\r\n",
  133.     (thisuser.sysstatus & sysstatus_conference)?str_yes:str_no);
  134.   outstr(get_string(401));
  135.   if (thisuser.wwiv_regnum)
  136.     npr("%ld\r\n",thisuser.wwiv_regnum);
  137.   else
  138.     pl(get_string(402));
  139.   outstr(get_string(391));
  140.   if ((thisuser.forwardsys==0) && (thisuser.forwardusr==0))
  141.     pl(get_string(392));
  142.   else {
  143.     if (thisuser.forwardsys) {
  144.       outstr(get_string(393));
  145.       npr("%s #%u @%u.\r\n",
  146.     net_networks[thisuser.net_num].name,
  147.     thisuser.forwardusr,thisuser.forwardsys);
  148.     } else {
  149.       if (thisuser.forwardusr==65535) {
  150.     pl(get_string(300));
  151.       } else {
  152.     read_user(thisuser.forwardusr,&ur);
  153.     if (ur.inact & inact_deleted) {
  154.       thisuser.forwardusr=0;
  155.       pl(get_string(392));
  156.     } else {
  157.       outstr(get_string(393));
  158.       npr("%s\r\n",nam(&ur,thisuser.forwardusr));
  159.     }
  160.       }
  161.     }
  162.   }
  163.   pl(get_string(394));
  164.   pl(get_string(395));
  165.   pl(get_string(396));
  166.   if (okansi()) {
  167.     pl(get_string(397));
  168.   }
  169.   pl(get_string(403));
  170.  }
  171. }
  172.  
  173. ------------------------------------------------------------------------------
  174. Step 2: Replace defaults() in DEFAULTS.C with the following...
  175.  
  176.  
  177. void defaults(void)
  178. {
  179.   int done;
  180.   char ch;
  181.  
  182.   done=0;
  183.   print_cur_stat();
  184.   do {
  185.     tleft(1);
  186.     if (hangup)
  187.       return;
  188.     nl();
  189.     helpl=4;
  190.     if (okansi()) {
  191.      goxy(21,18);
  192.       ch=onek("Q?1234567890ABCDM");
  193.       nl();
  194.     } else {
  195.       prt(2,get_string(478));
  196.       ch=onek("Q?12347890ABCM");
  197.     }
  198.     switch(ch) {
  199.       case 'Q':
  200.     done=1;
  201.     break;
  202.       case '?':
  203.     print_cur_stat();
  204.     break;
  205.       case '1':
  206.     input_screensize();
  207.     print_cur_stat();
  208.     break;
  209.       case '2':
  210.     if (okansi())
  211.       prt(0,"");
  212.     input_ansistat();
  213.     print_cur_stat();
  214.     break;
  215.       case '3':
  216.     if (thisuser.sysstatus & sysstatus_pause_on_page)
  217.       thisuser.sysstatus ^= sysstatus_pause_on_page;
  218.     nl();
  219.     prt(5,get_string(479));
  220.     if (yn())
  221.       thisuser.sysstatus |= sysstatus_pause_on_page;
  222.     print_cur_stat();
  223.     break;
  224.       case '4':
  225.        prt(0,"\r\n");
  226.     if (thisuser.sysstatus & sysstatus_clr_scrn)
  227.       thisuser.sysstatus ^= sysstatus_clr_scrn;
  228.     outstr("5Clear screen before reading messages? ");
  229.     if (yn())
  230.       thisuser.sysstatus |= sysstatus_clr_scrn;
  231.     print_cur_stat();
  232.     break;
  233.       case 'A':
  234.       if (okansi())
  235.        prt(0,"");
  236.     config_qscan();
  237.     print_cur_stat();
  238.     break;
  239.       case 'B':
  240.     input_pw1();
  241.     print_cur_stat();
  242.     break;
  243.       case 'C':
  244.     make_macros();
  245.     print_cur_stat();
  246.     break;
  247.       case 'D':
  248.     change_colors();
  249.     print_cur_stat();
  250.     break;
  251.       case 'M':
  252.     modify_mailbox();
  253.     print_cur_stat();
  254.     break;
  255.       case '5':
  256.       if (okansi())
  257.        prt(0,"\r\n");
  258.     select_editor();
  259.     print_cur_stat();
  260.     break;
  261.       case '6':
  262.     if (thisuser.sysstatus & sysstatus_extra_color)
  263.       thisuser.sysstatus ^= sysstatus_extra_color;
  264.     nl();
  265.     prt(5,get_string(480));
  266.     if (yn())
  267.       thisuser.sysstatus |= sysstatus_extra_color;
  268.     print_cur_stat();
  269.     break;
  270.       case '7':
  271.        prt(0,"\r\n");
  272.     optional_lines();
  273.     print_cur_stat();
  274.     break;
  275.       case '8':
  276.     if (thisuser.sysstatus & sysstatus_conference)
  277.       thisuser.sysstatus ^= sysstatus_conference;
  278.     nl();
  279.     prt(5,get_string(1152));
  280.     if (yn())
  281.       thisuser.sysstatus |= sysstatus_conference;
  282.     changedsl();
  283.     print_cur_stat();
  284.     break;
  285.       case '9':
  286.        prt(0,"\r\n");
  287.     enter_regnum();
  288.     print_cur_stat();
  289.     break;
  290.       case '0':
  291.     if (num_languages>1)
  292.       input_language();
  293.     else
  294.       prt(2," ");
  295.     print_cur_stat();
  296.     break;
  297.     }
  298.   } while ((!done) && (!hangup));
  299. }
  300.  
  301. ------------------------------------------------------------------------------
  302. Step 3: Find read_message() in MSGBASE.C and add these lines...
  303.  
  304.  
  305.   nl();
  306.   abort=0;
  307.   *next=0;
  308. #ifdef OPT_EXTRA_COLOR
  309.   if (thisuser.sysstatus & sysstatus_clr_scrn)        /* Add */
  310.     outchr(12);                                       /* Add */
  311.   sprintf(s,"1%u/%u0",n,nummsgs);
  312.   strcat(s,charstr(12-strlen(stripcolors(s)),'.'));
  313.   strcat(s," 2");
  314. #else
  315.   if (thisuser.sysstatus & sysstatus_clr_scrn)        /* Add */
  316.     outchr(12);                                       /* Add */
  317.   sprintf(s,"%u/%u: ",n,nummsgs);
  318. #endif
  319.   osan(s,&abort,next);
  320. #ifndef OPT_EXTRA_COLOR
  321.   ansic(MSG_COLOR);
  322. #endif
  323.  
  324.  
  325. ------------------------------------------------------------------------------
  326. Step 4: Find readmail() in READMAIL.C and add these lines...
  327.  
  328.  
  329.     curmail=i-1;
  330.       else
  331.     curmail=0;
  332.     else
  333.       curmail=0;
  334.   }
  335.   done=0;
  336.   do {
  337. #ifdef OPT_EXTRA_COLOR
  338.     if (thisuser.sysstatus & sysstatus_clr_scrn)        /* Add */
  339.       outchr(12);                                       /* Add */
  340.     sprintf(s,"1%u/%u0",curmail+1,mw);
  341.     strcat(s,charstr(12-strlen(stripcolors(s)),'.'));
  342.     strcat(s," 2");
  343. #else
  344.     if (thisuser.sysstatus & sysstatus_clr_scrn)        /* Add */
  345.       outchr(12);                                       /* Add */
  346.     sprintf(s,"(%u/%u): ",curmail+1,mw);
  347. #endif
  348.     abort=0;
  349.     nl();
  350.     nl();
  351.     osan(s,&abort,&next);
  352.     next=0;
  353. #ifndef OPT_EXTRA_COLOR
  354.     ansic(MSG_COLOR);
  355. #endif
  356.  
  357. ------------------------------------------------------------------------------
  358. Step 5: Recompile your source code.  Move DEFAULT.ANS (included) to your
  359.     gfiles directory. 
  360.  
  361. ------------------------------------------------------------------------------
  362. Step 6: Use a program such as WWIVESE (my favorite) or MINIESM to change the 
  363.     following lines in your BBS.STR file, which is located in your gfiles 
  364.     directory...
  365.  
  366.  
  367.     Line #     Current String                Change to
  368.     ------     -----------------------       -----------------------
  369.      391       4. Mailbox           :        M. Mailbox           : 0
  370.      394       5. Configure Q-Scan           A. Configure Q-Scan  
  371.      395       6. Change Password            B. Change Password
  372.      396       7. Update Macros              C. Update Macros
  373.      397       8. Change Colors              D. Change colors
  374.      398       9. Full Screen Editor:        5. Full Screen Editor: 0 
  375.      399       A. Extended Colors   :        6. Extended Colors   : 0
  376.      400       B. Optional Lines    :        7. Optional Lines    : 0
  377.      401       W. WWIV reg num      :        9. WWIV reg num      : 0
  378.      936       L. Language          :        0. Language          : 0
  379.      1149      C. Conferencing      :        8. Conferencing      : 0
  380.  
  381.  
  382.    Now add this string to line 1429 (or the end of your BBS.STR if 1429 is 
  383. being used).  Check this line number with Step 1...
  384.  
  385.  
  386.     Line #          Add String
  387.     -------         --------------------------
  388.      1429           4. Clear Screen      : 0
  389.  
  390.  
  391.   (to get the heart symbol, hit Ctrl-P, then Ctrl-C)
  392.  
  393. ------------------------------------------------------------------------------
  394. Step 7: Now run your board and test the mod.
  395.  
  396. ------------------------------------------------------------------------------
  397. Step 8: You can make your own ANSI (or have an ANSI group make one for you),
  398.     using the included ANSI as a reference if needed, or you may continue
  399.     to use the included ANSI.  If you choose to make a new ANSI, rename
  400.     it to DEFAULT.ANS and move it to your gfiles directory.
  401.  
  402. ------------------------------------------------------------------------------
  403.    This mod works great on my board, but if you have any problems please
  404.    let me know.  As of 2/26/95 my board is not up yet and probably won't
  405.    be for a few months, but I can be reached on WWIVnet at:
  406.  
  407.       Amber BBS                        The Dragon's Den ][
  408.       #1021 @1                         #1239 @4020
  409.  
  410.  
  411.