| 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 <signal.h> |
| 20 |
#include <time.h> |
#include <time.h> |
| 21 |
|
|
| 22 |
//BBS enviroment |
// BBS enviroment |
| 23 |
char BBS_id[20] = ""; |
char BBS_id[20] = ""; |
| 24 |
char BBS_name[50] = ""; |
char BBS_name[50] = ""; |
| 25 |
char BBS_server[256] = ""; |
char BBS_server[256] = ""; |
| 27 |
unsigned int BBS_port = 23; |
unsigned int BBS_port = 23; |
| 28 |
long BBS_max_client = 256; |
long BBS_max_client = 256; |
| 29 |
long BBS_max_user = 10000; |
long BBS_max_user = 10000; |
| 30 |
char BBS_start_dt[50] = "2004�� 1�� 1��"; |
char BBS_start_dt[50] = "2004Äê 1ÔÂ 1ÈÕ"; |
| 31 |
|
|
| 32 |
char BBS_username[BBS_max_username_length]; |
char BBS_username[BBS_max_username_length]; |
| 33 |
BBS_user_priv BBS_priv; |
BBS_user_priv BBS_priv; |
| 41 |
char BBS_current_section_name[20]; |
char BBS_current_section_name[20]; |
| 42 |
|
|
| 43 |
char * |
char * |
| 44 |
setuserfile (char *buf, const char *filename) |
setuserfile(char *buf, const char *filename) |
| 45 |
{ |
{ |
| 46 |
sprintf (buf, "data/%s/%ld", filename, BBS_priv.uid); |
sprintf(buf, "data/%s/%ld", filename, BBS_priv.uid); |
| 47 |
return buf; |
return buf; |
| 48 |
} |
} |
| 49 |
|
|
| 50 |
char * |
char * |
| 51 |
sethomefile (char *buf, long int uid, char *filename) { |
sethomefile(char *buf, long int uid, char *filename) |
| 52 |
sprintf (buf, "data/%s/%ld", filename, uid); |
{ |
| 53 |
return buf; |
sprintf(buf, "data/%s/%ld", filename, uid); |
| 54 |
|
return buf; |
| 55 |
} |
} |