home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
SYSOP
/
MODS1.ZIP
/
SPV031IH.MOD
< prev
next >
Wrap
Text File
|
1995-05-31
|
24KB
|
675 lines
Papa Bear #1 @11579
7Saturday1, 7May 271, 71995 2 26:231 am
0R 34 05/31 06:23 WWIVnet ->8339
0R 34 05/29 17:25 WWIVnet 8314->8304
0R 34 05/28 15:02 WWIVNET 4001->8314
0R 34 05/28 19:17 WWIVnet 4000->4001
0R 34 05/28 10:43 WWIVnet ->4000
0R 34 05/27 06:25 WWIVnet 4001->4000
0R 34 05/27 12:29 WWIVnet 11579->4001
0R 34 05/27 02:35 WWIVnet ->11579
4Msg. Status:9▄ 5Please reply!
9 ▀▀▀▀▀▀▀▀▀▀▀▀
┌────────────────────────────A CEREBRUM RELEASE!─────────────────────────────┐
│ Mod Name: SPV031IH.MOD Mod Authors: 8-Ball │
│ Difficulty: ▓▓▓▓▓▓░░░░ <<< TAKE NOTE! Repo Man │
│ Revision Dates: FIRST [01/10/92] Captain EJ │
│ LAST [05/26/95] Pâpâ ßêâr (1@11579 WW4net) │
│ WWIV Version: 4.24 [not for versions previous to 4.24!] │
│ Files Affected: MSGBASE.C MSGBASE1.C READMAIL.C FCNS.H VARS.H │
│ Description: 8-Ball's Quote Mod! As revised by Repo Man and myself. Code │
│from Captain EJ included. I think this is the *best* quote mod I've seen! │
│>>> NOW WORKS WITH NON-FSE's AS WELL AS FSE's!!! Added Anonymous support. │
╞═────────────────────────────────────═╤═───────────────────────────────────═╡
│ StarPort Valhalla [ ] - ASV 28.8kbps Home of the SPV mod series! │
└─────────────────────────────────────═╧═────────────────────────────────────┘
>>> OFFICIAL WWIV SUPPORT SITE! <<<
Word of Warning: You installed it, you're responsible! Make back-ups BEFORE
attempting to install this modification! Read all text before beginning.
Again, READ THIS ENTIRE MOD >BEFORE< BEGINNING!
─────────────────────────────────────────────────────────────────────────────
LEGEND:
== Original Code [use this to search on]
++ Add this Line [mods ALWAYS add stuff, don't they?]
-- Delete this Line [or comment out, its not needed]
-+ Change this Line [I usually comment these lines]
... Skipping some code here [keeps the mod shorter]
─────────────────────────────────────────────────────────────────────────────
LONG DESCRIPTION: The famous SPV modification redone for WWIV 4.24. You
should note that 4.24 introduced the M command at the mail prompt that will
allow you reply to E-Mail to a different address than it was sent from. For
that reason, this that feature has been removed from this mod proper. The @
command will allow you to send a subboard post to a E-Mail address other than
the one it originated from.
I've completely redone the docs for this. This mod contains some
improvements over the last 4.23 version ("G" revision) that I'd previous;y
released.
─────────────────────────────────────────────────────────────────────────────
STEP 1: Add this line the the top of MSGBASE.C
== #include "vars.h"
==
== #pragma hdrstop
== #include <mem.h>
== #include <errno.h>
== #include "subxtr.h"
++ #include <ctype.h> // SPV031IH add
==
== #define ALLOW_FULLSCREEN 1
─────────────────────────────────────────────────────────────────────────────
STEP 2: In MSGBASE.C, make the following changes in:
char *readfile(messagerec *m1, char *aux, long *l)
== return(NULL);
== }
== l1=filelength(f);
-+ if ((b=malloca(l1+2L))==NULL) { // SPV031IH - add +2L
== sh_close(f);
== return(NULL);
== }
. . . SKIPPING SOME LINES HERE, TAKE CARE TO NOTE THE PROPER LOCATION! . . .
== return(NULL);
== }
== l1=filelength(f);
-+ if ((b=malloca(l1+258L))==NULL) { // SPV031IH - change 256 to 258
== sh_close(f);
== return(NULL);
== }
== sh_read(f,(void *)b,l1);
─────────────────────────────────────────────────────────────────────────────
STEP 3: Add these variable declarations in MSGBASE.C to void inmsg(...)
== FILE *result;
== struct {char tlen, ttl[81], anon; } fedit_data;
== #ifdef OPT_MSG_TAG_ABILITY
== xtrasubsnetrec *xnp;
== #endif
++ FILE *pbquote; // SPV031IH
++ char pb[13],pb1[161],pb2[161]; // SPV031IH
++ int j=0; // SPV031IH
─────────────────────────────────────────────────────────────────────────────
STEP 4: Still in void inmsg(...) a little ways down, make these changes
== outstr(get_string(627));
== pln(maxli);
== pl(get_string(628));
++ if (quoted) {
++ nl();
++ pl("9Type 1/Q9 in the message to view the quoted text!0");
++ nl();
++ }
== strcpy(s,get_string(629));
== s[thisuser.screenchars]=0;
== pl(s);
. . . JUST A LITTLE FURTHER DOWN NOW . . .
== if (stricmp(s,get_string(942))==0) {
== savel=0;
== printmenu(2);
== }
// START SPV031IH BLOCK COPY
if (stricmp(s,"/Q")==0) {
if (quoted) {
sprintf(pb,"%sINPUT.MSG",syscfgovr.tempdir);
printfile(pb);
} else {
nl();
pl("6You must quote the message you're replying to to0");
pl("6use this command. Please continue your message.0");
nl();
}
}
// END SPV031IH BLOCK COPY
== if (stricmp(s,get_string(943))==0) {
== savel=0;
== prt(5,get_string(630));
─────────────────────────────────────────────────────────────────────────────
STEP 5: Still in void inmsg(...) a LOT further down, make these changes
== if (fsed) {
== ll=filelength(i5);
== sh_read(i5, (void *) (& (b[l1]) ),ll);
== l1 += ll;
== sh_close(i5);
== } else {
// START SPV031IH BLOCK COPY
if (quoted) {
sprintf(pb,"%sINPUT.MSG",syscfgovr.tempdir);
pbquote=fsh_open(pb,"rt");
if (!pbquote) {
nl();
pl("6Quote file does not exist! Notify SysOp!0");
j=0;
nl();
} else {
while (!feof(pbquote)) {
j=1;
sprintf(pb2,(fgets(pb1,160,pbquote)));
addline(b,pb2,&l1);
}
}
fsh_close(pbquote);
unlink(pb);
}
nl();
if (j)
pl("5The Quote file has been attached to your message!0");
// END SPV031IH BLOCK COPY
== for (i5=0; i5<curli; i5++)
== addline(b,&(lin[i5*LEN]),&l1);
== }
==
== #ifdef OPT_MSG_TAG_ABILITY
─────────────────────────────────────────────────────────────────────────────
STEP 6: Add these lines in MSGBASE.C
== if (an) {
== strcat(s,nam(&ur,un));
== sysoplog(s);
++ Unknown=0; // SPV031IH
== } else {
++ Unknown=1; // SPV031IH
== strcpy(s1,s);
== strcat(s1,nam(&ur,un));
== sysoplog(s1);
== strcat(s,get_string(482));
. . . A little farther down . . .
== if (an) {
== read_user(un,&ur);
== strcpy(s2,nam(&ur,un));
++ Unknown=0; // SPV031IH
-+ } else { // SPV031IH added {
++ Unknown=1; // SPV031IH
== strcpy(s2,get_string(482));
++ } // SPV031IH
== } else {
== if (net_num_max>1) {
─────────────────────────────────────────────────────────────────────────────
STEP 7: Add these three functions to the end of MSGBASE.C
// SPV031IH BLOCK COPY START
void extract_out2(char *org, long len, int type, long daten)
{
char s[255],s1[81],s2[81],*p,buf[255],*b,tb[81],tb1[81],b1[81],pb[81],ch;
int i,ii=0,j,jj,length,qnq=1,line_control,done,k;
FILE *Output;
printfile("QUOTE");
if (!okfsed())
pausescr();
nl();
quoted=0;
if (okfsed()) {
npr("5Do you want to select the lines to quote? 0");
if (!yn())
qnq=0;
else
outchr(12);
} else
outchr(12);
p=b=org;
sprintf(s2,"%sINPUT.MSG",syscfgovr.tempdir);
unlink(s2);
if (!hangup) {
if ((Output=fopen(s2,"w+t"))==NULL) {
sprintf(s,"6ERR2: 9Could not create 1%s9! 5(1quote file5)0");
nl();
if (so())
pl(s);
else {
ssm(1,0,s);
pl("6Could not create quote file -- SysOp notified!0");
}
nl();
return;
}
while (*p!='\r')
++p;
*p='\0';
strcpy(s1,b);
p+=2;
len=len-(p-b);
b=p;
while (*p!='\r')
++p;
p+=2;
len=len-(p-b);
b=p;
sprintf(pb,"%s",ctime(&daten));
sprintf(s2,"1%s7, 1%s7. 1%s7, 1%s0",
(strnncpy(pb,0,2)),
(strnncpy(pb,4,6)),
(strnncpy(pb,8,9)),
(strnncpy(pb,20,23)));
strcpy(tb1,stripcolors(strip_to_node(s1)));
properize(tb1);
if (strlen(tb1)%2!=0)
sprintf(tb," %s",tb1);
else
strcpy(tb,tb1);
jj=tb1[0]=0;
for (j=0;j<strlen(tb);j++) {
if ((toupper(tb[j])==tb[j]) &&
(isalpha(tb[j]))) {
tb1[jj]=tb[j];
tb1[jj+1]=0;
jj++;
}
}
if (!tb1[0]) {
if (tb[0]==32)
tb1[0]=tb[1];
else
tb1[0]=tb[0];
tb1[1]=0;
}
if (Unknown) {
sprintf(tb," %s",get_string(482));
strcpy(tb1,"6>2U6<0");
Unknown=0;
}
switch (type) {
case 1:
sprintf(buf,"3» 9In your E-Mail of 1%s7,9 you wrote: 3«0",s2);
break;
case 2:
sprintf(buf,
"3» 9This was forwarded from 1%s9, sent on 1%s9. 3«0",tb,s2);
break;
case 3:
sprintf(buf,
"3» 9In a message posted 1%s7,9 you wrote: 3«0",s2);
break;
case 4:
sprintf(buf,"3» 9On 1%s7, 1%s9 said this: 3«0",s2,tb);
break;
}
length=0;
for (j=0;j<strlen(buf);j++) {
if ((buf[j]!='\003') && (buf[j-1]!='\003'))
length++;
}
jj=(39-(length/2));
fprintf(Output,"2%s%s%s0\n",charstr(jj,196),buf,charstr(jj,196));
line_control=1;
done=0;
k=78-strlen(tb1);
while ((len>0) && (!done) && (!hangup)) {
while ((strchr("\r\001",*p)==NULL) && ((p-b)<(len<253 ? len : 253)))
++p;
if (*p=='\001')
*(p++)='\0';
*p='\0';
if ((*b!='\004') && (strchr(b,'\033')==NULL)) {
for (j=0;j<k;j++) {
if (((b[j]=='0') && (b[j-1]!='\003')) || (b[j]!='0'))
b1[j]=b[j];
else
b1[j]='7';
b1[j+1]=0;
}
if ((qnq) && (line_control>thisuser.screenlines)) {
line_control=0;
outchr(12);
}
if ((qnq) && (okansi())) {
goxy(0,line_control);
line_control++;
}
if ((ii) && (okansi()) && (qnq)) {
pl(charstr(79,32));
goxy(0,line_control-1);
}
sprintf(buf,"1%s7»9%s0",tb1,b1);
if (qnq) {
if (!okansi())
outchr(12);
pl(buf);
if (okansi()) {
goxy(0,line_control);
line_control++;
}
npr(
"5Quote this line? 3(1[2Y1]es, [2n1]o, [2q1]uit, [2a1]bort3) 0");
ch=onek("QY\rNA");
switch (ch) {
case '\r':
case 'Y':
fprintf(Output,"%s\n",buf);
quoted=1;
ii=0;
line_control--;
goxy(0,line_control);
pl(charstr(79,32));
done=0;
break;
case 'N':
line_control-=2;
ii=1;
done=0;
break;
case 'A':
pl("Aborted!");
quoted=0;
done=1;
break;
default:
case 'Q':
done=1;
break;
}
} else {
fprintf(Output,"%s\n",buf);
quoted=1;
}
}
p+=2;
len=len-(p-b);
b=p;
}
nl();
pl("5Enter your reply text 3(1default6: 2My reply to this3)0");
mpl(60);
inputl(s,60);
if (!s[0])
strcpy(s,"My reply to this");
jj=(39-((strlen(s)+4)/2));
fprintf(Output,"2%s3» 4%s3 «2%s0\n",
charstr(jj,196),s,charstr(jj,196));
outchr(12);
if (!okfsed())
fprintf(Output,"\0");
fclose(Output);
if (!quoted) {
sprintf(s2,"%sINPUT.MSG",syscfgovr.tempdir);
unlink(s2);
}
irt_name[0]='\0';
}
farfree(org);
}
char *strip_to_node(char *txt)
{
int i,ok;
char s[81];
if (strstr(txt,"@")!=NULL) {
ok=1;
for (i=0; i<strlen(txt); i++) {
if (ok) {
s[i]=txt[i];
s[i+1]=0;
}
if (txt[i+2]=='#')
ok=0;
}
return(s);
}
if (strstr(txt,"AT")!=NULL) {
ok=1;
for (i=2; i<strlen(txt); i++) {
if (ok) {
s[i-2]=txt[i];
s[i-1]=0;
}
if (txt[i+1]=='`')
ok=0;
}
return(s);
}
return(txt);
}
char *strnncpy(char *str_parse, int start_ch, int end_ch)
{
int i,j=0;
char s[255];
if (start_ch<0)
start_ch=0;
if (end_ch>(strlen(str_parse)))
end_ch=strlen(str_parse);
for (i=start_ch;i<(end_ch+1);i++) {
s[j]=str_parse[i];
s[j+1]=0;
j++;
}
return(s);
}
// SPV031IH BLOCK COPY END
NOTE: To use this function, simply call it something like:
strcpy(s,(strnncpy("This is a test",5,8)));
This places "is a" into the variable s.
─────────────────────────────────────────────────────────────────────────────
STEP 8: Prototype the function ins FCNS.H:
== int existprint(unsigned char *fn);
== void read_message(int n, int *next, int *val);
== void lineadd(messagerec *m1, char *sx, char *aux);
++ void extract_out2(char *org, long len, int type, long daten); //SPV031IH
++ char *strip_to_node(char *txt); //SPV031IH
++ char *strnncpy(char *str_parse, int start_ch, int end_ch); //SPV031IH
==
== /* File: msgbase1.c */
─────────────────────────────────────────────────────────────────────────────
STEP 9: Add these global variable declarations to VARS.H in the __EXTRN__
int section:
== use_workspace, using_modem, wfc, x_only,
== instance,debuglevel,multitasker,tagging,tagptr,cursormove,
-+ titled, abortext,quoted,Unknown; // SPV031IH
==
== __EXTRN__ unsigned short com_speed, *csn_index, crc, *gat, modem_flag,
== modem_mode, modem_speed, net_sysnum, curloc, eflags;
─────────────────────────────────────────────────────────────────────────────
STEP 10: In MSGBASE1.C, add this line in
void scan(int msgnum, int optype, int *nextsub)
== write_inst(INST_LOC_SUBS, usub[cursub].subnum, INST_FLAGS_NONE);
== switch(optype) {
== case 0: /* Read Prompt */
++ quoted=0; // SPV031IH
== if (E_C) {
== sprintf(s,"1%s0:7(11-%u,^%u7)1,? 0: ",get_string(678),
== nummsgs,msgnum);
─────────────────────────────────────────────────────────────────────────────
STEP 11: In MSGBASE1.C, make the following changes in:
void scan(int msgnum, int optype, int *nextsub)
== optype=2;
== msgnum=i;
== } else
== if (s[1]==0) {
// START SPV031IH BLOCK COPY
if ((s[0]=='A') || (s[0]=='W')) {
nl();
npr("5Quote from this message? 0");
if (ny()) {
p2=*get_post(msgnum);
grab_quotes(&(p2.msg),subboards[curlsub].filename);
if ((msgnum>0) && (msgnum<=nummsgs)) {
b=readfile(&(get_post(msgnum)->msg),
(subboards[curlsub].filename),&len);
extract_out2(b,len,((s[0]=='A')?3:4),p2.daten);
}
}
}
// END SPV031IH BLOCK COPY
== switch(s[0]) {
==
== /* Find addition */
─────────────────────────────────────────────────────────────────────────────
STEP 12: In MSGBASE1.C, make the following changes in:
void scan(int msgnum, int optype, int *nextsub)
++ case '@': // SPV031IH
== case 'A':
== if (rip_on()) {
== sprintf(s,"\n!|w000%c271610|e|#\r ", formery);
== comstr(s);
. . . SKIPPING DOWN A HAIR . . .
== pl(get_string(679));
== break;
== }
== }
// START SPV031IH BLOCK COPY
if (s[0]=='@') {
nl();
pl("4Replying to a different address!0");
send_email();
} else {
// END SPV031IH BLOCK COPY
== if ((lcs()) || (ss.ability & ability_read_post_anony) ||
== (get_post(msgnum)->anony==0))
─────────────────────────────────────────────────────────────────────────────
STEP 13: Make these changes in MSGBASE1.C, function:
void scan(int msgnum, int optype, int *nextsub)
== if ((msgs[msgnum].anony & anony_sender) &&
== ((syscfg.sl[actsl].ability & ability_read_post_anony)==0)) {
== strcat(s,get_string(482));
++ Unknown=1; // SPV031IH
== } else {
++ Unknown=0; // SPV031IH
== b=readfile(&(msgs[msgnum].msg),(subboards[curlsub].filename),
== &len);
─────────────────────────────────────────────────────────────────────────────
STEP 14: Now in READMAIL.C make these changes in void readmail(void)
== pl(get_string(715));
== nl();
== break;
== }
== nln(2);
// START SPV031IH BLOCK COPY
nl();
npr("5Quote this message?0 ");
if (ny()) {
b=readfile(&(m.msg),"EMAIL",&len);
extract_out2(b,len,2,m.daten);
nl();
pl("6Forwarding this E-Mail.0");
send_email();
break;
}
// END SPV031IH BLOCK COPY
== prt(2,get_string(716));
== input(s,75);
. . . SKIPPING SOME MORE LINES! . . .
== case 'A':
== case 'S':
== case 'M':
// START SPV031IG BLOCK READ
nl();
npr("5Quote from this message? 0");
if (ny()) {
grab_quotes(&(m.msg),"EMAIL");
b=readfile(&(m.msg),"EMAIL",&len);
extract_out2(b,len,((ch=='M')?2:1),m.daten);
if (ch=='M') {
nl();
pl("5Forwarding this E-Mail!0");
}
}
// END SPV031IG BLOCK READ
== if (rip_on()) {
== sprintf(s,"\n!|w000%c271610|e|#\r ", formery);
. . .SKIP DOWN JUST A FEW MORE LINES . . .
== i2=0;
== break;
== } else if (m.fromuser!=65535) {
-- grab_quotes(&(m.msg),"EMAIL"); // SPV031IH delete this line
== if (ch=='M') {
─────────────────────────────────────────────────────────────────────────────
STEP 15: Make these changes throughout READMAIL.C
== sprintf(s,"2%3d 7%c0 ",i+1,okansi()?'│':'|');
== if ((m.anony & anony_sender) &&
== ((ss.ability & ability_read_email_anony)==0)) {
== strcat(s,get_string(482));
++ Unknown=1; // SPV031IH
== } else {
++ Unknown=0; // SPV031IH
== if (m.fromsys==0) {
== if (m.fromuser==65535) {
. . . SKIPPING DOWN . . .
== strcpy(s,nam1(&thisuser,usernum,net_sysnum));
-+ if (m.anony & anony_receiver) { // SPV031IH added {
== strcpy(s,get_string(482));
++ Unknown=1;
++ } else
++ Unknown=0;
== strcat(s,get_string(713));
. . . DOWN SOME MORE . . .
== sprintf(s,"%s: %s",net_name,nam1(&thisuser,usernum,net_sysnum));
== else
== strcpy(s,nam1(&thisuser,usernum,net_sysnum));
-+ if (m.anony & anony_receiver) { // SPV031IH added {
== strcpy(s,get_string(482));
++ Unknown=1;
++ } else
++ Unknown=0;
== strcat(s,get_string(713));
. . .YEP, GO DOWN SOME MORE! (YES IT LOOKS THE SAME AS ABOVE). . .
== sprintf(s,"%s: %s",net_name,nam1(&thisuser,usernum,net_sysnum));
== else
== strcpy(s,nam1(&thisuser,usernum,net_sysnum));
-+ if (m.anony & anony_receiver) { // SPV031IH added {
== strcpy(s,get_string(482));
++ Unknown=1;
++ } else
++ Unknown=0;
== strcat(s,get_string(713));
== strcat(s,date());
─────────────────────────────────────────────────────────────────────────────
STEP 16: In NEWUSER.C, make this change in: void properize(char *s)
== for (i=0;i<strlen(s);i++) {
== if ((i==0) || ((i>0) && ((s[i-1]==' ') ||
++ (s[i-1]=='-') || // SPV031IH
== (s[i-1]=='.')))) {
─────────────────────────────────────────────────────────────────────────────
STEP 17: Make a file in your GFILES and call it QUOTE.MSG. Mine looks like
this, and yours should be similar!
QUOTE.MSG
---------
You are about to send a msg/e-mail with a quotation in it. You should
remove unnecessary lines, including taglines and signoff macros. This
helps reduce network LD costs.
─────────────────────────────────────────────────────────────────────────────
STEP 18: Recompile this beast, and enjoy your new quoting!
─────────────────────────────────────────────────────────────────────────────
Well, this is a complete overhauled mod for 4.24. I've installed it forst
thing on my virgin 4.24 system 'cause this is the most installation intensive
mod I make.
The word is, it works fine...
This mod is copyright 1993-1995 by Tracy Baker, aka Papa Bear, and is
distributed as freeware. Permission is granted to distribute and post this
mod on BBS systems and online services, provided no alterations are made
(removal of message headers/taglines allowed). This mod may contain some
parts of WWIV source code, which is copyright 1988-1994 by Wayne Bell and
licensed only to registered users of WWIV. Use of WWIV source without
registration constitutes a license violation and could lead to legal
prosecution and certain doom.
Shareware distributors and CD-ROM publishers may not distribute this mod
without express written permission of the Author or WWIV Software Services.
7-9=1*6>2Pâpâ ßêâr6<1*9=7-0
8311579.wwivnet1· 2 ╪╫9≡8║7⌐¬4¥5╓╥╖1· · 2▒1 · 2▒ 3(510)522-35831 ·
732.sexnet 1∙ 6 ·0░░▒▒▓▓6∞0▓▒░6·2 StarPort ▒ ▒ 2 ▒1 ·2▒ ▒ ▒1 ·2 ▒ ▒1 ·2▒ ▒ 1·
6315061.wwivlink 0 ████1 · . 2 ▒ ▒ ▒ ▒ ▒1 · 2▒▒▒ ▒ ▒ ▒ ▒ ▒ ▒
535079.icenet 1. . 0 │└6·0└6· 1 ∙ 2 ▒ ▒ ▒ ▒▒▒ ▒ ▒ ▒1 ·2 ▒ ▒▒▒ ▒▒▒ ▒1 ∙ 2▒
---
3This tagline is made from recycled electrons.