updated lastcaller information
This commit is contained in:
parent
e704086124
commit
2bb0546929
@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* File ..................: bbs/email.c
|
* File ..................: bbs/email.c
|
||||||
* Purpose ...............: Internet email
|
* Purpose ...............: Internet email
|
||||||
* Last modification date : 17-Sep-2001
|
* Last modification date : 26-Oct-2001
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2001
|
||||||
@ -53,7 +53,7 @@ extern FILE *qf;
|
|||||||
extern char *Message[];
|
extern char *Message[];
|
||||||
extern int Line;
|
extern int Line;
|
||||||
extern int do_mailout;
|
extern int do_mailout;
|
||||||
|
extern int LC_Wrote;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -331,6 +331,7 @@ int Save_Email(int IsReply)
|
|||||||
WriteExitinfo();
|
WriteExitinfo();
|
||||||
|
|
||||||
do_mailout = TRUE;
|
do_mailout = TRUE;
|
||||||
|
LC_Wrote = TRUE;
|
||||||
|
|
||||||
Syslog('+', "Email (%ld) to \"%s\", \"%s\", in mailbox", Msg.Id, Msg.To, Msg.Subject);
|
Syslog('+', "Email (%ld) to \"%s\", \"%s\", in mailbox", Msg.Id, Msg.To, Msg.Subject);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* File ..................: bbs/exitinfo.c
|
* File ..................: bbs/exitinfo.c
|
||||||
* Purpose ...............: Exitinfo functions
|
* Purpose ...............: Exitinfo functions
|
||||||
* Last modification date : 28-Jun-2001
|
* Last modification date : 26-Oct-2001
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2001
|
||||||
@ -46,6 +46,8 @@
|
|||||||
#include "exitinfo.h"
|
#include "exitinfo.h"
|
||||||
|
|
||||||
|
|
||||||
|
extern int LC_Download, LC_Upload, LC_Read, LC_Chat, LC_Olr, LC_Door;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy usersrecord into ~/tmp/.bbs-exitinfo.tty
|
* Copy usersrecord into ~/tmp/.bbs-exitinfo.tty
|
||||||
@ -291,22 +293,27 @@ void WhosDoingWhat(int iStatus)
|
|||||||
|
|
||||||
case DOWNLOAD:
|
case DOWNLOAD:
|
||||||
strcpy(temp, "Downloading");
|
strcpy(temp, "Downloading");
|
||||||
|
LC_Download = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UPLOAD:
|
case UPLOAD:
|
||||||
strcpy(temp, "Uploading");
|
strcpy(temp, "Uploading");
|
||||||
|
LC_Upload = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case READ_POST:
|
case READ_POST:
|
||||||
strcpy(temp, "Read/post Messages");
|
strcpy(temp, "Read/post Messages");
|
||||||
|
LC_Read = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DOOR:
|
case DOOR:
|
||||||
strcpy(temp, "External Door");
|
strcpy(temp, "External Door");
|
||||||
|
LC_Door = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SYSOPCHAT:
|
case SYSOPCHAT:
|
||||||
strcpy(temp, "Sysop Chat");
|
strcpy(temp, "Sysop Chat");
|
||||||
|
LC_Chat = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FILELIST:
|
case FILELIST:
|
||||||
@ -315,10 +322,12 @@ void WhosDoingWhat(int iStatus)
|
|||||||
|
|
||||||
case TIMEBANK:
|
case TIMEBANK:
|
||||||
strcpy(temp, "Time Bank");
|
strcpy(temp, "Time Bank");
|
||||||
|
LC_Door = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SAFE:
|
case SAFE:
|
||||||
strcpy(temp, "Safe Cracker");
|
strcpy(temp, "Safe Cracker");
|
||||||
|
LC_Door = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WHOSON:
|
case WHOSON:
|
||||||
@ -327,6 +336,7 @@ void WhosDoingWhat(int iStatus)
|
|||||||
|
|
||||||
case OLR:
|
case OLR:
|
||||||
strcpy(temp, "Offline Reader");
|
strcpy(temp, "Offline Reader");
|
||||||
|
LC_Olr = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
IsDoing(temp);
|
IsDoing(temp);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* File ..................: bbs/mail.c
|
* File ..................: bbs/mail.c
|
||||||
* Purpose ...............: Message reading and writing.
|
* Purpose ...............: Message reading and writing.
|
||||||
* Last modification date : 17-Sep-2001
|
* Last modification date : 26-Oct-2001
|
||||||
* Todo ..................: Implement message groups.
|
* Todo ..................: Implement message groups.
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
@ -70,6 +70,7 @@ int Line = 1; /* Line counter in editor */
|
|||||||
char *Message[TEXTBUFSIZE +1];/* Message compose text buffer */
|
char *Message[TEXTBUFSIZE +1];/* Message compose text buffer */
|
||||||
FILE *qf; /* Quote file */
|
FILE *qf; /* Quote file */
|
||||||
extern int do_mailout;
|
extern int do_mailout;
|
||||||
|
extern int LC_Wrote; /* Lastcaller info write message */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -594,6 +595,7 @@ int Save_Msg(int IsReply, faddr *Dest)
|
|||||||
WriteExitinfo();
|
WriteExitinfo();
|
||||||
|
|
||||||
do_mailout = TRUE;
|
do_mailout = TRUE;
|
||||||
|
LC_Wrote = TRUE;
|
||||||
|
|
||||||
Syslog('+', "Msg (%ld) to \"%s\", \"%s\", in %ld", Msg.Id, Msg.To, Msg.Subject, iMsgAreaNumber + 1);
|
Syslog('+', "Msg (%ld) to \"%s\", \"%s\", in %ld", Msg.Id, Msg.To, Msg.Subject, iMsgAreaNumber + 1);
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
*
|
*
|
||||||
* File ..................: bbs/misc.c
|
* File ..................: bbs/misc.c
|
||||||
* Purpose ...............: Misc functions
|
* Purpose ...............: Misc functions
|
||||||
* Last modification date : 28-Jun-2001
|
* Last modification date : 26-Oct-2001
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2001
|
||||||
@ -44,6 +44,18 @@
|
|||||||
|
|
||||||
|
|
||||||
extern pid_t mypid; /* Pid of this program */
|
extern pid_t mypid; /* Pid of this program */
|
||||||
|
extern char *StartTime; /* Time user logged in */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Last caller action flags
|
||||||
|
*/
|
||||||
|
int LC_Download = FALSE;
|
||||||
|
int LC_Upload = FALSE;
|
||||||
|
int LC_Read = FALSE;
|
||||||
|
int LC_Wrote = FALSE;
|
||||||
|
int LC_Chat = FALSE;
|
||||||
|
int LC_Olr = FALSE;
|
||||||
|
int LC_Door = FALSE;
|
||||||
|
|
||||||
|
|
||||||
int MoreFile(char *filename)
|
int MoreFile(char *filename)
|
||||||
@ -238,7 +250,7 @@ void Setup(char *Option, char *variable)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void GetLastCallers()
|
void SaveLastCallers()
|
||||||
{
|
{
|
||||||
FILE *pGLC;
|
FILE *pGLC;
|
||||||
char *sFileName;
|
char *sFileName;
|
||||||
@ -284,10 +296,18 @@ void GetLastCallers()
|
|||||||
memset(&LCALL, 0, sizeof(LCALL));
|
memset(&LCALL, 0, sizeof(LCALL));
|
||||||
sprintf(LCALL.UserName,"%s", exitinfo.sUserName);
|
sprintf(LCALL.UserName,"%s", exitinfo.sUserName);
|
||||||
sprintf(LCALL.Handle,"%s", exitinfo.sHandle);
|
sprintf(LCALL.Handle,"%s", exitinfo.sHandle);
|
||||||
sprintf(LCALL.TimeOn,"%s", (char *) GetLocalHM());
|
sprintf(LCALL.TimeOn,"%s", StartTime);
|
||||||
sprintf(LCALL.Device,"%s", pTTY);
|
sprintf(LCALL.Device,"%s", pTTY);
|
||||||
LCALL.SecLevel = exitinfo.Security.level;
|
LCALL.SecLevel = exitinfo.Security.level;
|
||||||
LCALL.Calls = exitinfo.iTotalCalls;
|
LCALL.Calls = exitinfo.iTotalCalls;
|
||||||
|
LCALL.CallTime = exitinfo.iConnectTime;
|
||||||
|
LCALL.Download = LC_Download;
|
||||||
|
LCALL.Upload = LC_Upload;
|
||||||
|
LCALL.Read = LC_Read;
|
||||||
|
LCALL.Wrote = LC_Wrote;
|
||||||
|
LCALL.Chat = LC_Chat;
|
||||||
|
LCALL.Olr = LC_Olr;
|
||||||
|
LCALL.Door = LC_Door;
|
||||||
sprintf(LCALL.Speed, "%s", ttyinfo.speed);
|
sprintf(LCALL.Speed, "%s", ttyinfo.speed);
|
||||||
|
|
||||||
/* If true then set hidden so it doesn't display in lastcallers function */
|
/* If true then set hidden so it doesn't display in lastcallers function */
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
void Setup(char *, char *); /* This function replaces a string in the users file */
|
void Setup(char *, char *); /* This function replaces a string in the users file */
|
||||||
int GetLastUser(void);
|
int GetLastUser(void);
|
||||||
void LastCallers(char *);
|
void LastCallers(char *);
|
||||||
void GetLastCallers(void);
|
void SaveLastCallers(void);
|
||||||
char *GLCdate(void); /* Returns current date DD-Mmm */
|
char *GLCdate(void); /* Returns current date DD-Mmm */
|
||||||
void DisplayLogo(void);
|
void DisplayLogo(void);
|
||||||
int ChkFiles(void);
|
int ChkFiles(void);
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Main user login procedure. Checks for limits,
|
* Purpose ...............: Main user login procedure. Checks for limits,
|
||||||
* new ratio's cats all the welcome screens, and
|
* new ratio's cats all the welcome screens, and
|
||||||
* does a lot of checking in general.
|
* does a lot of checking in general.
|
||||||
* Last modification date : 30-Sep-2001
|
* Last modification date : 27-Oct-2001
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2001
|
||||||
@ -58,6 +58,7 @@
|
|||||||
|
|
||||||
extern int sock;
|
extern int sock;
|
||||||
extern pid_t mypid;
|
extern pid_t mypid;
|
||||||
|
char *StartTime;
|
||||||
|
|
||||||
|
|
||||||
/* Non global function prototypes */
|
/* Non global function prototypes */
|
||||||
@ -186,7 +187,7 @@ char *AskLogin(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Please enter your Last name: */
|
/* Please enter your Last name: */
|
||||||
language(7, 0, 1);
|
language(LIGHTGRAY, BLACK, 1);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
alarm_on();
|
alarm_on();
|
||||||
Getname(temp, 34 - strlen(GetName));
|
Getname(temp, 34 - strlen(GetName));
|
||||||
@ -699,7 +700,7 @@ void user()
|
|||||||
Syslog('+', "Name not in user file");
|
Syslog('+', "Name not in user file");
|
||||||
Enter(1);
|
Enter(1);
|
||||||
/* Scanning User File */
|
/* Scanning User File */
|
||||||
language(7, 0, 3);
|
language(LIGHTGRAY, BLACK, 3);
|
||||||
Enter(1);
|
Enter(1);
|
||||||
|
|
||||||
usrconfig.GraphMode = FALSE;
|
usrconfig.GraphMode = FALSE;
|
||||||
@ -707,10 +708,10 @@ void user()
|
|||||||
|
|
||||||
Enter(1);
|
Enter(1);
|
||||||
/* Name entered: */
|
/* Name entered: */
|
||||||
language(7, 0, 5);
|
language(LIGHTGRAY, BLACK, 5);
|
||||||
printf("%s\n\n", UserName);
|
printf("%s\n\n", UserName);
|
||||||
/* Did you spell your name correctly [Y/n] */
|
/* Did you spell your name correctly [Y/n] */
|
||||||
language(7, 0, 4);
|
language(WHITE, BLACK, 4);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
fflush(stdin);
|
fflush(stdin);
|
||||||
i = toupper(Getone());
|
i = toupper(Getone());
|
||||||
@ -727,7 +728,7 @@ void user()
|
|||||||
/* If FALSE display hard coded message */
|
/* If FALSE display hard coded message */
|
||||||
Enter(1);
|
Enter(1);
|
||||||
/* This is a PRIVATE System, Type "off" to leave */
|
/* This is a PRIVATE System, Type "off" to leave */
|
||||||
language(7, 0, 6);
|
language(LIGHTRED, BLACK, 6);
|
||||||
Enter(2);
|
Enter(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -792,21 +793,21 @@ void user()
|
|||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
Enter(1);
|
Enter(1);
|
||||||
/* Your password is expired, enter password: */
|
/* Your password is expired, enter password: */
|
||||||
language(7, 0, 435);
|
language(LIGHTGRAY, BLACK, 435);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
alarm_on();
|
alarm_on();
|
||||||
Getpass(temp);
|
Getpass(temp);
|
||||||
if ((x = strlen(temp)) >= CFG.password_length) {
|
if ((x = strlen(temp)) >= CFG.password_length) {
|
||||||
Enter(1);
|
Enter(1);
|
||||||
/* Please enter password again: */
|
/* Please enter password again: */
|
||||||
language(7, 0, 40);
|
language(LIGHTGRAY, BLACK, 40);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
alarm_on();
|
alarm_on();
|
||||||
Getpass(temp1);
|
Getpass(temp1);
|
||||||
if ((i = strcmp(temp, temp1)) != 0) {
|
if ((i = strcmp(temp, temp1)) != 0) {
|
||||||
Enter(2);
|
Enter(2);
|
||||||
/* Passwords do not match */
|
/* Passwords do not match */
|
||||||
language(7,0,41);
|
language(LIGHTRED, BLACK, 41);
|
||||||
Enter(1);
|
Enter(1);
|
||||||
} else {
|
} else {
|
||||||
memset(&usrconfig.Password, 0, sizeof(usrconfig.Password));
|
memset(&usrconfig.Password, 0, sizeof(usrconfig.Password));
|
||||||
@ -830,10 +831,10 @@ void user()
|
|||||||
|
|
||||||
Enter(2);
|
Enter(2);
|
||||||
/* Your password must contain at least */
|
/* Your password must contain at least */
|
||||||
language(7, 0, 42);
|
language(LIGHTRED, BLACK, 42);
|
||||||
printf("%d ", CFG.password_length);
|
printf("%d ", CFG.password_length);
|
||||||
/* characters! Try again */
|
/* characters! Try again */
|
||||||
language(7, 0, 43);
|
language(LIGHTRED, BLACK, 43);
|
||||||
Enter(1);
|
Enter(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -842,7 +843,7 @@ void user()
|
|||||||
crc = iePassword;
|
crc = iePassword;
|
||||||
} else {
|
} else {
|
||||||
/* Pasword: */
|
/* Pasword: */
|
||||||
language(7, 0, 8);
|
language(LIGHTGRAY, BLACK, 8);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
alarm_on();
|
alarm_on();
|
||||||
Getpass(sGetPassword);
|
Getpass(sGetPassword);
|
||||||
@ -1032,7 +1033,7 @@ void user()
|
|||||||
*/
|
*/
|
||||||
InitExitinfo();
|
InitExitinfo();
|
||||||
GetLastUser();
|
GetLastUser();
|
||||||
GetLastCallers();
|
StartTime = xstrcpy(GetLocalHM());
|
||||||
ChangeHomeDir(exitinfo.Name, exitinfo.Email);
|
ChangeHomeDir(exitinfo.Name, exitinfo.Email);
|
||||||
|
|
||||||
Syslog('+', "User successfully logged into BBS");
|
Syslog('+', "User successfully logged into BBS");
|
||||||
@ -1143,13 +1144,13 @@ void user()
|
|||||||
iMaxLogin++;
|
iMaxLogin++;
|
||||||
if(iMaxLogin == CFG.max_login + 1) {
|
if(iMaxLogin == CFG.max_login + 1) {
|
||||||
Enter(2);
|
Enter(2);
|
||||||
language(7, 0, 9);
|
language(LIGHTGRAY, BLACK, 9);
|
||||||
Enter(1);
|
Enter(1);
|
||||||
Syslog('!', "Exceeded maximum login attempts, user disconnected");
|
Syslog('!', "Exceeded maximum login attempts, user disconnected");
|
||||||
ExitClient(1);
|
ExitClient(1);
|
||||||
}
|
}
|
||||||
Enter(2);
|
Enter(2);
|
||||||
language(7, 0, 10);
|
language(LIGHTGRAY, BLACK, 10);
|
||||||
Enter(2);
|
Enter(2);
|
||||||
alarm_on();
|
alarm_on();
|
||||||
Pause();
|
Pause();
|
||||||
|
Reference in New Issue
Block a user