home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
BBS
/
WSYS15.ZIP
/
FMD-40.MOD
< prev
next >
Wrap
Text File
|
1995-04-17
|
44KB
|
1,566 lines
┌┬─── ── ─ ─ ── ───────────────────────────────────────────────────┬─ ∙∙
││ Alternative Worlds Presents │
└┼─────────────────────────────────────────────────────────────────────┐
││ Mod Name » FMD-40.MOD │∙
││ Difficulty » ███▒▒▒▒▒▒▒▒ (3/10) │:
││ WWIV Version » 4.23 / v4.24 ││
││ Date Affected » 01/01/95 ││
:│ Files Affected » SYSOPF.C / BBS.C / BBSOVL1.C / READMAIL.C ││
∙│ Description » Use WWIVsys Inside WWIV - DGROUP Saver ││
└─────────────────────────────────────────────────────────────────────┼┐
│ A French Mod Division Release - (C) 1995 FMD Software ││
∙∙ ─┴─────────────────────────────────────────────────── ── ─ ─ ── ───└┘
┌┬══════════════════┐
││ Long Description ││
└══════════════════┴┘
This modification will allow WWIVsys registered users to use WWIVsys from
inside their WWIV and to replace all internal sysop functions.
You will be able to remove internal functions also if you don't have any
remote SysOp, so it will save you a lot of Dgroup and will discrease the size
of your BBS.EXE and you will have more memory available.
AUTHOR'S NOTE: WWIVsys will load much faster once WWIV v4.24 will be out with
the new spawing functions.
──────────────────────────────────────────────────────────────────────────────
Legend
╔═══╤══════════════════┐
│ + │ Add This Line │
│ - │ Delete This Line │
│ * │ Modify This Line │
│ = │ Existing Line │
└═══╧══════════════════╝
───[Step 0]────────────────────────────────────────────────────────────────────
**Backup your source code, due to this being the 1st release, there is a huge
possibility that it isn't perfect and that it may contains bugs.
───[Step 1]────────────────────────────────────────────────────────────────────
Load SYSOPF.C and do the following changes:
=#include "vars.h"
=
=#pragma hdrstop
=
+#include "wwivsys.h"
And add the following function at the end of the file:
void wwivsys(int fcns)
{
char s[81];
int i, f;
if (incom) {
npr("\r\nCannot load WWIVsys from remote.\r\n\r\n");
return;
}
save_status();
save_config();
switch(fcns)
{
case 0:
sprintf(s, "SYS.EXE");
break;
case ZLOG:
sprintf(s, "SYS.EXE -ZL");
break;
case AUTOVAL:
sprintf(s, "SYS.EXE -AV");
break;
case BBSINFO:
sprintf(s, "SYS.EXE -BI");
break;
case CONFDIR:
save_confs(CONF_DIRS, -1, NULL);
sprintf(s, "SYS.EXE -CD");
break;
case DEFRAG:
save_subs();
sprintf(s, "SYS.EXE -DF");
break;
case DIREDIT:
sprintf(s, "SYS.EXE -DE");
break;
case CHAINEDIT:
sprintf(s, "SYS.EXE -CE");
break;
case FSED:
save_config();
sprintf(s, "SYS.EXE -FSED");
break;
case EXTERNAL:
save_config();
sprintf(s, "SYS.EXE -EP");
break;
case FILEEDIT:
sprintf(s, "SYS.EXE -FE");
break;
case GFILES:
sprintf(s, "SYS.EXE -GF");
break;
case GFILEEDITOR:
sprintf(s, "SYS.EXE -GE");
break;
case INSTANCE:
sprintf(s, "SYS.EXE -IE");
break;
case LANGUAGE:
sprintf(s, "SYS.EXE -LE");
break;
case MODEM:
sprintf(s, "SYS.EXE -ME");
break;
case NETEDITOR:
sprintf(s, "SYS.EXE -NE");
break;
case PATH:
sprintf(s, "SYS.EXE -PATH");
break;
case PROTOCOL:
sprintf(s, "SYS.EXE -PE");
break;
case SLRECEDIT:
sprintf(s, "SYS.EXE -SE");
break;
case CONFIG:
sprintf(s, "SYS.EXE -CFG");
break;
case SSMEDITOR:
sprintf(s, "SYS.EXE -SSM");
break;
case STATISTICS:
sprintf(s, "SYS.EXE -STAT");
break;
case STRINGEDIT:
close_strfiles();
sprintf(s, "SYS.EXE -ESE");
break;
case CONFBOARD:
save_confs(CONF_SUBS, -1, NULL);
save_subs();
sprintf(s, "SYS.EXE -CB");
break;
case BOARDEDIT:
save_subs();
sprintf(s, "SYS.EXE -BE");
break;
case SUBLIST:
save_subs();
sprintf(s, "SYS.EXE -SL");
break;
case TETRIX:
sprintf(s, "SYS.EXE -TE");
break;
case UEDIT:
sprintf(s, "SYS.EXE -UE");
break;
case IVOTE:
sprintf(s, "SYS.EXE -IV");
break;
case INISWITCH:
sprintf(s, "SYS.EXE -INI");
break;
case INIEDITOR:
sprintf(s, "SYS.EXE -INIE");
break;
}
#ifdef WWIV424
extern_prog(s, EFLAG_SHRINK|EFLAG_INTERNAL|EFLAG_TOPSCREEN);
#else
shrink_out(s, 1, 0, 1, 1);
#endif
read_config();
read_status();
switch(fcns)
{
case CONFDIR:
read_in_conferences(CONF_DIRS);
read_dirs();
break;
case DEFRAG:
read_subs();
break;
case DIREDIT:
read_dirs();
break;
case CHAINEDIT:
read_chains();
break;
case GFILES:
read_gfile();
break;
case CONFIG:
#ifdef WWIV424
read_ini_info();
#endif
break;
case STRINGEDIT:
set_language(thisuser.language);
break;
case CONFBOARD:
read_in_conferences(CONF_SUBS);
read_subs();
break;
case BOARDEDIT:
read_subs();
break;
case SUBLIST:
read_subs();
break;
case IVOTE:
read_voting();
break;
case INISWITCH:
case INIEDITOR:
#ifdef WWIV424
read_ini_info();
#endif
break;
}
}
Save SYSOPF.C
───[Step 2]────────────────────────────────────────────────────────────────────
Now you have to select if you would like to remove internal functions or not.
If you have remote SysOps, you shouldn't remove them, and if you do remove
them, you will save a lot of Dgroup space, but in another hand, if you remove
them you will ALWAYS use WWIVsys, so you better think about it.
Step 2a is to keep internal functions.
Step 2b is to remove all internal SysOp functions.
───[Step 2a]───────────────────────────────────────────────────────────────────
Load BBS.C and do the following changes:
=#pragma hdrstop
=
=#define _DEFINE_GLOBALS_
=#include "vars.h"
=#include "subxtr.h"
+#include "wwivsys.h"
=
=#include <math.h>
And now in function mainmenu:
/**************************************************/
= if (so()) {
=#ifdef OPT_FAST_SEARCH
= if ((strcmp(s,"ALLOWEDIT")==0) || (strcmp(s,"AE")==0))
= edit_database();
=#endif
= if ((strcmp(s,"INSTEDIT")==0) || (strcmp(s,"IE")==0))
= instance_edit();
= if ((strcmp(s,"CONFEDIT")==0) || (strcmp(s,"JE")==0)) {
= write_inst(INST_LOC_CONFEDIT,0,INST_FLAGS_ONLINE);
= edit_confs();
= }
= if ((strcmp(s,"BOARDEDIT")==0) || (strcmp(s,"BE")==0)) {
= write_inst(INST_LOC_BOARDEDIT,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,2));
+ if (incom)
= boardedit();
+ else
+ wwivsys(BOARDEDIT);
= }
= if ((strcmp(s,"CHAINEDIT")==0) || (strcmp(s,"CE")==0)) {
= write_inst(INST_LOC_CHAINEDIT,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,4));
+ if (incom)
= chainedit();
+ else
+ wwivsys(CHAINEDIT);
= }
= if (strcmp(s, "CHAT")==0) {
= nl();
= pl(((*(char far *)0x00000417L ^= 0x10) & 0x10) ?
= get_string(21) :
= get_string(22));
= sysoplog(get_stringx(1,9));
= topscreen();
= }
= if ((strcmp(s,"CHUSER")==0) || (strcmp(s,"CU")==0)) {
= write_inst(INST_LOC_CHUSER,0,INST_FLAGS_ONLINE);
= chuser();
= }
= if (strcmp(s,"CLOUT")==0) {
= npr("\r\nNot Yet.\r\n");
= /* force_callout(2); */
= }
= if (strncmp(s,"DEBUG",5)==0) {
= if((s[5]) && (s[5]!=' '))
= debuglevel=s[5]-'0';
= else if(s[6])
= debuglevel=s[6]-'0';
= }
= if ((strcmp(s,"DIREDIT")==0) || (strcmp(s,"DE")==0)) {
= write_inst(INST_LOC_DIREDIT,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,3));
+ if (incom)
= dlboardedit();
+ else
+ wwivsys(DIREDIT);
= }
= if (strcmp(s,"DOS")==0) {
= if (checkpw()) {
= write_inst(INST_LOC_DOS,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,6));
= shrink_out(getenv("COMSPEC"),1,1,1,0);
= topscreen();
= }
= }
= if ((strcmp(s,"EDIT")==0)) {
= if (checkpw()) {
= write_inst(INST_LOC_TEDIT,0,INST_FLAGS_ONLINE);
= nl();
= prt(2,get_string(7));
= input(s1,50);
= if (s1[0]) {
= if ((okansi()) && (thisuser.defed))
= external_edit(s1,"",thisuser.defed-1,500,".",s1,1);
= else
= tedit(s1);
= }
= }
= }
= if ((strcmp(s,"GFILEEDIT")==0) || (strcmp(s,"GE")==0)) {
= write_inst(INST_LOC_GFILEEDIT,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,5));
+ if (incom)
= gfileedit();
+ else
+ wwivsys(GFILEEDITOR);
= }
= if (strcmp(s,"LOAD")==0) {
= nl();
= prt(2,get_string(7));
= input(s1,50);
= if (s1[0]) {
= nl();
= prt(5,get_string(17));
= if (yn()) {
= nl();
= load_workspace(s1,0);
= } else {
= nl();
= load_workspace(s1,1);
= }
= }
= }
= if (strcmp(s,"MAILR")==0) {
= if (checkpw()) {
= write_inst(INST_LOC_MAILR,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,8));
= mailr();
= }
= }
= if ((strcmp(s,"REBOOT")==0) && (checkpw())) {
= write_inst(INST_LOC_REBOOT,0,INST_FLAGS_ONLINE);
= dtr(0);
= sysoplog(get_stringx(1,7));
= logoff();
= sl1(1,"");
= if (ok_modem_stuff)
= closeport();
= close_strfiles();
= wait(3.0);
= setvect(0xff,(void interrupt (*) ()) MK_FP(0xffff,0x0000));
= geninterrupt(0xff);
= }
= if (strcmp(s,"RELOAD")==0) {
= write_inst(INST_LOC_RELOAD,0,INST_FLAGS_ONLINE);
= read_new_stuff();
= }
= if (strcmp(s,"RESETF")==0) {
= write_inst(INST_LOC_RESETF,0,INST_FLAGS_ONLINE);
= reset_files();
= }
= if (strcmp(s, "RESETQSCAN")==0) {
= prt(5,get_string(970));
= if (yn()) {
= write_inst(INST_LOC_RESETQSCAN,0,INST_FLAGS_ONLINE);
= memset(qsc, 0, syscfg.qscn_len);
= *qsc=999;
= memset(qsc_n,0xff,((max_dirs+31)/32)*4);
= memset(qsc_q,0xff,((max_subs+31)/32)*4);
= close_qscn();
= sprintf(s1,"%sUSER.QSC", syscfg.datadir);
= unlink(s1);
= for (i=0; i<=number_userrecs(); i++) {
= write_qscn(i, qsc, 1);
= }
= close_qscn();
= }
= }
= if (strcmp(s,"STAT")==0) {
= read_status();
= nl();
= outstr(get_string(18));
= pln(_stklen);
= outstr(get_string(19));
= npr("%dk\r\n", (int) (farcoreleft()/1024));
= outstr(get_string(20));
= npr("%d%%\r\n", cachestat());
= outstr(get_string(938));
= npr("%lu\r\n",status.qscanptr);
= nl();
= }
= }
=/**************************************************/
= if (cs()) {
= if (strcmp(s,"IVOTES")==0) {
= write_inst(INST_LOC_VOTE,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,11));
+ if (incom)
= ivotes();
+ else
+ wwivsys(IVOTE);
= }
= if (strcmp(s,"LOG")==0) {
= slname(date(), s1);
= print_local_file(s1,"");
= }
= if (strcmp(s,"NLOG")==0) {
= print_local_file("NET.LOG","");
= }
= if (strcmp(s,"PENDING")==0) {
= print_pending_list();
= }
= if (strcmp(s,"STATUS")==0) {
= prstatus();
= }
= if (strcmp(s,"TEDIT")==0) {
= write_inst(INST_LOC_TEDIT,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,12));
= text_edit();
= }
= if ((strcmp(s,"UEDIT")==0) || (strcmp(s,"UE")==0)) {
= write_inst(INST_LOC_UEDIT,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,10));
+ if (incom)
= uedit(usernum,0);
+ else
+ wwivsys(UEDIT);
= }
= if (strcmp(s,"VOTEPRINT")==0) {
= write_inst(INST_LOC_VOTEPRINT,0,INST_FLAGS_ONLINE);
= voteprint();
= }
= if (strcmp(s,"YLOG")==0) {
= read_status();
= print_local_file(status.log1,"");
= }
= if (strcmp(s,"ZLOG")==0) {
+ if (incom)
= zlog();
+ else
+ wwivsys(ZLOG);
= }
+ if (strcmp(s, "WWIVSYS")==0) {
+ if (!incom)
+ wwivsys(0);
+ }
= if ((strcmp(s,",")==0) && ((net_sysnum>0) || (net_num_max>1))) {
= nl();
= prt(2,get_string(23));
= ch=onek("Q012");
= switch(ch) {
= case '0': print_local_file(get_string(1027),""); break;
= case '1': print_local_file(get_string(1028),""); break;
= case '2': print_local_file(get_string(1029),""); break;
= }
= }
= if (strcmp(s,"/?")==0) {
= printmenu(5);
= }
= }
=/*************************************************/
Lower in function dlmainmenu:
= if ((strcmp(s,"DIREDIT")==0) || (strcmp(s,"DE")==0)) {
= sysoplog(get_stringx(1,3));
+ if (incom)
= dlboardedit();
+ else
+ wwivsys(DIREDIT);
= }
=
= if (strncmp(s,"DEBUG",5)==0) {
Lower in function getcaller:
= case 'B':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_BOARDEDIT,0,INST_FLAGS_NONE);
= holdphone(1);
* wwivsys(BOARDEDIT);
= cleanup_net();
= holdphone(0);
= }
= okskey=0;
= break;
= case 'C':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_CHAINEDIT,0,INST_FLAGS_NONE);
= holdphone(1);
* wwivsys(CHAINEDIT);
= holdphone(0);
= }
= okskey=0;
= break;
= case 'D':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_DIREDIT,0,INST_FLAGS_NONE);
= holdphone(1);
* wwivsys(DIREDIT);
= holdphone(0);
= }
= okskey=0;
= break;
= case 'W':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_TEDIT,0,INST_FLAGS_NONE);
= holdphone(1);
= text_edit();
= holdphone(0);
= }
= okskey=0;
= break;
= case 'F':
= if (ok_local()) {
= write_inst(INST_LOC_DOS,0,INST_FLAGS_NONE);
= holdphone(1);
= nl();
= pl(get_string(43));
= nl();
= setvect(save_dos,NULL);
= do_remote(getenv("COMSPEC"),0);
= setvect(save_dos, getvect(INT_REAL_DOS));
= out1ch(12);
= cleanup_net();
= holdphone(0);
= }
= break;
= case 'G':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_GFILEEDIT,0,INST_FLAGS_NONE);
= holdphone(1);
* wwivsys(GFILEEDITOR);
= holdphone(0);
= }
= okskey=0;
= break;
= case 'I':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_VOTEEDIT,0,INST_FLAGS_NONE);
= holdphone(1);
* wwivsys(IVOTE);
= holdphone(0);
= }
= okskey=0;
= break;
= case 'J':
= if (ok_local()) {
= holdphone(1);
= edit_confs();
= holdphone(0);
= }
= break;
= case 'K':
= if (ok_local()) {
= usernum=1;
= useron=1;
= holdphone(1);
= okskey=1;
= prt(2,get_string(44));
= input(s,50);
= load_workspace(s,0);
= send_email();
= okskey=0;
= useron=0;
= write_user(1,&thisuser);
= cleanup_net();
= holdphone(0);
= }
= break;
= case 'L':
= if (ok_local()) {
= read_status();
= slname(date(), s);
= print_local_file(s,status.log1);
= }
= break;
= case 'M':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_MAILR,0,INST_FLAGS_NONE);
= holdphone(1);
= mailr();
= holdphone(0);
= }
= okskey=0;
= break;
= case 'N':
= if (ok_local())
= print_local_file("NET.LOG","NETDAT*.LOG");
= break;
= case 'P':
= if (ok_local())
= print_pending_list();
= break;
= case 'Q':
= end_bbs(QUIT_LEVEL);
= break;
= case 27:
= outstr(get_string(1043));
= if (yn())
= end_bbs(QUIT_LEVEL);
= clrscrb();
= break;
= case 'R':
= if (ok_local()) {
= usernum=1;
= holdphone(1);
= okskey=1;
= readmail();
= okskey=0;
= write_user(1,&thisuser);
= cleanup_net();
= holdphone(0);
= }
= break;
= case 'S':
= if (ok_local()) {
= prstatus();
= getkey();
= }
= break;
= case 'T':
= if ((ok_local()) && (syscfg.terminal[0])) {
= if (syscfg.sysconfig & sysconfig_shrink_term)
= shrink_out(syscfg.terminal,0,0,0,1);
= else
= run_external(syscfg.terminal);
= imodem(1);
= imodem(0);
= }
= break;
= case 'U':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_UEDIT,0,INST_FLAGS_NONE);
= holdphone(1);
+ wwivsys(UEDIT);
= holdphone(0);
= }
= okskey=0;
= break;
= case 'E':
= if (ok_local()) {
= usernum=1;
= useron=1;
= holdphone(1);
= okskey=1;
= send_email();
= okskey=0;
= useron=0;
= write_user(1,&thisuser);
= cleanup_net();
= holdphone(0);
= }
= break;
= case 'X':
= for(i=0;i<50;i++) {
= if(xenviron[i]!=NULL)
= npr("\r\nxenv %d=%s",i,xenviron[i]);
= }
= npr("\r\nreal=%x, new=%x",INT_REAL_DOS,save_dos);
= nl();
= pausescr();
= break;
= case 'Y':
= if (ok_local()) {
= read_status();
= slname(date(), s);
= print_local_file(status.log1,s);
= }
= break;
= case 'Z':
= if (ok_local()) {
* wwivsys(ZLOG);
= nl();
= getkey();
= }
= break;
= case '/':
= if ((net_sysnum) && (ok_local()))
= force_callout(0);
= break;
= case '.':
= if ((net_sysnum) && (ok_local()))
= force_callout(1);
= break;
= case ',':
= if ((net_sysnum>0) || (net_num_max>1) && ok_local()) {
= nl();
= prt(2,get_string(23));
= ch=onek("Q012");
= switch (ch) {
= case '0':
= print_local_file(get_string(1027),"");
= break;
= case '1':
= print_local_file(get_string(1028),"");
= break;
= case '2':
= print_local_file(get_string(1029),"");
= break;
= }
= }
= break;
= case '`':
= if ((net_sysnum) && (ok_local())) {
= holdphone(1);
= print_net_listing(1);
= holdphone(0);
= }
= break;
= case 9:
= if (ok_local()) {
= holdphone(1);
= instance_edit();
= holdphone(0);
= }
= break;
+ case '@':
+ if (ok_local()) {
+ holdphone(1);
+ wwivsys(0);
+ holdphone(0);
+ }
+ break;
= }
= if (!incom && !lokb) {
Save BBS.C
───[Step 2b]───────────────────────────────────────────────────────────────────
Load BBS.C and do the following changes:
=#pragma hdrstop
=
=#define _DEFINE_GLOBALS_
=#include "vars.h"
=#include "subxtr.h"
+#include "wwivsys.h"
=
=#include <math.h>
And now in function mainmenu:
/**************************************************/
= if (so()) {
=#ifdef OPT_FAST_SEARCH
= if ((strcmp(s,"ALLOWEDIT")==0) || (strcmp(s,"AE")==0))
= edit_database();
=#endif
= if ((strcmp(s,"INSTEDIT")==0) || (strcmp(s,"IE")==0))
= instance_edit();
= if ((strcmp(s,"CONFEDIT")==0) || (strcmp(s,"JE")==0)) {
= write_inst(INST_LOC_CONFEDIT,0,INST_FLAGS_ONLINE);
= edit_confs();
= }
= if ((strcmp(s,"BOARDEDIT")==0) || (strcmp(s,"BE")==0)) {
= write_inst(INST_LOC_BOARDEDIT,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,2));
+ wwivsys(BOARDEDIT);
= }
= if ((strcmp(s,"CHAINEDIT")==0) || (strcmp(s,"CE")==0)) {
= write_inst(INST_LOC_CHAINEDIT,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,4));
+ wwivsys(CHAINEDIT);
= }
= if (strcmp(s, "CHAT")==0) {
= nl();
= pl(((*(char far *)0x00000417L ^= 0x10) & 0x10) ?
= get_string(21) :
= get_string(22));
= sysoplog(get_stringx(1,9));
= topscreen();
= }
= if ((strcmp(s,"CHUSER")==0) || (strcmp(s,"CU")==0)) {
= write_inst(INST_LOC_CHUSER,0,INST_FLAGS_ONLINE);
= chuser();
= }
= if (strcmp(s,"CLOUT")==0) {
= npr("\r\nNot Yet.\r\n");
= /* force_callout(2); */
= }
= if (strncmp(s,"DEBUG",5)==0) {
= if((s[5]) && (s[5]!=' '))
= debuglevel=s[5]-'0';
= else if(s[6])
= debuglevel=s[6]-'0';
= }
= if ((strcmp(s,"DIREDIT")==0) || (strcmp(s,"DE")==0)) {
= write_inst(INST_LOC_DIREDIT,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,3));
+ wwivsys(DIREDIT);
= }
= if (strcmp(s,"DOS")==0) {
= if (checkpw()) {
= write_inst(INST_LOC_DOS,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,6));
= shrink_out(getenv("COMSPEC"),1,1,1,0);
= topscreen();
= }
= }
= if ((strcmp(s,"EDIT")==0)) {
= if (checkpw()) {
= write_inst(INST_LOC_TEDIT,0,INST_FLAGS_ONLINE);
= nl();
= prt(2,get_string(7));
= input(s1,50);
= if (s1[0]) {
= if ((okansi()) && (thisuser.defed))
= external_edit(s1,"",thisuser.defed-1,500,".",s1,1);
= else
= tedit(s1);
= }
= }
= }
= if ((strcmp(s,"GFILEEDIT")==0) || (strcmp(s,"GE")==0)) {
= write_inst(INST_LOC_GFILEEDIT,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,5));
+ wwivsys(GFILEEDITOR);
= }
= if (strcmp(s,"LOAD")==0) {
= nl();
= prt(2,get_string(7));
= input(s1,50);
= if (s1[0]) {
= nl();
= prt(5,get_string(17));
= if (yn()) {
= nl();
= load_workspace(s1,0);
= } else {
= nl();
= load_workspace(s1,1);
= }
= }
= }
= if (strcmp(s,"MAILR")==0) {
= if (checkpw()) {
= write_inst(INST_LOC_MAILR,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,8));
= mailr();
= }
= }
= if ((strcmp(s,"REBOOT")==0) && (checkpw())) {
= write_inst(INST_LOC_REBOOT,0,INST_FLAGS_ONLINE);
= dtr(0);
= sysoplog(get_stringx(1,7));
= logoff();
= sl1(1,"");
= if (ok_modem_stuff)
= closeport();
= close_strfiles();
= wait(3.0);
= setvect(0xff,(void interrupt (*) ()) MK_FP(0xffff,0x0000));
= geninterrupt(0xff);
= }
= if (strcmp(s,"RELOAD")==0) {
= write_inst(INST_LOC_RELOAD,0,INST_FLAGS_ONLINE);
= read_new_stuff();
= }
= if (strcmp(s,"RESETF")==0) {
= write_inst(INST_LOC_RESETF,0,INST_FLAGS_ONLINE);
= reset_files();
= }
= if (strcmp(s, "RESETQSCAN")==0) {
= prt(5,get_string(970));
= if (yn()) {
= write_inst(INST_LOC_RESETQSCAN,0,INST_FLAGS_ONLINE);
= memset(qsc, 0, syscfg.qscn_len);
= *qsc=999;
= memset(qsc_n,0xff,((max_dirs+31)/32)*4);
= memset(qsc_q,0xff,((max_subs+31)/32)*4);
= close_qscn();
= sprintf(s1,"%sUSER.QSC", syscfg.datadir);
= unlink(s1);
= for (i=0; i<=number_userrecs(); i++) {
= write_qscn(i, qsc, 1);
= }
= close_qscn();
= }
= }
= if (strcmp(s,"STAT")==0) {
= read_status();
= nl();
= outstr(get_string(18));
= pln(_stklen);
= outstr(get_string(19));
= npr("%dk\r\n", (int) (farcoreleft()/1024));
= outstr(get_string(20));
= npr("%d%%\r\n", cachestat());
= outstr(get_string(938));
= npr("%lu\r\n",status.qscanptr);
= nl();
= }
= }
=/**************************************************/
= if (cs()) {
= if (strcmp(s,"IVOTES")==0) {
= write_inst(INST_LOC_VOTE,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,11));
+ wwivsys(IVOTE);
= }
= if (strcmp(s,"LOG")==0) {
= slname(date(), s1);
= print_local_file(s1,"");
= }
= if (strcmp(s,"NLOG")==0) {
= print_local_file("NET.LOG","");
= }
= if (strcmp(s,"PENDING")==0) {
= print_pending_list();
= }
= if (strcmp(s,"STATUS")==0) {
= prstatus();
= }
= if (strcmp(s,"TEDIT")==0) {
= write_inst(INST_LOC_TEDIT,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,12));
= text_edit();
= }
= if ((strcmp(s,"UEDIT")==0) || (strcmp(s,"UE")==0)) {
= write_inst(INST_LOC_UEDIT,0,INST_FLAGS_ONLINE);
= sysoplog(get_stringx(1,10));
+ wwivsys(UEDIT);
= }
= if (strcmp(s,"VOTEPRINT")==0) {
= write_inst(INST_LOC_VOTEPRINT,0,INST_FLAGS_ONLINE);
= voteprint();
= }
= if (strcmp(s,"YLOG")==0) {
= read_status();
= print_local_file(status.log1,"");
= }
= if (strcmp(s,"ZLOG")==0) {
+ wwivsys(ZLOG);
= }
+ if (strcmp(s, "WWIVSYS")==0) {
+ wwivsys(0);
+ }
= if ((strcmp(s,",")==0) && ((net_sysnum>0) || (net_num_max>1))) {
= nl();
= prt(2,get_string(23));
= ch=onek("Q012");
= switch(ch) {
= case '0': print_local_file(get_string(1027),""); break;
= case '1': print_local_file(get_string(1028),""); break;
= case '2': print_local_file(get_string(1029),""); break;
= }
= }
= if (strcmp(s,"/?")==0) {
= printmenu(5);
= }
= }
=/*************************************************/
Lower in function dlmainmenu:
= if ((strcmp(s,"DIREDIT")==0) || (strcmp(s,"DE")==0)) {
= sysoplog(get_stringx(1,3));
+ wwivsys(DIREDIT);
= }
=
= if (strncmp(s,"DEBUG",5)==0) {
Lower in function getcaller:
= case 'B':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_BOARDEDIT,0,INST_FLAGS_NONE);
= holdphone(1);
* wwivsys(BOARDEDIT);
= cleanup_net();
= holdphone(0);
= }
= okskey=0;
= break;
= case 'C':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_CHAINEDIT,0,INST_FLAGS_NONE);
= holdphone(1);
* wwivsys(CHAINEDIT);
= holdphone(0);
= }
= okskey=0;
= break;
= case 'D':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_DIREDIT,0,INST_FLAGS_NONE);
= holdphone(1);
* wwivsys(DIREDIT);
= holdphone(0);
= }
= okskey=0;
= break;
= case 'W':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_TEDIT,0,INST_FLAGS_NONE);
= holdphone(1);
= text_edit();
= holdphone(0);
= }
= okskey=0;
= break;
= case 'F':
= if (ok_local()) {
= write_inst(INST_LOC_DOS,0,INST_FLAGS_NONE);
= holdphone(1);
= nl();
= pl(get_string(43));
= nl();
= setvect(save_dos,NULL);
= do_remote(getenv("COMSPEC"),0);
= setvect(save_dos, getvect(INT_REAL_DOS));
= out1ch(12);
= cleanup_net();
= holdphone(0);
= }
= break;
= case 'G':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_GFILEEDIT,0,INST_FLAGS_NONE);
= holdphone(1);
* wwivsys(GFILEEDITOR);
= holdphone(0);
= }
= okskey=0;
= break;
= case 'I':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_VOTEEDIT,0,INST_FLAGS_NONE);
= holdphone(1);
* wwivsys(IVOTE);
= holdphone(0);
= }
= okskey=0;
= break;
= case 'J':
= if (ok_local()) {
= holdphone(1);
= edit_confs();
= holdphone(0);
= }
= break;
= case 'K':
= if (ok_local()) {
= usernum=1;
= useron=1;
= holdphone(1);
= okskey=1;
= prt(2,get_string(44));
= input(s,50);
= load_workspace(s,0);
= send_email();
= okskey=0;
= useron=0;
= write_user(1,&thisuser);
= cleanup_net();
= holdphone(0);
= }
= break;
= case 'L':
= if (ok_local()) {
= read_status();
= slname(date(), s);
= print_local_file(s,status.log1);
= }
= break;
= case 'M':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_MAILR,0,INST_FLAGS_NONE);
= holdphone(1);
= mailr();
= holdphone(0);
= }
= okskey=0;
= break;
= case 'N':
= if (ok_local())
= print_local_file("NET.LOG","NETDAT*.LOG");
= break;
= case 'P':
= if (ok_local())
= print_pending_list();
= break;
= case 'Q':
= end_bbs(QUIT_LEVEL);
= break;
= case 27:
= outstr(get_string(1043));
= if (yn())
= end_bbs(QUIT_LEVEL);
= clrscrb();
= break;
= case 'R':
= if (ok_local()) {
= usernum=1;
= holdphone(1);
= okskey=1;
= readmail();
= okskey=0;
= write_user(1,&thisuser);
= cleanup_net();
= holdphone(0);
= }
= break;
= case 'S':
= if (ok_local()) {
= prstatus();
= getkey();
= }
= break;
= case 'T':
= if ((ok_local()) && (syscfg.terminal[0])) {
= if (syscfg.sysconfig & sysconfig_shrink_term)
= shrink_out(syscfg.terminal,0,0,0,1);
= else
= run_external(syscfg.terminal);
= imodem(1);
= imodem(0);
= }
= break;
= case 'U':
= okskey=1;
= if (ok_local()) {
= write_inst(INST_LOC_UEDIT,0,INST_FLAGS_NONE);
= holdphone(1);
+ wwivsys(UEDIT);
= holdphone(0);
= }
= okskey=0;
= break;
= case 'E':
= if (ok_local()) {
= usernum=1;
= useron=1;
= holdphone(1);
= okskey=1;
= send_email();
= okskey=0;
= useron=0;
= write_user(1,&thisuser);
= cleanup_net();
= holdphone(0);
= }
= break;
= case 'X':
= for(i=0;i<50;i++) {
= if(xenviron[i]!=NULL)
= npr("\r\nxenv %d=%s",i,xenviron[i]);
= }
= npr("\r\nreal=%x, new=%x",INT_REAL_DOS,save_dos);
= nl();
= pausescr();
= break;
= case 'Y':
= if (ok_local()) {
= read_status();
= slname(date(), s);
= print_local_file(status.log1,s);
= }
= break;
= case 'Z':
= if (ok_local()) {
* wwivsys(ZLOG);
= nl();
= getkey();
= }
= break;
= case '/':
= if ((net_sysnum) && (ok_local()))
= force_callout(0);
= break;
= case '.':
= if ((net_sysnum) && (ok_local()))
= force_callout(1);
= break;
= case ',':
= if ((net_sysnum>0) || (net_num_max>1) && ok_local()) {
= nl();
= prt(2,get_string(23));
= ch=onek("Q012");
= switch (ch) {
= case '0':
= print_local_file(get_string(1027),"");
= break;
= case '1':
= print_local_file(get_string(1028),"");
= break;
= case '2':
= print_local_file(get_string(1029),"");
= break;
= }
= }
= break;
= case '`':
= if ((net_sysnum) && (ok_local())) {
= holdphone(1);
= print_net_listing(1);
= holdphone(0);
= }
= break;
= case 9:
= if (ok_local()) {
= holdphone(1);
= instance_edit();
= holdphone(0);
= }
= break;
+ case '@':
+ if (ok_local()) {
+ holdphone(1);
+ wwivsys(0);
+ holdphone(0);
+ }
+ break;
= }
= if (!incom && !lokb) {
───[Step 3]────────────────────────────────────────────────────────────────────
Load BBSOVL1.C and do the following addition:
=#include "vars.h"
=
=#pragma hdrstop
=
=#include "subxtr.h"
+#include "wwivsys.h"
=
=#define FRAME 7
Same here, step A is if you keep internal functions, step B is if you wish to
remove them.
───[Step 3a]───────────────────────────────────────────────────────────────────
Load BBSOVL1.C and replace function edit_confs:
void edit_confs(void)
{
char ch;
if (!checkpw())
return;
nln(2);
pl(get_string(1023));
nl();
pl(get_string(1024));
pl(get_string(1025));
nl();
outstr(get_string(1026));
ch=onek("12Q");
switch (ch) {
case '1':
if (incom)
conf_edit(CONF_SUBS);
else
wwivsys(CONFBOARD);
break;
case '2':
if (incom)
conf_edit(CONF_DIRS);
else
wwivsys(CONFDIR);
break;
default:
break;
}
}
Save BBSOVL1.C
───[Step 3b]───────────────────────────────────────────────────────────────────
Load BBSOVL1.C and replace function edit_confs:
void edit_confs(void)
{
char ch;
if (!checkpw())
return;
nln(2);
pl(get_string(1023));
nl();
pl(get_string(1024));
pl(get_string(1025));
nl();
outstr(get_string(1026));
ch=onek("12Q");
switch (ch) {
case '1':
wwivsys(CONFBOARD);
break;
case '2':
wwivsys(CONFDIR);
break;
default:
break;
}
}
Save BBSOVL1.C
───[Step 4]────────────────────────────────────────────────────────────────────
=#include "vars.h"
=
=#pragma hdrstop
=
+#include "wwivsys.h"
Same here, step A is if you keep internal functions, step B is if you wish to
remove them.
───[Step 4a]───────────────────────────────────────────────────────────────────
Load READMAIL.C and edit function readmail:
= valuser(m.fromuser);
* else if (ch=='U') {
+ if (incom)
= uedit(m.fromuser,0);
+ else
+ wwivsys(UEDIT);
* } else {
+ if (incom)
= uedit(m.fromuser,3);
+ else
+ wwivsys(UEDIT);
+ }
= else if (cs()) {
= nl();
= pl(get_string(722));
Save READMAIL.C
───[Step 4b]───────────────────────────────────────────────────────────────────
Load READMAIL.C and edit function readmail:
= valuser(m.fromuser);
* else if (ch=='U') {
+ wwivsys(UEDIT);
* } else {
+ wwivsys(UEDIT);
+ }
= else if (cs()) {
= nl();
= pl(get_string(722));
Save READMAIL.C
───[Step 5]────────────────────────────────────────────────────────────────────
If you have selected to remove internal function, here is a list of the
functions you can now delete. Simply search for those functions and delete
them entirely. DO NOT remove the other functions in the file, if there is no
more functions in the C file, you can remove it from the makefile if you wish.
/* File: SUBEDIT.C */
void boarddata(int n, char *s);
void showsubs(void);
void modify_sub(int n);
void swap_subs(int sub1, int sub2);
void insert_sub(int n);
void delete_sub(int n);
void boardedit(void);
/* File: CHNEDIT.C */
void chaindata(int n, char *s);
void showchains(void);
void modify_chain(int n);
void insert_chain(int n);
void delete_chain(int n);
void chainedit(void);
/* File: DIREDIT.C */
void dirdata(int n, char *s);
void showdirs(void);
void modify_dir(int n);
void swap_dirs(int dir1, int dir2);
void insert_dir(int n);
void delete_dir(int n);
void dlboardedit(void);
/* File: GFLEDIT.C */
void gfiledata(int n, char *s);
void showsec(void);
int exist_dir(char *s);
void modify_sec(int n);
void insert_sec(int n);
void delete_sec(int n);
void gfileedit(void);
/* File: VOTEEDIT.C */
void print_quests(void);
void set_question(int ii);
void ivotes(void);
/* File: UEDIT.C */
void print_data(int un, userrec *u, int lng, int cls);
int matchuser(int un);
int match_user(userrec *u);
void changeopt(void);
void uedit(int usern, int other);
/* File: SYSOPF.C */
void zlog(void);
───[Step 6]────────────────────────────────────────────────────────────────────
Decode WWIVSYS.H and place it in your source directory
section 1 of 1 of file wwivsys.h < uuencode 5.32 by R.E.M. >
begin 644 wwivsys.h
M+RHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ
M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*@T*#0H@("`@("`@
M("`@("`@("`@("!75TE6<WES+D@@+2!&=6YC=&EO;B!(86YD96QI;F<@3&EB
M<F%I<GD-"B`@("`@("`@("`@("`@("`@*$,I(#$Y.30M,3DY-2!&<F5N8V@@
M36]D($1I=FES:6]N(%-O9G1W87)E#0H-"BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ
M*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ*BHJ
M*BHJ*BHJ*BHJ*BHJ*B\-"@T*#0HC9&5F:6YE(%I,3T<@("`@("`@("`Q("`@
M("`@("`@("`@("`@("`@("`@("\O($%C=&EV:71Y($QO9PT*(V1E9FEN92!!
M551/5D%,("`@("`@,B`@("`@("`@("`@("`@("`@("`@("`O+R!!=71O(%9A
M;&ED871I;VX@2V5Y<PT*(V1E9FEN92!"0E-)3D9/("`@("`@,R`@("`@("`@
M("`@("`@("`@("`@("`O+R!"0E,@26YF;W)M871I;VYS#0HC9&5F:6YE($-/
M3D9$25(@("`@("`T("`@("`@("`@("`@("`@("`@("`@("\O($1I<F5C=&]R
M>2!#;VYF97)E;F-E($5D:71O<@T*(V1E9FEN92!$149204<@("`@("`@-2`@
M("`@("`@("`@("`@("`@("`@("`O+R!3=6(@0V]M<')E<W-O<@T*(V1E9FEN
M92!$25)%1$E4("`@("`@-B`@("`@("`@("`@("`@("`@("`@("`O+R!$:7)E
M8W1O<GD@161I=&]R#0HC9&5F:6YE($-(04E.141)5"`@("`W("`@("`@("`@
M("`@("`@("`@("`@("\O($-H86EN<R!%9&ET;W(-"B-D969I;F4@1E-%1"`@
M("`@("`@(#@@("`@("`@("`@("`@("`@("`@("`@+R\@1E-%1"!%9&ET;W(-
M"B-D969I;F4@15A415).04P@("`@(#D@("`@("`@("`@("`@("`@("`@("`@
M+R\@17AT97)N86P@4')O9W)A;7,-"B-D969I;F4@1DE,145$250@("`@,3`@
M("`@("`@("`@("`@("`@("`@("`@+R\@1FEL92!%9&ET;W(-"B-D969I;F4@
M1T9)3$53("`@("`@,3$@("`@("`@("`@("`@("`@("`@("`@+R\@1V9I;&4@
M161I=&]R#0HC9&5F:6YE($=&24Q%141)5$]2(#$R("`@("`@("`@("`@("`@
M("`@("`@("\O($=F:6QE(%-E8W1I;VX@161I=&]R#0HC9&5F:6YE($E.4U1!
M3D-%("`@(#$S("`@("`@("`@("`@("`@("`@("`@("\O($EN<W1A;F-E($5D
M:71O<@T*(V1E9FEN92!,04Y'54%'12`@("`Q-"`@("`@("`@("`@("`@("`@
M("`@("`O+R!,86YG=6%G92!%9&ET;W(-"B-D969I;F4@34]$14T@("`@("`@
M,34@("`@("`@("`@("`@("`@("`@("`@+R\@36]D96T@161I=&]R#0HC9&5F
M:6YE($Y%5$5$251/4B`@(#$V("`@("`@("`@("`@("`@("`@("`@("\O($YE
M="!%9&ET;W(-"B-D969I;F4@4$%42"`@("`@("`@,3<@("`@("`@("`@("`@
M("`@("`@("`@+R\@4&%T:"!%9&ET;W(-"B-D969I;F4@4%)/5$]#3TP@("`@
M,3@@("`@("`@("`@("`@("`@("`@("`@+R\@4')O=&]C;VP@161I=&]R#0HC
M9&5F:6YE(%-,4D5#141)5"`@(#$Y("`@("`@("`@("`@("`@("`@("`@("\O
M(%-E8W5R:71Y($QE=F5L($5D:71O<@T*(V1E9FEN92!#3TY&24<@("`@("`R
M,"`@("`@("`@("`@("`@("`@("`@("`O+R!75TE6<WES($-O;F9I9PT*(V1E
M9FEN92!34TU%1$E43U(@("`R,2`@("`@("`@("`@("`@("`@("`@("`O+R!3
M4TT@161I=&]R#0HC9&5F:6YE(%-4051)4U1)0U,@(#(R("`@("`@("`@("`@
M("`@("`@("`@("\O(%-T871I<W1I8W,-"B-D969I;F4@4U1224Y'141)5"`@
M,C,@("`@("`@("`@("`@("`@("`@("`@+R\@4W1R:6YG($5D:71O<@T*(V1E
M9FEN92!#3TY&0D]!4D0@("`R-"`@("`@("`@("`@("`@("`@("`@("`O+R!3
M=6(@0V]N9F5R96YC92!%9&ET;W(-"B-D969I;F4@0D]!4D1%1$E4("`@,C4@
M("`@("`@("`@("`@("`@("`@("`@+R\@0F]A<F0@161I=&]R#0HC9&5F:6YE
M(%-50DQ)4U0@("`@(#(V("`@("`@("`@("`@("`@("`@("`@("\O(%-U8G,@
M3&ES="!396QE8W1O<@T*(V1E9FEN92!4151225@@("`@("`R-R`@("`@("`@
M("`@("`@("`@("`@("`O+R!4971R:7@-"B-D969I;F4@545$250@("`@("`@
M,C@@("`@("`@("`@("`@("`@("`@("`@+R\@57-E<B!%9&ET;W(-"B-D969I
M;F4@259/5$4@("`@("`@,CD@("`@("`@("`@("`@("`@("`@("`@+R\@5F]T
M92!%9&ET;W(-"B-D969I;F4@24Y)4U=)5$-(("`@,S`@("`@("`@("`@("`@
M("`@("`@("`@+R\@26YI($9L86=S($5D:71O<@T*(V1E9FEN92!)3DE%1$E4
M3U(@("`S,2`@("`@("`@("`@("`@("`@("`@("`O+R!);FD@161I=&]R#0HC
M9&5F:6YE($-!3$Q/550@("`@(#,R("`@("`@("`@("`@("`@("`@("`@("\O
1($-A;&QO=70@161I=&]R#0H@
`
end
sum -r/size 48906/3214 section (from "begin" to "end")
sum -r/size 18056/2312 entire input file
───[Step 7]────────────────────────────────────────────────────────────────────
That's it, simply do a MAKE FCNS and recompile the entire system.
To use WWIVsys command internally, it is quite simple, simply use:
wwivsys(CODENAME);
The list of the code names is available in WWIVSYS.H or by doing SYS -?.
Custumize them as you wish.
If you are running WWIV v4.24, put the following line at the end of the file:
#define WWIV424
Nothing to do if you use WWIV v4.23.
French Proverb: La fortune vient en dormant.
For comments, bug report and suggestion, e-mail at the following address:
Spotnick 1@20397.WWIVnet Dark Shadow 1@20305.WWIVnet
SysOp of Alternative Worlds SysOp of French Mod Division HQ
=> French Mod Division Support Sub <=
SubType: ESE
Host: @20397 (WWIVnet) / @5497 Others
───[EOF]──────────────────────────────────────────────────────────────────────