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