home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / MYBBS.ZIP / WINDOWS / DESKTOP / MYBBS / WEDIT / EDITINFO.MOD next >
Text File  |  1991-08-07  |  9KB  |  203 lines

  1. EDITINFO.MOD
  2. by Adam Caldwell (The Emporer)
  3.  
  4. ===========================================================================
  5. This is a mod that I made so that WWIVEdit 2.2 could ALWAYS get the correct
  6. title and destination when it loaded up.  It also has the side effect of
  7. allowing Title changes and "Result" codes for Anonymous/Non-Anonymous saves.
  8.  
  9. ===========================================================================
  10. Step 1:
  11.  
  12. Back everything up... This should go without saying by now...
  13. ===========================================================================
  14. Step 2:
  15.  
  16. In BBS.C up at the top after all of the #include directives add these two
  17. lines:
  18.  
  19. extern char message_title[81];
  20. extern char message_dest[81];
  21. ===========================================================================
  22. Step 3:
  23.  
  24. Still in BBS.C, in void text_edit() add these two lines:
  25.     sprintf(s1,"@ Edited: %s",s);
  26.     sysoplog(s1);
  27.     if (okfsed()) {
  28.       strcpy(message_title,s);                                /* Add Me */
  29.       strcpy(message_dest,syscfg.gfilesdir);                  /* Add Me */
  30.       external_edit(s,syscfg.gfilesdir,thisuser.defed-1,500);
  31.     } else
  32.       tedit(s);
  33. ===========================================================================
  34. Step 4:
  35.  
  36. Still in BBS.C in void mainmenu() add these two lines:
  37.   if ((strcmp(s,"EDIT")==0) && (so())) {
  38.     nl();
  39.     prt(2,"Filename? ");
  40.     input(s1,50);
  41.     if (s1[0]) {
  42.       if ((okansi()) && (thisuser.defed)) {         /* Add { at end of line */
  43.         strcpy(message_title,s1);                   /* Add Me */
  44.         strcpy(message_dest,"BBS Main Directory");  /* Add Me */
  45.         external_edit(s1,"",thisuser.defed-1,500);
  46.       }                                                /* Add Me */
  47.     else
  48.         tedit(s1);
  49. ===========================================================================
  50. Step 4:
  51.  
  52. Save BBS.C and load up MSGBASE.C
  53. ===========================================================================
  54. Step 5:
  55.  
  56. Up at the top, after all of the other External declarations add:
  57. extern char message_title[81];
  58. extern char message_dest[81];
  59. ===========================================================================
  60. Step 6:
  61.  
  62. Still in MSGBASE.C in void inmsg()
  63.  
  64. Add this line up in the variables section
  65.   char s[LEN],s1[LEN],s2[LEN],ro[81],fnx[81],chx,*ss,*ss1,pseudo[25];
  66.   int maxli,curli,done,save,savel,i,i1,i2,i3,i4,i5,f,setanon,gati[50],gatp;
  67.   messagerec m;
  68.   long ll,l1;
  69.   char *lin, *b;
  70.   int real_name=0;
  71.   FILE *result;    /* Add Me */
  72.  
  73. Now, much further down, do this:
  74.     if (fsed==1) {                   /* Existing Line */
  75.       strcpy(message_title,title);   /* Add Me */
  76.       save=external_edit("INPUT.MSG",syscfg.tempdir,(int) (thisuser.defed)-1,maxli);  /* existing line */
  77.       if (save && (result=fopen("RESULT.ED","rt"))!=NULL) { /* Add Me */
  78.         fgets(s,80,result);                                 /* Add Me */
  79.         s[strlen(s)-1]=0;         /* take of CR */          /* Add Me */
  80.         setanon=atoi(s);                                    /* Add Me */
  81.         fgets(title,80,result);                             /* Add Me */
  82.         title[strlen(title)-1]=0; /* take of CR */          /* Add Me */
  83.         fclose(result);                                     /* Add Me */
  84.         remove("RESULT.ED");                                /* Add Me */
  85.       }                                                     /* Add Me */
  86.  
  87.     } else {                                                /* Existing */
  88.       save=exist(fnx);                                      /* Existing */
  89.       if (save) {                                           /* Existing */
  90.     pl("Reading in file...");                           /* Existing */
  91. ===========================================================================
  92. Step 7:
  93.  
  94. In void email() about 100 lines further down... Add this line
  95.  
  96.     if (un==0)                                          /* Existing Line */
  97.       sprintf(s2,"%s @%u",net_email_name,sy);           /* Existing Line */
  98.     else                                                /* Existing Line */
  99.       sprintf(s2,"User %u @%u",un,sy);                  /* Existing Line */
  100.   }                                                     /* Existing Line */
  101.   print("E-mailing ",s2,"");                            /* Existing Line */
  102.   strcpy(message_dest,s2);                  /* Add Me */
  103.   if (ss.ability & ability_email_anony)                 /* Existing Line */
  104.     i=anony_enable_anony;                               /* Existing Line */
  105.   else                                                  /* Existing Line */
  106.     i=0;                                                /* Existing Line */
  107.   if (anony & (anony_receiver_pp | anony_receiver_da))  /* Existing Line */
  108. ===========================================================================
  109. Step 8:
  110.  
  111. Save MSGBASE.C and load MSGBASE1.C
  112. ===========================================================================
  113. Step 9:
  114.  
  115. At the top, after all of the external declarations, add all of these lines:
  116.  
  117. char message_title[81];
  118. char message_dest[81];
  119.  
  120. void create_editor_info()
  121. {
  122.   FILE *f;
  123.  
  124.   remove("EDITOR.INF");
  125.   remove("RESULT.ED");
  126.   if ((f=fopen("EDITOR.INF","wt"))!=NULL) {
  127.     fprintf(f,"%s\n%s\n%u\n%s\n%s\n%u\n",
  128.       message_title,
  129.       message_dest,
  130.       usernum,
  131.       thisuser.name,
  132.       thisuser.realname,
  133.       thisuser.sl);
  134.     fclose(f);
  135.   }
  136. }
  137. ===========================================================================
  138. Step 9.5:
  139. Almost forgot this part... it won't work without it... :-)
  140.  
  141. In int external_edit() add this line:
  142.   itoa(numlines,sx3,10);                /* Existing Line */
  143.   stuff_in(s,s1,fn,sx1,sx2,sx3,"");     /* Existing Line */
  144.   create_editor_info();                                    /* Add Me */
  145.   full_external(s,0,1);                 /* Existing Line */
  146.   if (!wfc)                             /* Existing Line */
  147.     topscreen();                        /* Existing Line */
  148. ===========================================================================
  149. Step 10:
  150.  
  151. In void post() add the following line:
  152.     if (syscfg.systemnumber) {                    /* Existing Line */
  153.       nl();                                       /* Existing Line */
  154.       pl("This post will go out on WWIVnet.");    /* Existing Line */
  155.       nl();                                       /* Existing Line */
  156.     }                                             /* Existing Line */
  157.   }                                               /* Existing Line */
  158.   strcpy(message_dest,subboards[curlsub].name);                  /* Add me */
  159.   inmsg(&m,p.title,&a,1,(subboards[curlsub].filename),ALLOW_FULLSCREEN); /* Existing Line */
  160.   if (m.stored_as!=0xffffffff) {                  /* Existing Line */
  161.     p.anony=a;                                    /* Existing Line */
  162. ===========================================================================
  163. Step 11:
  164.  
  165. Save MSGBASE1.C and Load MULTMAIL.C
  166. ===========================================================================
  167. Step 12:
  168.  
  169. Up at the top, add:
  170.  
  171. extern char message_dest[81];
  172. ===========================================================================
  173. Step 13:
  174.  
  175. In void multimail() add this line:
  176.   m.msg.storage_type=EMAIL_STORAGE;             /* Existing Line */
  177.   strcpy(irt,"Multi-Mail");                     /* Existing Line */
  178.   strcpy(message_dest, irt);                                   /* Add Me */
  179.   byline[0]=0;                                  /* Existing Line */
  180.   inmsg(&m.msg,t,&i,1,"EMAIL",ALLOW_FULLSCREEN);/* Existing Line */
  181.   if (m.msg.stored_as==0xffffffff)              /* Existing Line */
  182.     return;                                     /* Existing Line */
  183.   strcpy(m.title,t);                            /* Existing Line */
  184. ===========================================================================
  185. Step 14:
  186.  
  187. Save MULTMAIL.C and recompile.
  188. ===========================================================================
  189.  
  190. Disclaimer:
  191.   I assume no responsibilty if this blows up your system :-)
  192.  
  193. About this mod:
  194.   This mod has been successfully used on my BBS with the 64 Message base
  195. installed, as well as some other mods.  If you have any problems with this
  196. mod, there are a bunch of ways that you can contact me:
  197.  
  198. 1) E-Mail me via WWIVLink as 1   @16401
  199. 2) E-Mail me via WWIVNet  as 1   @6470
  200. 3) E-Mail me via WWIVNet  as 718 @5252
  201. 4) E-Mail me via Internet as acaldwel@oucsace.ohiou.edu
  202. 5) E-Mail me via Bitnet   as CS755@OUACCVMB
  203. 6) Call my BBS at 614-593-7836 [The First Galactic Empire]