diff --git a/ChangeLog b/ChangeLog index 691f26bc..20ae0b8c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,16 @@ +v1.0.7.7 05-Jun-2018 - Andrew Leary + + 1. Added support for creating the DORINFO1.DEF dropfile, in + addition to DOOR.SYS and DOOR32.SYS. + v1.0.7.6 06-Mar-2018 - Andrew Leary 1. Fixed bug that caused netmails posted by MBMSG post to have a destination address of 0:0/0. 2. Updated copyright notices to 2018. + + 3. Removed old .cvsignore files from the source tree. v1.0.7.5 31-Dec-2017 - Andrew Leary/Vince Coen diff --git a/configure b/configure index 2b28b607..93c8afb4 100755 --- a/configure +++ b/configure @@ -2309,7 +2309,7 @@ SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbutils mbnntp mbtask mbsetup unix lang PACKAGE="mbsebbs" MAJOR="1" MINOR="0" -REVISION="7.6" +REVISION="7.7" VERSION="$MAJOR.$MINOR.$REVISION" COPYRIGHT="Copyright (C) 1997-2018 MBSE Development Team, All Rights Reserved" SHORTRIGHT="Copyright (C) 1997-2018 MBSE DevTm" diff --git a/configure.ac b/configure.ac index 9ecb5d11..73e1b0e0 100644 --- a/configure.ac +++ b/configure.ac @@ -12,7 +12,7 @@ AC_SUBST(SUBDIRS) PACKAGE="mbsebbs" MAJOR="1" MINOR="0" -REVISION="7.6" +REVISION="7.7" VERSION="$MAJOR.$MINOR.$REVISION" COPYRIGHT="Copyright (C) 1997-2018 MBSE Development Team, All Rights Reserved" SHORTRIGHT="Copyright (C) 1997-2018 MBSE DevTm" diff --git a/mbsebbs/bye.c b/mbsebbs/bye.c index 3ac375e9..5688ee4f 100644 --- a/mbsebbs/bye.c +++ b/mbsebbs/bye.c @@ -171,6 +171,9 @@ void Good_Bye(int onsig) snprintf(temp, PATH_MAX, "%s/%s/door32.sys", CFG.bbs_usersdir, exitinfo.Name); unlink(temp); + + snprintf(temp, PATH_MAX, "%s/%s/dorinfo1.def", CFG.bbs_usersdir, exitinfo.Name); + unlink(temp); snprintf(temp, PATH_MAX, "%s/%s/exitinfo", CFG.bbs_usersdir, exitinfo.Name); unlink(temp); diff --git a/mbsebbs/door.c b/mbsebbs/door.c index 7864be39..b8fb3732 100644 --- a/mbsebbs/door.c +++ b/mbsebbs/door.c @@ -101,10 +101,12 @@ void ExtDoor(char *Program, int NoDoorsys, int Y2Kdoorsys, int Comport, int NoSu { char *String, *String1; int i, rc, Start; - char *temp1, buf[128]; + char *temp1, *temp2, *temp3, buf[128]; FILE *fp; temp1 = calloc(PATH_MAX, sizeof(char)); + temp2 = calloc(PATH_MAX, sizeof(char)); + temp3 = calloc(PATH_MAX, sizeof(char)); String = calloc(81, sizeof(char)); Start = TRUE; @@ -295,7 +297,56 @@ void ExtDoor(char *Program, int NoDoorsys, int Y2Kdoorsys, int Comport, int NoSu fclose(fp); } } - + + /* + * Always remove the old dorinfo1.def first. + */ + snprintf(temp1, PATH_MAX, "%s/%s/dorinfo1.def", CFG.bbs_usersdir, exitinfo.Name); + unlink(temp1); + + /* + * Write dorinfo1.def in users homedirectory. + */ + if (!NoDoorsys) { + if ((fp = fopen(temp1, "w+")) == NULL) { + WriteError("$Can't create %s", temp1); + } else { + fprintf(fp, "%s\r\n", tu(CFG.bbs_name)); /* System name */ + snprintf(temp2, 36, "%s", CFG.sysop_name); + strtok(temp2, " "); /* Split sysop name at first space. */ + temp3 = strtok(NULL, " "); + if (temp3 == NULL) { /* Single word name */ + fprintf(fp, "%s\r\n", tu(temp2)); + fprintf(fp, "\r\n"); + } else { + fprintf(fp, "%s\r\n", tu(temp2)); + fprintf(fp, "%s\r\n", tu(temp3)); + } + if (Comport) { + fprintf(fp, "COM1\r\n"); + fprintf(fp, "19200 BAUD,N,8,1\r\n"); + } else { + fprintf(fp, "COM0\r\n"); + fprintf(fp, "0 BAUD,N,8,1\r\n"); + } + fprintf(fp, "0\r\n"); + snprintf(temp2, 36, "%s", exitinfo.sUserName); + strtok(temp2, " "); + temp3 = strtok(NULL, " "); + if (temp3 == NULL) { + fprintf(fp, "%s\r\n", tu(temp2)); + fprintf(fp, "\r\n"); + } else { + fprintf(fp, "%s\r\n", tu(temp2)); + fprintf(fp, "%s\r\n", tu(temp3)); + } + fprintf(fp, "%s\r\n", tu(exitinfo.sLocation)); + fprintf(fp, "1\r\n"); + fprintf(fp, "%d\r\n", exitinfo.Security.level); + fprintf(fp, "%d\r\n", exitinfo.iTimeLeft); + fclose(fp); + } + } clear(); PUTSTR((char *)"Loading, please wait ..."); Enter(2); diff --git a/script/bbsdoor.sh b/script/bbsdoor.sh index 9ae833a1..ce94cf55 100644 --- a/script/bbsdoor.sh +++ b/script/bbsdoor.sh @@ -13,8 +13,9 @@ DOSDRIVE=/opt/mbse/var/dosemu/c if [ "$1" != "" ]; then if [ "$2" != "" ]; then mkdir -p $DOSDRIVE/doors/node$2 >/dev/null 2>&1 - # Copy door.sys to dos partition + # Copy door.sys and dorinfo1.def to dos partition cat ~/door.sys >$DOSDRIVE/doors/node$2/door.sys + cat ~/dorinfo1.def >$DOSDRIVE/doors/node$2/dorinfo1.def # Create .dosemu directory for the user. if [ ! -d $HOME/.dosemu ]; then mkdir $HOME/.dosemu diff --git a/script/rundoor.sh b/script/rundoor.sh index d90f62bb..63464302 100644 --- a/script/rundoor.sh +++ b/script/rundoor.sh @@ -24,9 +24,10 @@ DOSDRIVE=${MBSE_ROOT}/var/dosemu/c # Prepare users home directory and node directory if [ "$1" != "" ]; then mkdir -p $DOSDRIVE/doors/node$1 >/dev/null 2>&1 - # Copy door*.sys to dos partition + # Copy door*.sys and dorinfo1.def to dos partition cat ~/door.sys >$DOSDRIVE/doors/node$1/door.sys cat ~/door32.sys >$DOSDRIVE/doors/node$1/door32.sys + cat ~/dorinfo1.def >$DOSDRIVE/doors/node$1/dorinfo1.def # Create .dosemu directory for the user. if [ ! -d $HOME/.dosemu ]; then mkdir $HOME/.dosemu