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 >
Wrap
Text File
|
1991-08-07
|
9KB
|
203 lines
EDITINFO.MOD
by Adam Caldwell (The Emporer)
===========================================================================
This is a mod that I made so that WWIVEdit 2.2 could ALWAYS get the correct
title and destination when it loaded up. It also has the side effect of
allowing Title changes and "Result" codes for Anonymous/Non-Anonymous saves.
===========================================================================
Step 1:
Back everything up... This should go without saying by now...
===========================================================================
Step 2:
In BBS.C up at the top after all of the #include directives add these two
lines:
extern char message_title[81];
extern char message_dest[81];
===========================================================================
Step 3:
Still in BBS.C, in void text_edit() add these two lines:
sprintf(s1,"@ Edited: %s",s);
sysoplog(s1);
if (okfsed()) {
strcpy(message_title,s); /* Add Me */
strcpy(message_dest,syscfg.gfilesdir); /* Add Me */
external_edit(s,syscfg.gfilesdir,thisuser.defed-1,500);
} else
tedit(s);
===========================================================================
Step 4:
Still in BBS.C in void mainmenu() add these two lines:
if ((strcmp(s,"EDIT")==0) && (so())) {
nl();
prt(2,"Filename? ");
input(s1,50);
if (s1[0]) {
if ((okansi()) && (thisuser.defed)) { /* Add { at end of line */
strcpy(message_title,s1); /* Add Me */
strcpy(message_dest,"BBS Main Directory"); /* Add Me */
external_edit(s1,"",thisuser.defed-1,500);
} /* Add Me */
else
tedit(s1);
===========================================================================
Step 4:
Save BBS.C and load up MSGBASE.C
===========================================================================
Step 5:
Up at the top, after all of the other External declarations add:
extern char message_title[81];
extern char message_dest[81];
===========================================================================
Step 6:
Still in MSGBASE.C in void inmsg()
Add this line up in the variables section
char s[LEN],s1[LEN],s2[LEN],ro[81],fnx[81],chx,*ss,*ss1,pseudo[25];
int maxli,curli,done,save,savel,i,i1,i2,i3,i4,i5,f,setanon,gati[50],gatp;
messagerec m;
long ll,l1;
char *lin, *b;
int real_name=0;
FILE *result; /* Add Me */
Now, much further down, do this:
if (fsed==1) { /* Existing Line */
strcpy(message_title,title); /* Add Me */
save=external_edit("INPUT.MSG",syscfg.tempdir,(int) (thisuser.defed)-1,maxli); /* existing line */
if (save && (result=fopen("RESULT.ED","rt"))!=NULL) { /* Add Me */
fgets(s,80,result); /* Add Me */
s[strlen(s)-1]=0; /* take of CR */ /* Add Me */
setanon=atoi(s); /* Add Me */
fgets(title,80,result); /* Add Me */
title[strlen(title)-1]=0; /* take of CR */ /* Add Me */
fclose(result); /* Add Me */
remove("RESULT.ED"); /* Add Me */
} /* Add Me */
} else { /* Existing */
save=exist(fnx); /* Existing */
if (save) { /* Existing */
pl("Reading in file..."); /* Existing */
===========================================================================
Step 7:
In void email() about 100 lines further down... Add this line
if (un==0) /* Existing Line */
sprintf(s2,"%s @%u",net_email_name,sy); /* Existing Line */
else /* Existing Line */
sprintf(s2,"User %u @%u",un,sy); /* Existing Line */
} /* Existing Line */
print("E-mailing ",s2,""); /* Existing Line */
strcpy(message_dest,s2); /* Add Me */
if (ss.ability & ability_email_anony) /* Existing Line */
i=anony_enable_anony; /* Existing Line */
else /* Existing Line */
i=0; /* Existing Line */
if (anony & (anony_receiver_pp | anony_receiver_da)) /* Existing Line */
===========================================================================
Step 8:
Save MSGBASE.C and load MSGBASE1.C
===========================================================================
Step 9:
At the top, after all of the external declarations, add all of these lines:
char message_title[81];
char message_dest[81];
void create_editor_info()
{
FILE *f;
remove("EDITOR.INF");
remove("RESULT.ED");
if ((f=fopen("EDITOR.INF","wt"))!=NULL) {
fprintf(f,"%s\n%s\n%u\n%s\n%s\n%u\n",
message_title,
message_dest,
usernum,
thisuser.name,
thisuser.realname,
thisuser.sl);
fclose(f);
}
}
===========================================================================
Step 9.5:
Almost forgot this part... it won't work without it... :-)
In int external_edit() add this line:
itoa(numlines,sx3,10); /* Existing Line */
stuff_in(s,s1,fn,sx1,sx2,sx3,""); /* Existing Line */
create_editor_info(); /* Add Me */
full_external(s,0,1); /* Existing Line */
if (!wfc) /* Existing Line */
topscreen(); /* Existing Line */
===========================================================================
Step 10:
In void post() add the following line:
if (syscfg.systemnumber) { /* Existing Line */
nl(); /* Existing Line */
pl("This post will go out on WWIVnet."); /* Existing Line */
nl(); /* Existing Line */
} /* Existing Line */
} /* Existing Line */
strcpy(message_dest,subboards[curlsub].name); /* Add me */
inmsg(&m,p.title,&a,1,(subboards[curlsub].filename),ALLOW_FULLSCREEN); /* Existing Line */
if (m.stored_as!=0xffffffff) { /* Existing Line */
p.anony=a; /* Existing Line */
===========================================================================
Step 11:
Save MSGBASE1.C and Load MULTMAIL.C
===========================================================================
Step 12:
Up at the top, add:
extern char message_dest[81];
===========================================================================
Step 13:
In void multimail() add this line:
m.msg.storage_type=EMAIL_STORAGE; /* Existing Line */
strcpy(irt,"Multi-Mail"); /* Existing Line */
strcpy(message_dest, irt); /* Add Me */
byline[0]=0; /* Existing Line */
inmsg(&m.msg,t,&i,1,"EMAIL",ALLOW_FULLSCREEN);/* Existing Line */
if (m.msg.stored_as==0xffffffff) /* Existing Line */
return; /* Existing Line */
strcpy(m.title,t); /* Existing Line */
===========================================================================
Step 14:
Save MULTMAIL.C and recompile.
===========================================================================
Disclaimer:
I assume no responsibilty if this blows up your system :-)
About this mod:
This mod has been successfully used on my BBS with the 64 Message base
installed, as well as some other mods. If you have any problems with this
mod, there are a bunch of ways that you can contact me:
1) E-Mail me via WWIVLink as 1 @16401
2) E-Mail me via WWIVNet as 1 @6470
3) E-Mail me via WWIVNet as 718 @5252
4) E-Mail me via Internet as acaldwel@oucsace.ohiou.edu
5) E-Mail me via Bitnet as CS755@OUACCVMB
6) Call my BBS at 614-593-7836 [The First Galactic Empire]