home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
Dloads
/
SYSOP
/
MODS1.ZIP
/
BEAM209A.MOD
< prev
next >
Wrap
Text File
|
1995-08-22
|
19KB
|
731 lines
Beamer #7 @2148
Sat Aug 19 11:28:07 1995
╔═══════════════════════════════════════════════════════════════════════════╗
║ Mod Name: : BEAM209A.MOD ║
║ Difficulty : ▓░░░░░░░░░ ║
║ WWIV Version : 4.24 ║
║ Version Date : 08/18/95 ║
║ Description : This mod will give you (The local SysOp) and all the users ║
║ a different way to upload files with this new Full screen ║
║ ANSI setup. Real cool mod, VERY easy to install. ║
║ Ansi Included! ║
╚═══════════════════════════════════════════════════════════════════════════╝
┌───────────────────────────────────────────────────────────────────────────┐
│ Legend: │
│ │
│ - Commeny out or delete │
│ + Add this │
│ = Leave alone │
│ @ Change this │
└───────────────────────────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────────────────┐
│ NOTE: WATCH FOR LINE WRAPS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! │
│ │
│ -=*=- You MUST have the 'Use FSED for ext. descriptions' turned toggled │
│ ON in your WWIV.INI setup... │
│ │
│ Example: │
│ FSED_EXT_DESC = YES ; allow fsed for extended descriptions │
└───────────────────────────────────────────────────────────────────────────┘
─────────────────────────────────────────────────────────────────────────────
Step 0: Dahhhhh!!!
─────────────────────────────────────────────────────────────────────────────
─────────────────────────────────────────────────────────────────────────────
Step 1: If you do not have this yet, please add this to the end of
BBSOVL2.C
─────────────────────────────────────────────────────────────────────────────
void noabort(unsigned char *fn)
{
int oic;
if (using_modem) {
oic=incom;
incom=0;
dump();
}
existprint(fn);
if (using_modem) {
dump();
incom=oic;
}
}
─────────────────────────────────────────────────────────────────────────────
Step 2: Add these to the end of COM.C
─────────────────────────────────────────────────────────────────────────────
int new_yn(void)
{
char ch=0;
ansic(4);
while ((!hangup) && ((ch = upcase(getkey())) != *str_yes) &&
(ch != *str_no) && (ch != 13));
ansic(4);
if (ch==*str_yes)
print_yn(2);
else
print_yn(3);
return(ch == *str_yes);
}
char ynq2(void)
{
char ch=0;
ansic(4);
while ((!hangup) &&
((ch = upcase(getkey())) != *str_yes) &&
(ch != *str_no) &&
(ch != *str_quit) &&
(ch != 13)) ;
ansic(4);
if (ch==*str_yes) {
ch='Y';
print_yn2(2);
} else if (ch==*str_quit) {
ch='Q';
outstr(str_quit);
} else {
ch='N';
print_yn2(3);
}
return(ch);
}
─────────────────────────────────────────────────────────────────────────────
Step 3: Load XFEROVL2.C and search for: 'void upload(int dn)' and Replace
it with the one I provided...
─────────────────────────────────────────────────────────────────────────────
void maybe_extended_description(char **sss, char *dest, char *title)
{
char s[161],s1[161];
int f,ii,i,i1,i2,i3;
if (*sss)
ii=1;
else
ii=0;
do {
if (ii) {
goxy(5,17);
npr("4%s", charstr(70,' '));
goxy(5,18);
npr("4%s", charstr(70,' '));
goxy(5,13);
npr("4%s", charstr(70,' '));
goxy(5,13);
prt(4,get_string(734));//Modify extended description?
if (!new_yn())
return;
} else {
goxy(5,13);
npr("4%s", charstr(70,' '));
goxy(5,13);
prt(4,"Enter an extended description? ");
if (!new_yn())
return;
}
CLS();
sprintf(s,"%sEXTENDED.DSC", syscfgovr.tempdir);
if (*sss) {
f=sh_open(s,O_RDWR | O_BINARY | O_CREAT | O_TRUNC, S_IREAD | S_IWRITE);
sh_write(f,*sss,strlen(*sss));
sh_close(f);
bbsfree(*sss);
*sss=NULL;
} else
unlink(s);
i=thisuser.screenchars;
if (thisuser.screenchars>(76-INDENTION))
thisuser.screenchars=76-INDENTION;
i1=external_edit("extended.dsc",syscfgovr.tempdir,(int) thisuser.defed-1,
sysinfo.max_extend_lines, dest, title, 1);
thisuser.screenchars=i;
if (i1) {
if ((*sss=malloca(10240))==NULL)
return;
f=sh_open1(s,O_RDWR | O_BINARY);
sh_read(f,*sss,(int) filelength(f));
(*sss)[filelength(f)]=0;
sh_close(f);
}
for (i3=strlen(*sss)-1; i3>=0; i3--)
if ((*sss)[i3]==1)
(*sss)[i3]=' ';
nln(2);
prt(5,get_string(740));//Is this what you want?
i=!yn();
if (i) {
CLS();
nln(2);
bbsfree(*sss);
*sss=NULL;
}
} while (i);
}
void upload(int dn)
{
directoryrec d;
uploadsrec u,u1;
unsigned char ch;
int i,i1,i2,i3,i4,ok,xfer,f;
char s[255],s1[81],s2[81],*ss;
long l;
double ti;
if ((numbatch!=0) && (numbatch-numbatchdl>0)) {
nln(2);
npr(get_string(1529));
if (ny()) {
batchdl(2);
return;
}
}
dliscan1(dn);
d=directories[dn];
if (numf>=d.maxfiles) {
nln(2);
prt(7,get_string(755));//This dir is full.
nl();
return;
}
if ((d.mask & mask_no_uploads) && (!dcs())) {
nln(2);
pl(get_string(756));//Upoads not allowed in this dir
nl();
return;
}
nl();
l=(long)freek1(d.path);
if (l<100) {
nln(2);
pl(get_string(759));//not enough free space to upload
nl();
return;
}
if (menu_on()) {
rip_saveall();
printmenu(361);
input(s,12);
rip_restoreall();
} else {
if ((okansi()) && (!rip_on())) {
noabort("UL.ANS");
goxy(5,13);
prt(4,"Filename that you want to Upload:");
goxy(23,18);
prt(4,"Thank You For All Your New Uploads!");
goxy(39,13);
mpl(12);
input(s,12);
} else {
prt(2,get_string(44));//Filename:
input(s,12);
}
}
if (!okfn(s)) {
s[0]=0;
CLS();
ansic(0);
} else {
if (!is_uploadable(s)) {
if (so()) {
if ((okansi()) && (!rip_on())) {
goxy(5,13);
npr("4%s", charstr(70,' '));
goxy(5,13);
prt(4,get_string(1322));//In database, add anyway?
} else {
nl();
prt(7,get_string(1322));//In database, add anyway?
}
ch=ynq2();
if (ch=='N') {
s[0]=0;
CLS();
ansic(0);
nln(2);
} else if (ch=='Q') {
s[0]=0;
CLS();
ansic(0);
nln(2);
}
} else {
if ((okansi()) && (!rip_on())) {
goxy(5,18);
npr("4%s", charstr(70,' '));
goxy(14,18);
prt(4,get_string(1323));//That file is already here, Or not wanted!
goxy(33,22);
pausescr();
CLS();
ansic(0);
} else {
nl();
pl(get_string(1323));//That file is already here!
}
s[0]=0;
}
}
}
if (!s[0]) {
CLS();
ansic(0);
return;
}
align(s);
if (strchr(s,'?')) {
CLS();
ansic(0);
return;
}
if (d.mask & mask_archive) {
ok=0;
s1[0]=0;
for (i=0; i<4; i++) {
if (syscfg.arcs[i].extension[0] && syscfg.arcs[i].extension[0]!=' ') {
if (s1[0])
strcat(s1,", ");
strcat(s1,syscfg.arcs[i].extension);
if (strcmp(s+9,syscfg.arcs[i].extension)==0)
ok=1;
}
}
if (!ok) {
if ((okansi()) && (!rip_on())) {
goxy(5,18);
npr("4%s",charstr(70,' '));
goxy(7,17);
prt(4,"I'm sorry, but all Uploads to that directory MUST be Archived using");
goxy(21,18);
prt(4,"PKZIP.EXE / ARC.EXE / LZH.EXE / LHA.EXE");
goxy(33,22);
pausescr();
CLS();
} else {
nl();
pl(get_string(760));//sorry, all uploads to this dir must
pl(get_string(761));//be archived like the following:
pl(s1);
nl();
}
return;
}
}
strcpy(u.filename,s);
u.ownerusr=usernum;
u.ownersys=0;
u.numdloads=0;
u.filetype=0;
u.mask=0;
strcpy(u.upby,nam(&thisuser,usernum));
strcpy(u.date,date());
if ((okansi()) && (!rip_on())) {
ok=1;
} else {
nl();
ok=1;
}
xfer=1;
if (check_batch_queue(u.filename)) {
if ((okansi()) && (!rip_on())) {
ok=0;
goxy(5,18);
npr("4%s",charstr(70,' '));
goxy(5,17);
npr("4%s",charstr(70,' '));
goxy(20,18);
prt(4,get_string(762));//That file already in batch queue.
goxy(33,22);
pausescr();
CLS();
} else {
ok=0;
nl();
pl(get_string(762));//That file already in batch queue.
nl();
}
} else {
sprintf(s1,"%s 7'2%s7' %s 3%s2? ",get_string(757), s,
get_string(763),d.name);//U/L 'FILE.EXT' to xxx dir?
sprintf(s2,"Upload '%s' to %s? ",s,d.name);//U/L 'FILE.EXT' to xxx dir?
if (strcmp(s," . ")) {
if ((okansi()) && (!rip_on())) {
goxy(5,13);
npr("4%s", charstr(70,' '));
goxy(5,13);
prt(4,s2);
} else {
prt(7,s1);
}
} else {
ok=0;
CLS();
ansic(0);
}
}
if ((ok) && (new_yn())) {
sprintf(s1,"%s%s",d.path,s);
if (exist(s1)) {
if (dcs()) {
xfer=0;
if ((okansi()) && (!rip_on())) {
goxy(5,13);
npr("4%s", charstr(70,' '));
goxy(5,13);
prt(4,get_string(1322));//In database, add anyway?
} else {
nln(2);
pl(get_string(764));//Already exists
prt(7,get_string(765));//Add anyway?
}
if (new_yn()==0) {
ok=0;
CLS();
ansic(0);
}
} else {
if ((okansi()) && (!rip_on())) {
goxy(5,17);
npr("4%s",charstr(70,' '));
goxy(5,18);
npr("4%s",charstr(70,' '));
goxy(5,18);
prt(4,"Upload Aborted! That file is already here!");
goxy(33,22);
pausescr();
CLS();
} else {
nln(2);
pl(get_string(766));//File is here already
nl();
}
ok=0;
}
} else
if (!incom) {
CLS();
nln(3);
pl(get_string(767));//File is not here already
pl(get_string(768));//Can't upload locally
nln(3);
ok=0;
}
if ((d.mask & mask_PD) && (ok)) {
if ((okansi()) && (!rip_on())) {
goxy(5,13);
npr("4%s", charstr(70,' '));
goxy(5,13);
prt(4,"Is the file Shareware or Freeware? ");
} else {
nl();
prt(5,get_string(769));//Is the file shareware?
}
if (!new_yn()) {
if ((okansi()) && (!rip_on())) {
goxy(5,17);
npr("4%s",charstr(70,' '));
goxy(5,18);
npr("4%s",charstr(70,' '));
goxy(5,17);
prt(4,"This directory is for Shareware or Freeware programs ONLY, Please don't");
goxy(5,18);
prt(4,"Upload Non-Public Domain files here, Leave SysOp E-mail if any question");
goxy(33,22);
pausescr();
CLS();
} else {
nl();
pl(get_string(770));
pl(get_string(771));
pl(get_string(772));
pl(get_string(773));
pl(get_string(774));
nl();
}
sprintf(s,get_stringx(1,41),u.filename);
add_ass(5,s);
ok=0;
} else
u.mask=mask_PD;
}
if (ok && (!(sysinfo.flags & OP_FLAGS_FAST_SEARCH))) {
if ((okansi()) && (!rip_on())) {
goxy(5,17);
npr("4%s",charstr(70,' '));
goxy(5,18);
npr("4%s",charstr(70,' '));
goxy(5,17);
prt(4,"Please hold, Checking for same file in other directories...");
} else {
nl();
pl(get_string(775));//Checking for same file in other dirs
nl();
}
i2=0;
for (i=0; (i<num_dirs) && (udir[i].subnum!=-1); i++) {
strcpy(s,get_string(776));//Scanning
strcat(s,directories[udir[i].subnum].name);
for (i3=i4=strlen(s); i3<i2; i3++) {
s[i3]=' ';
s[i3+1]=0;
}
i2=i4;
if ((okansi()) && (!rip_on())) {
goxy(5,18);
npr("%s",s);
} else {
npr("%s\r",s);
}
dliscan1(udir[i].subnum);
i1=recno(u.filename);
if (i1>=0) {
if ((okansi()) && (!rip_on())) {
goxy(5,17);
npr("4%s",charstr(70,' '));
goxy(5,18);
npr("4%s",charstr(70,' '));
goxy(5,17);
prt(4,"Same file found on:");
goxy(5,18);
npr("%s",directories[udir[i].subnum].name);
goxy(33,22);
pausescr();
CLS();
} else {
nl();
outstr(get_string(777));//same file found on
pl(directories[udir[i].subnum].name);
}
if (dcs()) {
if ((okansi()) && (!rip_on())) {
goxy(5,13);
npr("4%s",charstr(70,' '));
prt(4,"Upload anyway? ");
} else {
nl();
prt(5,get_string(778));//Upload anyway?
nl();
}
if (!new_yn()) {
ok=0;
CLS();
ansic(0);
break;
}
} else {
ok=0;
CLS();
ansic(0);
break;
}
}
}
for (i1=0; i1<i2; i1++)
s[i1]=' ';
s[i1]=0;
npr("%s\r",s);
if (ok)
dliscan1(dn);
if (!okansi())
nl();
}
if (ok) {
if ((okansi()) && (!rip_on())) {
goxy(5,13);
npr("4%s",charstr(70,' '));
goxy(5,13);
prt(4,"Enter Description: ");
goxy(24,13);
mpl(50);
inputl(u.description,50);
} else {
nl();
pl(get_string(779));//Enter the discription
outstr(": ");
inputl(u.description,58);
nl();
}
ss=NULL;
if ((okansi()) && (!rip_on())) {
maybe_extended_description(&ss, directories[dn].name,u.filename);
} else {
modify_extended_description(&ss, directories[dn].name,u.filename);
}
if (ss) {
add_extended_description(u.filename,ss);
u.mask |= mask_extended;
bbsfree(ss);
}
nl();
if (xfer) {
write_inst(INST_LOC_UPLOAD,udir[curdir].subnum,INST_FLAGS_NONE);
ti=timer();
CLS();
ansic(0);
receive_file(s1,&ok,&u.filetype, u.filename, dn);
ti=timer()-ti;
if (ti<0)
ti += 24.0*3600.0;
thisuser.extratime += ti;
}
if (ok) {
if (ok==1) {
f=sh_open1(s1,O_RDONLY | O_BINARY);
if (f<0) {
ok=0;
CLS();
goxy(1,2);
pl(get_string(780));//DOS error, file not found
nln(2);
if (u.mask & mask_extended)
delete_extended_description(u.filename);
}
if (ok && syscfg.upload_c[0]) {
sh_close(f);
CLS();
goxy(1,2);
prt(1,get_string(26));//Please wait...
nl();
if (check_ul_event(dn,&u)) {
if (u.mask & mask_extended)
delete_extended_description(u.filename);
ok=0;
} else {
f=sh_open1(s1,O_RDONLY | O_BINARY);
}
}
}
if (ok) {
CLS();
ansic(0);
if (ok==1) {
l=filelength(f);
u.numbytes=l;
sh_close(f);
++thisuser.uploaded;
modify_database(u.filename,1);
thisuser.uk += bytes_to_k(l);
get_file_idz(&u,dn);
if (sysinfo.flags & OP_FLAGS_PACKSCAN_FREQ)
remotenotify(u.filename,u.description);
} else
u.numbytes=0;
time(&l);
u.daten=l;
f=sh_open(dlfn,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
for (i=numf; i>=1; i--) {
SETREC(f,i);
sh_read(f,(void *)&u1,sizeof(uploadsrec));
SETREC(f,i+1);
sh_write(f,(void *)&u1,sizeof(uploadsrec));
}
SETREC(f,1);
sh_write(f,(void *)&u,sizeof(uploadsrec));
++numf;
SETREC(f,0);
sh_read(f, &u1, sizeof(uploadsrec));
u1.numbytes=numf;
u1.daten=l;
dir_dates[dn]=l;
SETREC(f,0);
sh_write(f,(void *)&u1,sizeof(uploadsrec));
f=sh_close(f);
if (ok==1) {
lock_status();
++status.uptoday;
++status.filechange[filechange_upload];
save_status();
sprintf(s,get_stringx(1,42),u.filename,directories[dn].name);
sysoplog(s);
nln(2);
pl(get_string(781));//File Uploaded
nl();
outstr(get_string(782));//Your ratio is now:
npr("%-6.3f\r\n", ratio());
nln(2);
if (useron)
topscreen();
}
}
} else {
CLS();
ansic(0);
goxy(1,2);
pl(get_string(783));//File transmission aborted!
nln(2);
if (u.mask & mask_extended)
delete_extended_description(u.filename);
}
}
}
if ((okansi()) && (!rip_on())) {
CLS();
ansic(0);
}
}
─────────────────────────────────────────────────────────────────────────────
STEP 4: Open MMENU.C and replace case 'U':
with this one...
─────────────────────────────────────────────────────────────────────────────
case 'U':
helpl=17;
play_sdf(get_string(1040),0);
CLS();
if ((thisuser.restrict & (restrict_validate | restrict_upload)) ||
(syscfg.sysconfig & sysconfig_all_sysop)) {
if (syscfg.newuploads<num_dirs)
upload((int) syscfg.newuploads);
else
upload(0);
} else
upload(udir[curdir].subnum);
break;
─────────────────────────────────────────────────────────────────────────────
STEP 5: Un UUEcode the following ANSI and place it in your Gfiles dir
─────────────────────────────────────────────────────────────────────────────
section 1 of uuencode 5.10 of file ul.zip by R.E.M.
begin 644 ul.zip
M4$L#!!0````(`(NJ"1_RGKX5Z0$``*8)```&````54PN04Y3W9;-3MM`$(#O
MD?($N4SO%8J)A0\^@I"@4HK41#U8/2SQ)C'R>"M[0Y3G\@.00U\B8-I786?6
M(19))&Q\0)W3_HQGOOGQV+W`[6,O.+WF1;?3"_K^X`S_FJV+_]H4=O#<[5C3
MT`L<?^#XKH//[+-/RR*'G5@-S"O7YHC0[-[%HE3R?-?#QS]-9&O,PX<MU^#,
M/T8*.Y:<-#T<_XZ5"*-D]HI+YWVB=,[M\ZQ('G+[N$OKFUB*3$*HZ-;!X?<1
M+5Q<L#V81K',0,^%AJ4$$:=2A"N8BWNS24+K(J\+;$GPDFU#3>`J413'EB51
M@%(D%/Z2;C(%\EZF)S":*Q-=$\QUB56IT:8.(</=+3(-MR:],I9:AIRSE5JD
MG%=(A8Z457P_807QD=-8E,(FJ)$8^^%]K#.I082$2723B4JIA^+5"?R47TU:
M4\*%I4@T:(,JC%XSUIQ9GP">C)J']KTRYW7+3\G3$5+'+I-=RQL#U^/A-]N[
MAII/?HS&-U<7]LP699HJI(B^?"B(HF@0Q'KWAC<:$)MCK-;EWIB#QG+`18NR
M-WX-?+.1>7B,FCJXW/W\_7CCJ#K6/QH&.\J/.%J7]ZT%MMEWU*:T7Q7J(@PH
M3SA46F8E/WTN?Y6CZM-4ZW]JBZ)-V;8%_X]AM_,"4$L!`A0`%`````@`BZH)
M'_*>OA7I`0``I@D```8``````````0`@`````````%5,+D%.4U!+!08`````
.`0`!`#0````-`@``````
`
end
sum -r/size 57255/851 section (from "begin" to "end")
sum -r/size 34540/599 entire input file
─────────────────────────────────────────────────────────────────────────────
STEP 6: MAKE FCNS and Re-Compile the whole code!
─────────────────────────────────────────────────────────────────────────────
After Dark BBs
(314) 946-1730