home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / Dloads / SYSOP / MODS1.ZIP / CTITLES.MOD < prev    next >
Text File  |  1993-12-22  |  10KB  |  267 lines

  1.             Color Titles For Msgs & Email
  2.             By: Lt. Hytiek #1@3504
  3.                 The Morgue BBS
  4.                 305-435-8810
  5.  
  6.     This mod took me about 30 seconds to figure out, and will take you
  7.     about 30 seconds to implant within your source code.  First, load
  8.     up your MSGBASE.C file, and search for 'void inmsg' go down till
  9.     you reach the code below... and follow the steps...
  10.  
  11.     Also...  If you are using the CUSS MOD, the users will NOT be able
  12.     to cuss within the titles!  To use the color within the titles...
  13.     Just act like you are typing a msg, (^P#).
  14.  
  15. *****************************************************************************/
  16.  
  17.                     == Original Code
  18.                     -- Code to delete
  19.                     ++ Code to add
  20.  
  21.  
  22. ==  for (i=0; i<maxli; i++)
  23. ==    lin[i*LEN]=0;
  24. ==  ro[0]=0;
  25. ==}
  26.  
  27.  
  28. ==nl();
  29. ==helpl=6;
  30. ==if (okansi()) {
  31. ==  outstr("\x1b[2J");
  32. ==  prt(2,"Title: ");    /*4.23 has a number instead of Title*/
  33. --  mpl(60);             /* Delete this line */
  34. --  inputl(title,60);    /* Delete this line */
  35. ++  inli(title,ro,70,1); /* Add this line */
  36.  
  37. ==} else {
  38. ==  outstr("\x1b[2J");
  39. ==  pl("       (---=----=----=----=----=----=----=----=----=----=----=----)");
  40. ==  outstr("Title: ");   /* NOTE 1 */
  41. --  inputl(title,60);    /* Delete this line */
  42. ++  inli(title,ro,70,1); /* Add this line */
  43. ==}
  44. ==============================================================================
  45. NOTE 1:  in this line, and the one above, 4.23 calls external strings
  46.  
  47.  
  48. /***************************************************************************
  49. Now search down to this section of code:
  50. ***************************************************************************/
  51.  
  52. ==      if (stricmp(s,"/TI")==0) {
  53. ==        savel=0;
  54. ==        helpl=26;
  55. ==        if (okansi()) {
  56. ==          prt(2,"Title: ");     /* 4.23 calls ext string again */
  57. --          mpl(60);              /* Delete this line */
  58. --          inputl(title,60);     /* Delete this line */
  59. ++          inli(title,ro,70,1);  /* Add this line */
  60. ==        } else {
  61. ==          pl("       (---=----=----=----=----=----=----=----=----=----=----=-
  62. ---)");                           /* Another string call here */
  63. ==          outstr("Title: ");    /* And here */
  64. --          inputl(title,60);     /* Delete this line */
  65. ++          inli(title,ro,70,1);  /* Add this line */
  66. ==        }
  67. ==        pl("Continue...");
  68. ==        nl();
  69.  
  70.  
  71. /***************************************************************************
  72.  
  73.     Thats it!  Your done...  Told ya it was simple...  If you enjoy
  74.     this mod, then contact 1@3504 that you're using it.  Hopefully
  75.     you won't find ANY bugs...  Well. Take care and have fun!
  76.  
  77. ***************************************************************************
  78.  
  79.  
  80. ╒════════════════════════════════════════════════════════════════════════════╕
  81. │ Mod Name   : Enhanced Auto-Message      Mod Author: Reanimator     #220    │
  82. │                                                              @4057 WWIVnet │
  83. │ Difficulty : Easy                       Date      : 07DEC93                │
  84. │                                                                            │
  85. │ WWIV Ver.  : 4.23 ONLY!                 Filename  : REAN01.423             │
  86. │                                                                            │
  87. │ Description:  This modification replaces two voids in misccmd.c            │
  88. │               that control automessage writing. It allows the sysop        │
  89. │               or co/sysop to lock the auto-message, delete the             │
  90. │               automessage, and unlock the automessage. It also allows      │
  91. │               5 lines of 70 columns WITH color during writes.              │
  92. │               This mod does in no way affect the streamlining of the BBS.  │
  93. │               Locking the automessage means nobody without a 100+ sl can   │
  94. │               write the automessage. Deletion of the Automessage will      │
  95. │               just give the users a "No auto-message" at logon.            │
  96. │               If the message is locked, does not affect users restrictions │
  97. ╘════════════════════════════════════════════════════════════════════════════╛
  98.  
  99.  
  100. Instructions:
  101.         Either replace/add the lines commented with /* MOD */
  102.         or delete the existing two voids and block copy
  103.         these two in place of those existing.
  104.  
  105.             * Start of Code *
  106. _____________________________________________________________________________
  107.  
  108. void write_automessage1(void)
  109. {
  110.   int i,i1,f;
  111.   char s[81],l[6][81],ro[81];                                /* MOD */
  112.   slrec ss;
  113.  
  114.   ro[0]=0;                                                   /* MOD */
  115.  
  116.   nl();
  117.   pl(get_string(484));
  118.   nl();
  119.   for (i=0; i<5; i++) {                                      /* MOD */
  120.     npr("%d:",i+1);
  121.     inli(&(l[i][0]),ro,70,1);                                /* MOD */
  122.     strcat(&(l[i][0]),"\r\n");
  123.   }
  124.   nl();
  125.   ss=syscfg.sl[actsl];
  126.   if (ss.ability & ability_post_anony) {
  127.     prt(5,get_string(485));
  128.     if (yn())
  129.       i1=anony_sender;
  130.     else
  131.       i1=0;
  132.   } else
  133.     i1=0;
  134.   prt(5,get_string(438));
  135.   if (yn()) {
  136.     lock_status();
  137.     status.amsganon=i1;
  138.     status.amsguser=usernum;
  139.     save_status();
  140.     sprintf(s,"%sAUTO.MSG",syscfg.gfilesdir);
  141.     f=sh_open(s,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
  142.     strcpy(s,nam(&thisuser,usernum));
  143.     strcat(s,"\r\n");
  144.     sh_write(f,(void *)s,strlen(s));
  145.     for (i=0; i<5; i++)                                         /* MOD */
  146.       sh_write(f,(void *)&(l[i][0]),strlen(&(l[i][0])));
  147.     sysoplog(get_stringx(1,24));
  148.     for (i=0; i<5; i++) {                                       /* MOD */
  149.       strcpy(s,"   ");
  150.       l[i][strlen(&(l[i][0]))-2]=0;
  151.       strcat(s,&(l[i][0]));
  152.       sysoplog(s);
  153.     }
  154.     nl();
  155.     pl(get_string(486));
  156.     nl();
  157.     sh_close(f);
  158.   }
  159.  
  160. }
  161.  
  162. void write_automessage(void)
  163. {
  164.   char ch,s[81],s2[81];  /* MOD */
  165.   int done,okwrite;
  166.   slrec ss;
  167.   FILE *lock_auto;       /* MOD */
  168.  
  169.   ss=syscfg.sl[actsl];
  170.   if (ss.posts)
  171.     okwrite=1;
  172.   else
  173.     okwrite=0;
  174.   if (thisuser.restrict & restrict_automessage)
  175.     okwrite=0;
  176.     done=0;
  177.  
  178.   sprintf(s,"%sLOCKAUTO.MSG",syscfg.gfilesdir);                   /* MOD */
  179.    if (exist(s))                                                  /* MOD */
  180.      okwrite=0;                                                   /* MOD */
  181.  
  182.   sprintf(s2,"%sAUTO.MSG",syscfg.gfilesdir);                      /* MOD */
  183.  
  184.   do {
  185.     nl();
  186.  
  187.     if (cs()) {                                                   /* MOD */
  188.       prt(2,"Q:uit, R:ead, A:uto-reply, W:rite, L:ock, D:el, U:nlock > ");
  189.       ch=onek("QRWALDU");                                         /* MOD */
  190.    } else if (okwrite) {                                          /* MOD */
  191.       prt(2,"Q:uit, R:ead, A:uto-reply, W:rite > ");              /* MOD */
  192.       ch=onek("QRWA");                                            /* MOD */
  193.    } else {                                                       /* MOD */
  194.       prt(2,"Q:uit, R:ead, A:uto-reply > ");                      /* MOD */
  195.       ch=onek("QRA");                                             /* MOD */
  196.     }                                                             /* MOD */
  197.  
  198.     switch(ch) {
  199.       case 'Q':
  200.     done=1;
  201.     break;
  202.       case 'R':
  203.     read_automessage();
  204.     break;
  205.       case 'W':
  206.     write_automessage1();
  207.     break;
  208.       case 'A':
  209.     grab_quotes(NULL, NULL);
  210.     read_status();
  211.     if (status.amsguser)
  212.       email(status.amsguser,0,0,status.amsganon);
  213.     break;
  214.       case 'D':                                            /* MOD */
  215.     nl();                                              /* MOD */
  216.     prt(5,"Delete Auto-Message? ");                    /* MOD */
  217.     if (yn())                                          /* MOD */
  218.       unlink(s2);                                      /* MOD */
  219.     nl();                                              /* MOD */
  220.     break;                                             /* MOD */
  221.       case 'L':                                            /* MOD */
  222.     if (exist(s)) {                                    /* MOD */
  223.       nl();                                            /* MOD */
  224.       prt(2,"Message is already locked.\r\n");         /* MOD */
  225.       nl();                                            /* MOD */
  226.        } else {                                            /* MOD */
  227.       outstr("Lock Auto-message? ");                   /* MOD */
  228.     if (yn()) {                                        /* MOD */
  229.       lock_auto=fopen(s,"w+t");    /* This makes a file       */
  230.       fputc(' ',lock_auto);        /* in your GFILES dir      */
  231.       fclose(lock_auto);           /* 1 bytes long, to tell   */
  232.     }                              /* the board if it is      */
  233.      }                             /* locked or not.          */
  234.     break;                         /* It consists of a space  */
  235.       case 'U':                                            /* MOD */
  236.     if (!exist(s))                                     /* MOD */
  237.       pl("Message not locked.");                       /* MOD */
  238.      else {                                            /* MOD */
  239.       prt(5,"Unlock message? ");                       /* MOD */
  240.     if (yn())                                          /* MOD */
  241.       unlink(s);                                       /* MOD */
  242.     }                                                  /* MOD */
  243.     break;                                             /* MOD */
  244.     }
  245.   } while ((!done) && (!hangup));
  246.  
  247. }
  248.  
  249. _____________________________________________________________________________
  250.                * End of Code *
  251.  
  252.  If you use this mod I would really appreciate it if you drop me a line
  253.  telling me you did! Any questions or comments feel free to Email me.
  254.  My WWIVnet address is at the top of the message.
  255.  
  256.  Reanimator, Baltimore MD
  257.  
  258.  
  259.  
  260.  
  261. 9OK, this one works fine... you can lock out anyone with less than a 100 SL from0
  262. 9writing the automessage... just delete the two old automessage voids, and block0
  263. 9in the two new ones... I have an automessage mod that gives you 9 lines, full0
  264. 9screen width, and all 9 colors, but you can't lock it... if ya want that one,0
  265. 9I'll send it to ya...0
  266.  
  267.