| 1 |
/*************************************************************************** |
/*************************************************************************** |
| 2 |
bbs.c - description |
bbs.c - description |
| 3 |
------------------- |
------------------- |
| 4 |
begin : Mon Oct 18 2004 |
begin : Mon Oct 18 2004 |
| 5 |
copyright : (C) 2004 by Leaflet |
copyright : (C) 2004 by Leaflet |
| 6 |
email : leaflet@leafok.com |
email : leaflet@leafok.com |
| 7 |
***************************************************************************/ |
***************************************************************************/ |
| 8 |
|
|
| 9 |
/*************************************************************************** |
/*************************************************************************** |
| 16 |
***************************************************************************/ |
***************************************************************************/ |
| 17 |
|
|
| 18 |
#include "bbs.h" |
#include "bbs.h" |
| 19 |
|
#include "user_priv.h" |
| 20 |
|
#include <stdio.h> |
| 21 |
|
#include <signal.h> |
| 22 |
#include <time.h> |
#include <time.h> |
| 23 |
|
|
| 24 |
//BBS enviroment |
// BBS enviroment |
| 25 |
char BBS_id[20] = ""; |
char BBS_id[20] = ""; |
| 26 |
char BBS_name[50] = ""; |
char BBS_name[50] = ""; |
| 27 |
char BBS_server[256] = ""; |
char BBS_server[256] = ""; |
| 28 |
char BBS_address[50] = ""; |
char BBS_address[50] = ""; |
| 29 |
unsigned int BBS_port = 23; |
unsigned int BBS_port = 23; |
| 30 |
long BBS_max_client = 256; |
unsigned int BBS_max_client = 256; |
| 31 |
long BBS_max_user = 10000; |
unsigned int BBS_max_user = 10000; |
| 32 |
char BBS_start_dt[50] = "2004年 1月 1日"; |
char BBS_start_dt[50] = "2004年 1月 1日"; |
| 33 |
|
|
| 34 |
char BBS_username[BBS_max_username_length]; |
char BBS_username[BBS_username_max_len + 1]; |
| 35 |
BBS_user_priv BBS_priv; |
int BBS_user_money = 0; |
|
int BBS_passwd_complex = 0; |
|
| 36 |
|
|
| 37 |
time_t BBS_login_tm; |
time_t BBS_login_tm; |
| 38 |
time_t BBS_last_access_tm; |
time_t BBS_last_access_tm; |
|
time_t BBS_last_sub_tm; |
|
| 39 |
|
|
| 40 |
char BBS_current_section_name[20]; |
char BBS_current_section_name[20]; |
| 41 |
|
|
| 42 |
|
char *setuserfile(char *buf, const char *filename) |
| 43 |
|
{ |
| 44 |
|
sprintf(buf, "%s/%ld", filename, BBS_priv.uid); |
| 45 |
|
return buf; |
| 46 |
|
} |