Several updates for IsDoing information
This commit is contained in:
parent
b314568630
commit
919b9ed3ba
18
ChangeLog
18
ChangeLog
@ -23,11 +23,29 @@ v0.35.05 19-Oct-2002
|
|||||||
|
|
||||||
mbsebbs:
|
mbsebbs:
|
||||||
Email posted at the bbs was not signed with the signature.
|
Email posted at the bbs was not signed with the signature.
|
||||||
|
Fixed the bug where the filearea number was lost. This was
|
||||||
|
caused when a user was logged off before the login procedure
|
||||||
|
was complete.
|
||||||
|
If user was displaying the whoson list and there was no
|
||||||
|
matching isdoing action then browsing will be displayed
|
||||||
|
instead of system error.
|
||||||
|
Sends Unix name instead of long name to mbtask.
|
||||||
|
During login the OS and CPU type is displayed.
|
||||||
|
|
||||||
|
mbnewusr:
|
||||||
|
Sends Unix name instead of long name to mbtask.
|
||||||
|
During login the OS and CPU type is displayed.
|
||||||
|
|
||||||
|
mbmon:
|
||||||
|
In screen 1, username field decreased ro 8 characters and the
|
||||||
|
doing field is increased to 26 characters.
|
||||||
|
|
||||||
mbcico:
|
mbcico:
|
||||||
Fixed crash with incoming YooHoo session with bad password.
|
Fixed crash with incoming YooHoo session with bad password.
|
||||||
Still used the phone override fields for hostname override
|
Still used the phone override fields for hostname override
|
||||||
with internet calls if there was something filled in.
|
with internet calls if there was something filled in.
|
||||||
|
For inbound sessions if the remote is listed in some nodelist,
|
||||||
|
mbtask is updated with the sysop name and location.
|
||||||
|
|
||||||
mbout:
|
mbout:
|
||||||
The stat command now also shows what is on hold for a node
|
The stat command now also shows what is on hold for a node
|
||||||
|
@ -69,6 +69,8 @@ static int binkp_batch(file_list *, int);
|
|||||||
|
|
||||||
extern char *ttystat[];
|
extern char *ttystat[];
|
||||||
extern int Loaded;
|
extern int Loaded;
|
||||||
|
extern pid_t mypid;
|
||||||
|
|
||||||
|
|
||||||
extern unsigned long sentbytes;
|
extern unsigned long sentbytes;
|
||||||
extern unsigned long rcvdbytes;
|
extern unsigned long rcvdbytes;
|
||||||
@ -412,7 +414,7 @@ SM_STATE(waitconn)
|
|||||||
|
|
||||||
Loaded = FALSE;
|
Loaded = FALSE;
|
||||||
Syslog('+', "Start binkp session with %s", ascfnode(remote->addr, 0x1f));
|
Syslog('+', "Start binkp session with %s", ascfnode(remote->addr, 0x1f));
|
||||||
IsDoing("Connect binkp %s", ascfnode(remote->addr, 0x1f));
|
IsDoing("Connect binkp %s", ascfnode(remote->addr, 0xf));
|
||||||
b_banner(TRUE);
|
b_banner(TRUE);
|
||||||
binkp_send_control(MM_NUL,"OPT MB CRC");
|
binkp_send_control(MM_NUL,"OPT MB CRC");
|
||||||
|
|
||||||
@ -660,6 +662,7 @@ SM_STATE(waitaddr)
|
|||||||
if (inbound)
|
if (inbound)
|
||||||
free(inbound);
|
free(inbound);
|
||||||
inbound = xstrcpy(CFG.inbound);
|
inbound = xstrcpy(CFG.inbound);
|
||||||
|
UserCity(mypid, nlent->sysop, nlent->location);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -820,7 +823,7 @@ int binkp_batch(file_list *to_send, int role)
|
|||||||
|
|
||||||
batchnr++;
|
batchnr++;
|
||||||
Syslog('+', "Binkp: starting batch %d", batchnr);
|
Syslog('+', "Binkp: starting batch %d", batchnr);
|
||||||
IsDoing("Binkp %s %s", (role == 1)?"out":"inb", ascfnode(remote->addr, 0x1f));
|
IsDoing("Binkp %s %s", (role == 1)?"out":"inb", ascfnode(remote->addr, 0xf));
|
||||||
txbuf = calloc(MAX_BLKSIZE + 3, sizeof(unsigned char));
|
txbuf = calloc(MAX_BLKSIZE + 3, sizeof(unsigned char));
|
||||||
rxbuf = calloc(MAX_BLKSIZE + 3, sizeof(unsigned char));
|
rxbuf = calloc(MAX_BLKSIZE + 3, sizeof(unsigned char));
|
||||||
rname = calloc(512, sizeof(char));
|
rname = calloc(512, sizeof(char));
|
||||||
|
@ -58,6 +58,7 @@ static char *intro;
|
|||||||
static int caller;
|
static int caller;
|
||||||
|
|
||||||
extern int most_debug;
|
extern int most_debug;
|
||||||
|
extern pid_t mypid;
|
||||||
|
|
||||||
int emsi_local_lcodes;
|
int emsi_local_lcodes;
|
||||||
int emsi_remote_lcodes;
|
int emsi_remote_lcodes;
|
||||||
@ -137,6 +138,7 @@ int rx_emsi(char *data)
|
|||||||
if (inbound)
|
if (inbound)
|
||||||
free(inbound);
|
free(inbound);
|
||||||
inbound = xstrcpy(CFG.inbound);
|
inbound = xstrcpy(CFG.inbound);
|
||||||
|
UserCity(mypid, nlent->sysop, nlent->location);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (nlent)
|
if (nlent)
|
||||||
|
213
mbcico/ftsc.c
213
mbcico/ftsc.c
@ -59,6 +59,8 @@ static int txftsc(void);
|
|||||||
static int recvfiles(void);
|
static int recvfiles(void);
|
||||||
static file_list *tosend;
|
static file_list *tosend;
|
||||||
extern int Loaded;
|
extern int Loaded;
|
||||||
|
extern pid_t mypid;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int rx_ftsc(void)
|
int rx_ftsc(void)
|
||||||
@ -365,131 +367,134 @@ SM_RETURN
|
|||||||
|
|
||||||
SM_DECL(recvfiles,(char *)"recvfiles")
|
SM_DECL(recvfiles,(char *)"recvfiles")
|
||||||
SM_STATES
|
SM_STATES
|
||||||
recv_packet,
|
recv_packet,
|
||||||
scan_packet,
|
scan_packet,
|
||||||
recv_file
|
recv_file
|
||||||
SM_NAMES
|
SM_NAMES
|
||||||
(char *)"recv_packet",
|
(char *)"recv_packet",
|
||||||
(char *)"scan_packet",
|
(char *)"scan_packet",
|
||||||
(char *)"recv_file"
|
(char *)"recv_file"
|
||||||
SM_EDECL
|
SM_EDECL
|
||||||
int rc=0;
|
int rc=0;
|
||||||
char recvpktname[16];
|
char recvpktname[16];
|
||||||
char *fpath;
|
char *fpath;
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
faddr f,t;
|
faddr f, t;
|
||||||
fa_list **tmpl;
|
fa_list **tmpl;
|
||||||
|
|
||||||
SM_START(recv_packet)
|
SM_START(recv_packet)
|
||||||
Loaded = FALSE;
|
Loaded = FALSE;
|
||||||
|
|
||||||
SM_STATE(recv_packet)
|
SM_STATE(recv_packet)
|
||||||
|
|
||||||
sprintf(recvpktname,"%08lx.pkt",(unsigned long)sequencer());
|
sprintf(recvpktname,"%08lx.pkt",(unsigned long)sequencer());
|
||||||
if ((rc = xmrecv(recvpktname)) == 1) {
|
if ((rc = xmrecv(recvpktname)) == 1) {
|
||||||
SM_SUCCESS;
|
SM_SUCCESS;
|
||||||
} else if (rc == 0) {
|
} else if (rc == 0) {
|
||||||
if (master) {
|
if (master) {
|
||||||
SM_PROCEED(recv_file);
|
SM_PROCEED(recv_file);
|
||||||
} else {
|
|
||||||
SM_PROCEED(scan_packet);
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
SM_ERROR;
|
SM_PROCEED(scan_packet);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
SM_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
SM_STATE(scan_packet)
|
SM_STATE(scan_packet)
|
||||||
|
|
||||||
fpath = xstrcpy(inbound);
|
fpath = xstrcpy(inbound);
|
||||||
fpath = xstrcat(fpath,(char *)"/");
|
fpath = xstrcat(fpath,(char *)"/");
|
||||||
fpath = xstrcat(fpath,recvpktname);
|
fpath = xstrcat(fpath,recvpktname);
|
||||||
fp = fopen(fpath,"r");
|
fp = fopen(fpath,"r");
|
||||||
free(fpath);
|
free(fpath);
|
||||||
if (fp == NULL) {
|
if (fp == NULL) {
|
||||||
WriteError("$cannot open received packet");
|
WriteError("$cannot open received packet");
|
||||||
|
SM_ERROR;
|
||||||
|
}
|
||||||
|
switch (getheader(&f , &t, fp, recvpktname)) {
|
||||||
|
case 3: Syslog('+', "remote mistook us for %s",ascfnode(&t,0x1f));
|
||||||
|
fclose(fp);
|
||||||
SM_ERROR;
|
SM_ERROR;
|
||||||
}
|
case 0: Syslog('+', "accepting session");
|
||||||
switch (getheader(&f , &t, fp, recvpktname)) {
|
fclose(fp);
|
||||||
case 3: Syslog('+', "remote mistook us for %s",ascfnode(&t,0x1f));
|
for (tmpl=&remote;*tmpl;tmpl=&((*tmpl)->next));
|
||||||
fclose(fp);
|
(*tmpl)=(fa_list*)malloc(sizeof(fa_list));
|
||||||
SM_ERROR;
|
(*tmpl)->next=NULL;
|
||||||
case 0: Syslog('+', "accepting session");
|
(*tmpl)->addr=(faddr*)malloc(sizeof(faddr));
|
||||||
fclose(fp);
|
(*tmpl)->addr->zone=f.zone;
|
||||||
for (tmpl=&remote;*tmpl;tmpl=&((*tmpl)->next));
|
(*tmpl)->addr->net=f.net;
|
||||||
(*tmpl)=(fa_list*)malloc(sizeof(fa_list));
|
(*tmpl)->addr->node=f.node;
|
||||||
(*tmpl)->next=NULL;
|
(*tmpl)->addr->point=f.point;
|
||||||
(*tmpl)->addr=(faddr*)malloc(sizeof(faddr));
|
(*tmpl)->addr->name=NULL;
|
||||||
(*tmpl)->addr->zone=f.zone;
|
(*tmpl)->addr->domain=NULL;
|
||||||
(*tmpl)->addr->net=f.net;
|
for (tmpl=&remote;*tmpl;tmpl=&((*tmpl)->next)) {
|
||||||
(*tmpl)->addr->node=f.node;
|
(void)nodelock((*tmpl)->addr);
|
||||||
(*tmpl)->addr->point=f.point;
|
/* try lock all remotes, ignore locking result */
|
||||||
(*tmpl)->addr->name=NULL;
|
if (!Loaded)
|
||||||
(*tmpl)->addr->domain=NULL;
|
if (noderecord((*tmpl)->addr))
|
||||||
for (tmpl=&remote;*tmpl;tmpl=&((*tmpl)->next)) {
|
Loaded = TRUE;
|
||||||
(void)nodelock((*tmpl)->addr);
|
}
|
||||||
/* try lock all remotes, ignore locking result */
|
|
||||||
if (!Loaded)
|
|
||||||
if (noderecord((*tmpl)->addr))
|
|
||||||
Loaded = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
history.aka.zone = remote->addr->zone;
|
history.aka.zone = remote->addr->zone;
|
||||||
history.aka.net = remote->addr->net;
|
history.aka.net = remote->addr->net;
|
||||||
history.aka.node = remote->addr->node;
|
history.aka.node = remote->addr->node;
|
||||||
history.aka.point = remote->addr->point;
|
history.aka.point = remote->addr->point;
|
||||||
if (remote->addr->domain && strlen(remote->addr->domain))
|
if (remote->addr->domain && strlen(remote->addr->domain))
|
||||||
sprintf(history.aka.domain, "%s", remote->addr->domain);
|
sprintf(history.aka.domain, "%s", remote->addr->domain);
|
||||||
|
|
||||||
if (((nlent=getnlent(remote->addr))) && (nlent->pflag != NL_DUMMY)) {
|
if (((nlent=getnlent(remote->addr))) && (nlent->pflag != NL_DUMMY)) {
|
||||||
Syslog('+', "remote is a listed system");
|
Syslog('+', "remote is a listed system");
|
||||||
if (inbound)
|
if (inbound)
|
||||||
free(inbound);
|
free(inbound);
|
||||||
inbound = xstrcpy(CFG.inbound);
|
inbound = xstrcpy(CFG.inbound);
|
||||||
strncpy(history.system_name, nlent->name, 35);
|
strncpy(history.system_name, nlent->name, 35);
|
||||||
strncpy(history.location, nlent->location, 35);
|
strncpy(history.location, nlent->location, 35);
|
||||||
strncpy(history.sysop, nlent->sysop, 35);
|
strncpy(history.sysop, nlent->sysop, 35);
|
||||||
} else {
|
UserCity(mypid, nlent->sysop, nlent->location);
|
||||||
sprintf(history.system_name, "Unknown");
|
} else {
|
||||||
sprintf(history.location, "Somewhere");
|
sprintf(history.system_name, "Unknown");
|
||||||
}
|
sprintf(history.location, "Somewhere");
|
||||||
|
}
|
||||||
|
|
||||||
if (nlent)
|
if (nlent)
|
||||||
rdoptions(Loaded);
|
rdoptions(Loaded);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* It appears that if the remote gave no password, the
|
* It appears that if the remote gave no password, the
|
||||||
* getheader function fills in a password itself. Maybe
|
* getheader function fills in a password itself. Maybe
|
||||||
* that's the reason why E.C did not switch to protected
|
* that's the reason why E.C did not switch to protected
|
||||||
* inbound, because of the failing password check. MB.
|
* inbound, because of the failing password check. MB.
|
||||||
*/
|
*/
|
||||||
if (f.name) {
|
if (f.name) {
|
||||||
Syslog('+', "Password correct, protected FTS-0001 session");
|
Syslog('+', "Password correct, protected FTS-0001 session");
|
||||||
if (inbound)
|
if (inbound)
|
||||||
free(inbound);
|
free(inbound);
|
||||||
inbound = xstrcpy(CFG.pinbound);
|
inbound = xstrcpy(CFG.pinbound);
|
||||||
}
|
}
|
||||||
|
|
||||||
tosend = create_filelist(remote,(char *)ALL_MAIL,1);
|
tosend = create_filelist(remote,(char *)ALL_MAIL,1);
|
||||||
if (rc == 0) {
|
if (rc == 0) {
|
||||||
SM_PROCEED(recv_file);
|
SM_PROCEED(recv_file);
|
||||||
} else {
|
} else {
|
||||||
SM_SUCCESS;
|
SM_SUCCESS;
|
||||||
}
|
}
|
||||||
default: Syslog('+', "received bad packet apparently from",ascfnode(&f,0x1f));
|
|
||||||
fclose(fp);
|
default:
|
||||||
SM_ERROR;
|
Syslog('+', "received bad packet apparently from",ascfnode(&f,0x1f));
|
||||||
}
|
fclose(fp);
|
||||||
|
SM_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
SM_STATE(recv_file)
|
SM_STATE(recv_file)
|
||||||
|
|
||||||
switch (xmrecv(NULL)) {
|
switch (xmrecv(NULL)) {
|
||||||
case 0: SM_PROCEED(recv_file);
|
case 0: SM_PROCEED(recv_file);
|
||||||
break;
|
break;
|
||||||
case 1: SM_SUCCESS;
|
case 1: SM_SUCCESS;
|
||||||
break;
|
break;
|
||||||
default: SM_ERROR;
|
default: SM_ERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SM_END
|
SM_END
|
||||||
SM_RETURN
|
SM_RETURN
|
||||||
|
@ -114,6 +114,7 @@ typedef struct _Hello {
|
|||||||
|
|
||||||
|
|
||||||
extern int Loaded;
|
extern int Loaded;
|
||||||
|
extern pid_t mypid;
|
||||||
|
|
||||||
Hello hello2;
|
Hello hello2;
|
||||||
Hello gethello2(unsigned char[]);
|
Hello gethello2(unsigned char[]);
|
||||||
@ -166,6 +167,7 @@ int rx_yoohoo(void)
|
|||||||
free(inbound);
|
free(inbound);
|
||||||
inbound = xstrcpy(CFG.inbound);
|
inbound = xstrcpy(CFG.inbound);
|
||||||
strncpy(history.location, nlent->location, 35);
|
strncpy(history.location, nlent->location, 35);
|
||||||
|
UserCity(mypid, nlent->sysop, nlent->location);
|
||||||
}
|
}
|
||||||
if (nlent)
|
if (nlent)
|
||||||
rdoptions(Loaded);
|
rdoptions(Loaded);
|
||||||
|
@ -173,7 +173,7 @@ void system_moni(void)
|
|||||||
set_color(WHITE, BLACK);
|
set_color(WHITE, BLACK);
|
||||||
mvprintw( 5, 6, "1. SERVER CLIENTS");
|
mvprintw( 5, 6, "1. SERVER CLIENTS");
|
||||||
set_color(YELLOW, RED);
|
set_color(YELLOW, RED);
|
||||||
mvprintw( 7, 1, "Pid tty user program city doing time ");
|
mvprintw( 7, 1, "Pid tty user program city doing time ");
|
||||||
set_color(CYAN, BLACK);
|
set_color(CYAN, BLACK);
|
||||||
center_addstr(LINES - 4, (char *)"Press any key");
|
center_addstr(LINES - 4, (char *)"Press any key");
|
||||||
IsDoing("System Monitor");
|
IsDoing("System Monitor");
|
||||||
@ -203,10 +203,10 @@ void system_moni(void)
|
|||||||
cnt = strtok(buf, ",");
|
cnt = strtok(buf, ",");
|
||||||
mvprintw(y, 1, (char *)"%.5s", strtok(NULL, ","));
|
mvprintw(y, 1, (char *)"%.5s", strtok(NULL, ","));
|
||||||
mvprintw(y, 7, (char *)"%.6s", strtok(NULL, ","));
|
mvprintw(y, 7, (char *)"%.6s", strtok(NULL, ","));
|
||||||
mvprintw(y,14, (char *)"%.16s", strtok(NULL, ","));
|
mvprintw(y,14, (char *)"%.8s", strtok(NULL, ","));
|
||||||
mvprintw(y,31, (char *)"%.8s", strtok(NULL, ","));
|
mvprintw(y,23, (char *)"%.8s", strtok(NULL, ","));
|
||||||
mvprintw(y,40, (char *)"%.15s", strtok(NULL, ","));
|
mvprintw(y,32, (char *)"%.15s", strtok(NULL, ","));
|
||||||
mvprintw(y,56, (char *)"%.18s", strtok(NULL, ","));
|
mvprintw(y,48, (char *)"%.26s", strtok(NULL, ","));
|
||||||
start = atoi(strtok(NULL, ";"));
|
start = atoi(strtok(NULL, ";"));
|
||||||
now = time(NULL);
|
now = time(NULL);
|
||||||
mvprintw(y,75, (char *)"%s", t_elapsed(start, now));
|
mvprintw(y,75, (char *)"%s", t_elapsed(start, now));
|
||||||
|
@ -177,7 +177,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
colour(YELLOW, BLACK);
|
colour(YELLOW, BLACK);
|
||||||
printf("MBSE BBS v%s (Release: %s)\n", VERSION, ReleaseDate);
|
printf("MBSE BBS v%s (Release: %s) on %s/%s\n", VERSION, ReleaseDate, OsName(), OsCPU());
|
||||||
colour(WHITE, BLACK);
|
colour(WHITE, BLACK);
|
||||||
printf("%s\n\n", COPYRIGHT);
|
printf("%s\n\n", COPYRIGHT);
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ int main(int argc, char **argv)
|
|||||||
DisplayLogo();
|
DisplayLogo();
|
||||||
|
|
||||||
colour(YELLOW, BLACK);
|
colour(YELLOW, BLACK);
|
||||||
printf("MBSE BBS v%s (Release: %s)\n", VERSION, ReleaseDate);
|
printf("MBSE BBS v%s (Release: %s) on %s/%s\n", VERSION, ReleaseDate, OsName(), OsCPU());
|
||||||
colour(WHITE, BLACK);
|
colour(WHITE, BLACK);
|
||||||
printf("%s\n\n", COPYRIGHT);
|
printf("%s\n\n", COPYRIGHT);
|
||||||
|
|
||||||
|
@ -147,7 +147,6 @@ int newuser()
|
|||||||
} while (badname);
|
} while (badname);
|
||||||
|
|
||||||
strcpy(FullName, tlcap(temp));
|
strcpy(FullName, tlcap(temp));
|
||||||
UserCity(mypid, FullName, (char *)"Unknown");
|
|
||||||
|
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
Enter(1);
|
Enter(1);
|
||||||
@ -187,6 +186,7 @@ int newuser()
|
|||||||
sprintf(usrconfig.Password, "%s", temp2);
|
sprintf(usrconfig.Password, "%s", temp2);
|
||||||
alarm_on();
|
alarm_on();
|
||||||
sprintf(UnixName, "%s", (char *) NameCreate(NameGen(FullName), FullName, temp2));
|
sprintf(UnixName, "%s", (char *) NameCreate(NameGen(FullName), FullName, temp2));
|
||||||
|
UserCity(mypid, UnixName, (char *)"Unknown");
|
||||||
|
|
||||||
strcpy(usrconfig.sUserName, FullName);
|
strcpy(usrconfig.sUserName, FullName);
|
||||||
strcpy(usrconfig.Name, UnixName);
|
strcpy(usrconfig.Name, UnixName);
|
||||||
@ -297,7 +297,7 @@ int newuser()
|
|||||||
Enter(1);
|
Enter(1);
|
||||||
} else {
|
} else {
|
||||||
strcpy(usrconfig.sLocation, temp);
|
strcpy(usrconfig.sLocation, temp);
|
||||||
UserCity(mypid, FullName, temp);
|
UserCity(mypid, UnixName, temp);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
576
mbsebbs/user.c
576
mbsebbs/user.c
@ -203,331 +203,335 @@ void user()
|
|||||||
grecno++;
|
grecno++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!FoundName) {
|
if (!FoundName) {
|
||||||
printf("Unknown username: %s\n", sUnixName);
|
printf("Unknown username: %s\n", sUnixName);
|
||||||
/* FATAL ERROR: You are not in the BBS users file.*/
|
/* FATAL ERROR: You are not in the BBS users file.*/
|
||||||
printf("%s\n", (char *) Language(389));
|
printf("%s\n", (char *) Language(389));
|
||||||
/* Please run 'newuser' to create an account */
|
/* Please run 'newuser' to create an account */
|
||||||
printf("%s\n", (char *) Language(390));
|
printf("%s\n", (char *) Language(390));
|
||||||
Syslog('?', "FATAL: Could not find user in BBS users file.");
|
Syslog('?', "FATAL: Could not find user in BBS users file.");
|
||||||
Syslog('?', " and system is using unix accounts\n");
|
Syslog('?', " and system is using unix accounts\n");
|
||||||
ExitClient(MBERR_OK);
|
ExitClient(MBERR_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copy username, split first and lastname.
|
||||||
|
*/
|
||||||
|
strcpy(UserName, usrconfig.sUserName);
|
||||||
|
if ((strchr(UserName,' ') == NULL && !CFG.iOneName)) {
|
||||||
|
token = strtok(UserName, " ");
|
||||||
|
strcpy(FirstName, token);
|
||||||
|
token = strtok(NULL, "\0");
|
||||||
|
i = strlen(token);
|
||||||
|
for(x = 2; x < i; x++) {
|
||||||
|
if (token[x] == ' ')
|
||||||
|
token[x] = '\0';
|
||||||
}
|
}
|
||||||
|
strcpy(LastName, token);
|
||||||
|
} else
|
||||||
|
strcpy(FirstName, UserName);
|
||||||
|
strcpy(UserName, usrconfig.sUserName);
|
||||||
|
Syslog('+', "%s On-Line at %s", UserName, ttyinfo.comment);
|
||||||
|
IsDoing("Just Logged In");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy username, split first and lastname.
|
* Check some essential files, create them if they don't exist.
|
||||||
*/
|
*/
|
||||||
strcpy(UserName, usrconfig.sUserName);
|
ChkFiles();
|
||||||
if ((strchr(UserName,' ') == NULL && !CFG.iOneName)) {
|
|
||||||
token = strtok(UserName, " ");
|
|
||||||
strcpy(FirstName, token);
|
|
||||||
token = strtok(NULL, "\0");
|
|
||||||
i = strlen(token);
|
|
||||||
for(x = 2; x < i; x++) {
|
|
||||||
if(token[x] == ' ')
|
|
||||||
token[x] = '\0';
|
|
||||||
}
|
|
||||||
strcpy(LastName, token);
|
|
||||||
} else
|
|
||||||
strcpy(FirstName, UserName);
|
|
||||||
strcpy(UserName, usrconfig.sUserName);
|
|
||||||
Syslog('+', "%s On-Line at %s", UserName, ttyinfo.comment);
|
|
||||||
IsDoing("Just Logged In");
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check some essential files, create them if they don't exist.
|
* Setup users favourite language.
|
||||||
*/
|
*/
|
||||||
ChkFiles();
|
Set_Language(usrconfig.iLanguage);
|
||||||
|
Free_Language();
|
||||||
|
InitLanguage();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setup users favourite language.
|
* User logged in, tell it to the server. Check if a location is
|
||||||
*/
|
* set, if Ask User location for new users is off, this field is
|
||||||
Set_Language(usrconfig.iLanguage);
|
* empty but we have to send something to the server.
|
||||||
Free_Language();
|
*/
|
||||||
InitLanguage();
|
if (strlen(usrconfig.sLocation))
|
||||||
|
UserCity(mypid, usrconfig.Name, usrconfig.sLocation);
|
||||||
|
else
|
||||||
|
UserCity(mypid, usrconfig.Name, (char *)"N/A");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* User logged in, tell it to the server. Check if a location is
|
* Set last file and message area so these numbers are saved when
|
||||||
* set, if Ask User location for new users is off, this field is
|
* the user hangs up or is logged off before het gets to the main
|
||||||
* empty but we have to send something to the server.
|
* menu. Later in this function the areas are set permanent.
|
||||||
*/
|
*/
|
||||||
if (strlen(usrconfig.sLocation))
|
iAreaNumber = usrconfig.iLastFileArea;
|
||||||
UserCity(mypid, usrconfig.sUserName, usrconfig.sLocation);
|
iMsgAreaNumber = usrconfig.iLastMsgArea;
|
||||||
else
|
|
||||||
UserCity(mypid, usrconfig.sUserName, (char *)"N/A");
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* See if this user is the Sysop.
|
||||||
|
*/
|
||||||
|
strcpy(temp, UserName);
|
||||||
|
strcpy(temp1, CFG.sysop_name);
|
||||||
|
if ((strcasecmp(CFG.sysop_name, UserName)) == 0) {
|
||||||
/*
|
/*
|
||||||
* Set last file and message area so these numbers are saved when
|
* If login name is sysop, set SYSOP true
|
||||||
* the user hangs up or is logged off before het gets to the main
|
|
||||||
* menu. Later in this function the areas are set permanent.
|
|
||||||
*/
|
*/
|
||||||
iAreaNumber = usrconfig.iLastFileArea;
|
SYSOP = TRUE;
|
||||||
iLastMsgArea = usrconfig.iLastMsgArea;
|
Syslog('+', "Sysop is online");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Is this a new user?
|
||||||
|
*/
|
||||||
|
if (usrconfig.iTotalCalls == 0)
|
||||||
|
IsNew = TRUE;
|
||||||
|
|
||||||
|
TermInit(usrconfig.GraphMode);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Pause after logo screen.
|
||||||
|
*/
|
||||||
|
alarm_on();
|
||||||
|
Pause();
|
||||||
|
|
||||||
|
if (usrconfig.Archiver[0] == '\0') {
|
||||||
|
usrconfig.Archiver[0] = 'Z';
|
||||||
|
usrconfig.Archiver[1] = 'I';
|
||||||
|
usrconfig.Archiver[2] = 'P';
|
||||||
|
Syslog('+', "Setup default archiver ZIP");
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check users date format. We do it strict as we
|
||||||
|
* need this to be good for several other purposes.
|
||||||
|
* If it is correct, the users age is set in UserAge
|
||||||
|
*/
|
||||||
|
if (!Test_DOB(usrconfig.sDateOfBirth)) {
|
||||||
|
Syslog('!', "Error in Date of Birth");
|
||||||
|
Chg_DOB();
|
||||||
|
strcpy(usrconfig.sDateOfBirth, exitinfo.sDateOfBirth);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Check to see if user must expire
|
||||||
|
*/
|
||||||
|
sprintf(temp,"%s", (char *) GetDateDMY());
|
||||||
|
SwapDate(temp, usrconfig.sExpiryDate);
|
||||||
|
|
||||||
|
/* Convert Date1 & Date2 to longs for compare */
|
||||||
|
l1 = atol(Date1);
|
||||||
|
l2 = atol(Date2);
|
||||||
|
|
||||||
|
if (l1 >= l2 && l2 != 0) {
|
||||||
/*
|
/*
|
||||||
* See if this user is the Sysop.
|
* If Expiry Date is the same as today expire to
|
||||||
|
* Expire Sec level
|
||||||
*/
|
*/
|
||||||
strcpy(temp, UserName);
|
usrconfig.Security = usrconfig.ExpirySec;
|
||||||
strcpy(temp1, CFG.sysop_name);
|
Syslog('!', "User is expired, resetting level");
|
||||||
if ((strcasecmp(CFG.sysop_name, UserName)) == 0) {
|
/*
|
||||||
/*
|
* Show texfile to user telling him about this.
|
||||||
* If login name is sysop, set SYSOP true
|
*/
|
||||||
*/
|
DisplayFile((char *)"expired");
|
||||||
SYSOP = TRUE;
|
}
|
||||||
Syslog('+', "Sysop is online");
|
|
||||||
|
free(Date1);
|
||||||
|
free(Date2);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copy limits.data into memory
|
||||||
|
*/
|
||||||
|
sprintf(temp, "%s/etc/limits.data", getenv("MBSE_ROOT"));
|
||||||
|
|
||||||
|
if ((pLimits = fopen(temp,"rb")) == NULL) {
|
||||||
|
WriteError("$Can't open %s", temp);
|
||||||
|
} else {
|
||||||
|
fread(&LIMIThdr, sizeof(LIMIThdr), 1, pLimits);
|
||||||
|
|
||||||
|
while (fread(&LIMIT, sizeof(LIMIT), 1, pLimits) == 1) {
|
||||||
|
if (LIMIT.Security == usrconfig.Security.level) {
|
||||||
|
iFoundLimit = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
fclose(pLimits);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!iFoundLimit) {
|
||||||
|
WriteError("Unknown Security Level in limits.data");
|
||||||
|
usrconfig.iTimeLeft = 0; /* Could not find limit, so set to Zero */
|
||||||
|
usrconfig.iTimeUsed = 0; /* Set to Zero as well */
|
||||||
|
} else {
|
||||||
/*
|
/*
|
||||||
* Is this a new user?
|
* Give user new time limit everyday, also new users get a new limit.
|
||||||
*/
|
|
||||||
if (usrconfig.iTotalCalls == 0)
|
|
||||||
IsNew = TRUE;
|
|
||||||
|
|
||||||
TermInit(usrconfig.GraphMode);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Pause after logo screen.
|
|
||||||
*/
|
|
||||||
alarm_on();
|
|
||||||
Pause();
|
|
||||||
|
|
||||||
if (usrconfig.Archiver[0] == '\0') {
|
|
||||||
usrconfig.Archiver[0] = 'Z';
|
|
||||||
usrconfig.Archiver[1] = 'I';
|
|
||||||
usrconfig.Archiver[2] = 'P';
|
|
||||||
Syslog('+', "Setup default archiver ZIP");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Check users date format. We do it strict as we
|
|
||||||
* need this to be good for several other purposes.
|
|
||||||
* If it is correct, the users age is set in UserAge
|
|
||||||
*/
|
|
||||||
if (!Test_DOB(usrconfig.sDateOfBirth)) {
|
|
||||||
Syslog('!', "Error in Date of Birth");
|
|
||||||
Chg_DOB();
|
|
||||||
strcpy(usrconfig.sDateOfBirth, exitinfo.sDateOfBirth);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Check to see if user must expire
|
|
||||||
*/
|
*/
|
||||||
sprintf(temp,"%s", (char *) GetDateDMY());
|
sprintf(temp,"%s", (char *) GetDateDMY());
|
||||||
SwapDate(temp, usrconfig.sExpiryDate);
|
if (((strcmp(StrDateDMY(usrconfig.tLastLoginDate), temp)) != 0) || IsNew) {
|
||||||
|
/*
|
||||||
|
* If no timelimit set give user 24 hours.
|
||||||
|
*/
|
||||||
|
if (LIMIT.Time)
|
||||||
|
usrconfig.iTimeLeft = LIMIT.Time;
|
||||||
|
else
|
||||||
|
usrconfig.iTimeLeft = 86400;
|
||||||
|
usrconfig.iTimeUsed = 0; /* Set time used today to Zero */
|
||||||
|
usrconfig.iConnectTime = 0; /* Set connect time to Zero */
|
||||||
|
|
||||||
/* Convert Date1 & Date2 to longs for compare */
|
/*
|
||||||
l1 = atol(Date1);
|
* Give user new bytes and files every day if needed.
|
||||||
l2 = atol(Date2);
|
*/
|
||||||
|
if (LIMIT.DownK && LIMIT.DownF) {
|
||||||
if (l1 >= l2 && l2 != 0) {
|
usrconfig.DownloadKToday = LIMIT.DownK;
|
||||||
/*
|
usrconfig.DownloadsToday = LIMIT.DownF;
|
||||||
* If Expiry Date is the same as today expire to
|
}
|
||||||
* Expire Sec level
|
|
||||||
*/
|
|
||||||
usrconfig.Security = usrconfig.ExpirySec;
|
|
||||||
Syslog('!', "User is expired, resetting level");
|
|
||||||
/*
|
|
||||||
* Show texfile to user telling him about this.
|
|
||||||
*/
|
|
||||||
DisplayFile((char *)"expired");
|
|
||||||
}
|
}
|
||||||
|
} /* End of else */
|
||||||
|
|
||||||
free(Date1);
|
usrconfig.iConnectTime = 0;
|
||||||
free(Date2);
|
|
||||||
|
/* Copy Users Protocol into Memory */
|
||||||
|
Set_Protocol(usrconfig.sProtocol);
|
||||||
|
tlf(usrconfig.sProtocol);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set last login Date and Time, copy previous session
|
||||||
|
* values in memory.
|
||||||
|
*/
|
||||||
|
sprintf(LastLoginDate, "%s", StrDateDMY(usrconfig.tLastLoginDate));
|
||||||
|
sprintf(LastLoginTime, "%s", StrTimeHMS(usrconfig.tLastLoginDate));
|
||||||
|
LastLogin = usrconfig.tLastLoginDate;
|
||||||
|
usrconfig.tLastLoginDate = ltime; /* Set current login to current date */
|
||||||
|
usrconfig.iTotalCalls++;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Update user record.
|
||||||
|
*/
|
||||||
|
if (fseek(pUsrConfig, usrconfighdr.hdrsize + (grecno * usrconfighdr.recsize), 0) != 0) {
|
||||||
|
WriteError("Can't seek in %s/etc/users.data", getenv("MBSE_ROOT"));
|
||||||
|
} else {
|
||||||
|
fwrite(&usrconfig, sizeof(usrconfig), 1, pUsrConfig);
|
||||||
|
fclose(pUsrConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write users structure to tmp file in ~/home/unixname/exitinfo
|
||||||
|
* A copy of the userrecord is also in the variable exitinfo.
|
||||||
|
*/
|
||||||
|
if (! InitExitinfo())
|
||||||
|
Good_Bye(MBERR_INIT_ERROR);
|
||||||
|
|
||||||
|
GetLastUser();
|
||||||
|
StartTime = xstrcpy(GetLocalHM());
|
||||||
|
ChangeHomeDir(exitinfo.Name, exitinfo.Email);
|
||||||
|
|
||||||
|
Syslog('+', "User successfully logged into BBS");
|
||||||
|
Syslog('+', "Level %d (%s), %d mins. left, port %s", usrconfig.Security.level, LIMIT.Description, usrconfig.iTimeLeft, pTTY);
|
||||||
|
Time2Go = time(NULL);
|
||||||
|
Time2Go += usrconfig.iTimeLeft * 60;
|
||||||
|
iUserTimeLeft = exitinfo.iTimeLeft;
|
||||||
|
|
||||||
|
IsDoing("Welcome screens");
|
||||||
|
DisplayFile((char *)"mainlogo");
|
||||||
|
DisplayFile((char *)"welcome");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The following files are only displayed if the user has
|
||||||
|
* turned the Bulletins on.
|
||||||
|
*/
|
||||||
|
if (exitinfo.ieNEWS) {
|
||||||
|
DisplayFile((char *)"welcome1");
|
||||||
|
DisplayFile((char *)"welcome2");
|
||||||
|
DisplayFile((char *)"welcome3");
|
||||||
|
DisplayFile((char *)"welcome4");
|
||||||
|
DisplayFile((char *)"welcome5");
|
||||||
|
DisplayFile((char *)"welcome6");
|
||||||
|
DisplayFile((char *)"welcome7");
|
||||||
|
DisplayFile((char *)"welcome8");
|
||||||
|
DisplayFile((char *)"welcome9");
|
||||||
|
|
||||||
|
sprintf(temp, "%s", (char *) GetDateDMY() );
|
||||||
|
if ((strcmp(exitinfo.sDateOfBirth, temp)) == 0)
|
||||||
|
DisplayFile((char *)"birthday");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy limits.data into memory
|
* Displays file if it exists DD-MM.A??
|
||||||
*/
|
*/
|
||||||
sprintf(temp, "%s/etc/limits.data", getenv("MBSE_ROOT"));
|
sprintf(temp, "%s", (char *) GetDateDMY());
|
||||||
|
strcpy(temp1, "");
|
||||||
if ((pLimits = fopen(temp,"rb")) == NULL) {
|
strncat(temp1, temp, 5);
|
||||||
WriteError("$Can't open %s", temp);
|
sprintf(temp, "%s", temp1);
|
||||||
} else {
|
DisplayFile(temp);
|
||||||
fread(&LIMIThdr, sizeof(LIMIThdr), 1, pLimits);
|
|
||||||
|
|
||||||
while (fread(&LIMIT, sizeof(LIMIT), 1, pLimits) == 1) {
|
|
||||||
if (LIMIT.Security == usrconfig.Security.level) {
|
|
||||||
iFoundLimit = TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose(pLimits);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!iFoundLimit) {
|
|
||||||
WriteError("Unknown Security Level in limits.data");
|
|
||||||
usrconfig.iTimeLeft = 0; /* Could not find limit, so set to Zero */
|
|
||||||
usrconfig.iTimeUsed = 0; /* Set to Zero as well */
|
|
||||||
} else {
|
|
||||||
/*
|
|
||||||
* Give user new time limit everyday, also new users get a new limit.
|
|
||||||
*/
|
|
||||||
sprintf(temp,"%s", (char *) GetDateDMY());
|
|
||||||
if (((strcmp(StrDateDMY(usrconfig.tLastLoginDate), temp)) != 0) || IsNew) {
|
|
||||||
/*
|
|
||||||
* If no timelimit set give user 24 hours.
|
|
||||||
*/
|
|
||||||
if (LIMIT.Time)
|
|
||||||
usrconfig.iTimeLeft = LIMIT.Time;
|
|
||||||
else
|
|
||||||
usrconfig.iTimeLeft = 86400;
|
|
||||||
usrconfig.iTimeUsed = 0; /* Set time used today to Zero */
|
|
||||||
usrconfig.iConnectTime = 0; /* Set connect time to Zero */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Give user new bytes and files every day if needed.
|
|
||||||
*/
|
|
||||||
if (LIMIT.DownK && LIMIT.DownF) {
|
|
||||||
usrconfig.DownloadKToday = LIMIT.DownK;
|
|
||||||
usrconfig.DownloadsToday = LIMIT.DownF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} /* End of else */
|
|
||||||
|
|
||||||
usrconfig.iConnectTime = 0;
|
|
||||||
|
|
||||||
/* Copy Users Protocol into Memory */
|
|
||||||
Set_Protocol(usrconfig.sProtocol);
|
|
||||||
tlf(usrconfig.sProtocol);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set last login Date and Time, copy previous session
|
* Displays users security file if it exists
|
||||||
* values in memory.
|
|
||||||
*/
|
*/
|
||||||
sprintf(LastLoginDate, "%s", StrDateDMY(usrconfig.tLastLoginDate));
|
sprintf(temp, "sec%d", exitinfo.Security.level);
|
||||||
sprintf(LastLoginTime, "%s", StrTimeHMS(usrconfig.tLastLoginDate));
|
DisplayFile(temp);
|
||||||
LastLogin = usrconfig.tLastLoginDate;
|
|
||||||
usrconfig.tLastLoginDate = ltime; /* Set current login to current date */
|
|
||||||
usrconfig.iTotalCalls++;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update user record.
|
* Display News file
|
||||||
*/
|
*/
|
||||||
if (fseek(pUsrConfig, usrconfighdr.hdrsize + (grecno * usrconfighdr.recsize), 0) != 0) {
|
DisplayFile((char *)"news");
|
||||||
WriteError("Can't seek in %s/etc/users.data", getenv("MBSE_ROOT"));
|
}
|
||||||
} else {
|
|
||||||
fwrite(&usrconfig, sizeof(usrconfig), 1, pUsrConfig);
|
|
||||||
fclose(pUsrConfig);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Write users structure to tmp file in ~/home/unixname/exitinfo
|
* Display Onceonly file, first get the date of that
|
||||||
* A copy of the userrecord is also in the variable exitinfo.
|
* file, search order is the same as in DisplayFile()
|
||||||
*/
|
*/
|
||||||
if (! InitExitinfo())
|
st.st_mtime = 0;
|
||||||
Good_Bye(MBERR_INIT_ERROR);
|
if (exitinfo.GraphMode) {
|
||||||
|
sprintf(temp, "%s/onceonly.ans", lang.TextPath);
|
||||||
GetLastUser();
|
stat(temp, &st);
|
||||||
StartTime = xstrcpy(GetLocalHM());
|
|
||||||
ChangeHomeDir(exitinfo.Name, exitinfo.Email);
|
|
||||||
|
|
||||||
Syslog('+', "User successfully logged into BBS");
|
|
||||||
Syslog('+', "Level %d (%s), %d mins. left, port %s",
|
|
||||||
usrconfig.Security.level, LIMIT.Description, usrconfig.iTimeLeft, pTTY);
|
|
||||||
Time2Go = time(NULL);
|
|
||||||
Time2Go += usrconfig.iTimeLeft * 60;
|
|
||||||
iUserTimeLeft = exitinfo.iTimeLeft;
|
|
||||||
|
|
||||||
DisplayFile((char *)"mainlogo");
|
|
||||||
DisplayFile((char *)"welcome");
|
|
||||||
|
|
||||||
/*
|
|
||||||
* The following files are only displayed if the user has
|
|
||||||
* turned the Bulletins on.
|
|
||||||
*/
|
|
||||||
if (exitinfo.ieNEWS) {
|
|
||||||
DisplayFile((char *)"welcome1");
|
|
||||||
DisplayFile((char *)"welcome2");
|
|
||||||
DisplayFile((char *)"welcome3");
|
|
||||||
DisplayFile((char *)"welcome4");
|
|
||||||
DisplayFile((char *)"welcome5");
|
|
||||||
DisplayFile((char *)"welcome6");
|
|
||||||
DisplayFile((char *)"welcome7");
|
|
||||||
DisplayFile((char *)"welcome8");
|
|
||||||
DisplayFile((char *)"welcome9");
|
|
||||||
|
|
||||||
sprintf(temp, "%s", (char *) GetDateDMY() );
|
|
||||||
if ((strcmp(exitinfo.sDateOfBirth, temp)) == 0)
|
|
||||||
DisplayFile((char *)"birthday");
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Displays file if it exists DD-MM.A??
|
|
||||||
*/
|
|
||||||
sprintf(temp, "%s", (char *) GetDateDMY());
|
|
||||||
strcpy(temp1, "");
|
|
||||||
strncat(temp1, temp, 5);
|
|
||||||
sprintf(temp, "%s", temp1);
|
|
||||||
DisplayFile(temp);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Displays users security file if it exists
|
|
||||||
*/
|
|
||||||
sprintf(temp, "sec%d", exitinfo.Security.level);
|
|
||||||
DisplayFile(temp);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Display News file
|
|
||||||
*/
|
|
||||||
DisplayFile((char *)"news");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Display Onceonly file, first get the date of that
|
|
||||||
* file, search order is the same as in DisplayFile()
|
|
||||||
*/
|
|
||||||
st.st_mtime = 0;
|
|
||||||
if (exitinfo.GraphMode) {
|
|
||||||
sprintf(temp, "%s/onceonly.ans", lang.TextPath);
|
|
||||||
stat(temp, &st);
|
|
||||||
if (st.st_mtime == 0) {
|
|
||||||
sprintf(temp, "%s/onceonly.ans", CFG.bbs_txtfiles);
|
|
||||||
stat(temp, &st);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (st.st_mtime == 0) {
|
if (st.st_mtime == 0) {
|
||||||
sprintf(temp, "%s/onceonly.asc", lang.TextPath);
|
sprintf(temp, "%s/onceonly.ans", CFG.bbs_txtfiles);
|
||||||
stat(temp, &st);
|
stat(temp, &st);
|
||||||
if (st.st_mtime == 0) {
|
|
||||||
sprintf(temp, "%s/onceonly.asc", CFG.bbs_txtfiles);
|
|
||||||
stat(temp, &st);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (st.st_mtime == 0) {
|
||||||
|
sprintf(temp, "%s/onceonly.asc", lang.TextPath);
|
||||||
|
stat(temp, &st);
|
||||||
|
if (st.st_mtime == 0) {
|
||||||
|
sprintf(temp, "%s/onceonly.asc", CFG.bbs_txtfiles);
|
||||||
|
stat(temp, &st);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((st.st_mtime != 0) && (LastLogin < st.st_mtime))
|
if ((st.st_mtime != 0) && (LastLogin < st.st_mtime))
|
||||||
DisplayFile((char *)"onceonly");
|
DisplayFile((char *)"onceonly");
|
||||||
|
|
||||||
OLR_SyncTags();
|
OLR_SyncTags();
|
||||||
|
|
||||||
if (exitinfo.MailScan)
|
if (exitinfo.MailScan) {
|
||||||
CheckMail();
|
IsDoing("New mail check");
|
||||||
|
CheckMail();
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We don't show new files to new users.
|
* We don't show new files to new users.
|
||||||
*/
|
*/
|
||||||
if (exitinfo.ieFILE && (!IsNew))
|
if (exitinfo.ieFILE && (!IsNew)) {
|
||||||
NewfileScan(FALSE);
|
IsDoing("New files check");
|
||||||
|
NewfileScan(FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy last file Area in to current Area
|
* Copy last file Area in to current Area
|
||||||
*/
|
*/
|
||||||
SetFileArea(exitinfo.iLastFileArea);
|
SetFileArea(exitinfo.iLastFileArea);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy Last Message Area in to Current Msg Area
|
* Copy Last Message Area in to Current Msg Area
|
||||||
*/
|
*/
|
||||||
SetMsgArea(usrconfig.iLastMsgArea);
|
SetMsgArea(usrconfig.iLastMsgArea);
|
||||||
SetEmailArea((char *)"mailbox");
|
SetEmailArea((char *)"mailbox");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set or Reset the DoNotDisturb flag, now is the time
|
* Set or Reset the DoNotDisturb flag, now is the time
|
||||||
* we may be interrupted.
|
* we may be interrupted.
|
||||||
*/
|
*/
|
||||||
UserSilent(usrconfig.DoNotDisturb);
|
UserSilent(usrconfig.DoNotDisturb);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Start the menu.
|
* Start the menu.
|
||||||
*/
|
*/
|
||||||
menu();
|
menu();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -173,10 +173,11 @@ void WhosOn(char *OpData)
|
|||||||
/* WhosOn List */
|
/* WhosOn List */
|
||||||
printf("%-15s", (char *) Language(428));
|
printf("%-15s", (char *) Language(428));
|
||||||
else if (strstr(isdoing, "Offline"))
|
else if (strstr(isdoing, "Offline"))
|
||||||
/* Idle */
|
/* Offline Reader */
|
||||||
printf("%-15s", (char *) Language(429));
|
printf("%-15s", (char *) Language(429));
|
||||||
else
|
else
|
||||||
printf("System error ");
|
/* Browsing */ /* This is default when nothing matches */
|
||||||
|
printf("%-15s", (char *) Language(418));
|
||||||
|
|
||||||
colour(LIGHTRED, BLACK);
|
colour(LIGHTRED, BLACK);
|
||||||
printf("%-25s\n", location);
|
printf("%-25s\n", location);
|
||||||
@ -253,7 +254,6 @@ void WhosDoingWhat(int iStatus)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
IsDoing(temp);
|
IsDoing(temp);
|
||||||
|
|
||||||
free(temp);
|
free(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user