| 1 |
sysadm |
1.1 |
/***************************************************************************
|
| 2 |
|
|
bbs.c - description
|
| 3 |
|
|
-------------------
|
| 4 |
|
|
begin : Mon Oct 18 2004
|
| 5 |
|
|
copyright : (C) 2004 by Leaflet
|
| 6 |
|
|
email : leaflet@leafok.com
|
| 7 |
|
|
***************************************************************************/
|
| 8 |
|
|
|
| 9 |
|
|
/***************************************************************************
|
| 10 |
|
|
* *
|
| 11 |
|
|
* This program is free software; you can redistribute it and/or modify *
|
| 12 |
|
|
* it under the terms of the GNU General Public License as published by *
|
| 13 |
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
| 14 |
|
|
* (at your option) any later version. *
|
| 15 |
|
|
* *
|
| 16 |
|
|
***************************************************************************/
|
| 17 |
|
|
|
| 18 |
sysadm |
1.3 |
#include "bbs.h"
|
| 19 |
sysadm |
1.7 |
#include <signal.h>
|
| 20 |
sysadm |
1.3 |
#include <time.h>
|
| 21 |
|
|
|
| 22 |
sysadm |
1.1 |
//BBS enviroment
|
| 23 |
|
|
char BBS_id[20] = "";
|
| 24 |
|
|
char BBS_name[50] = "";
|
| 25 |
|
|
char BBS_server[256] = "";
|
| 26 |
|
|
char BBS_address[50] = "";
|
| 27 |
|
|
unsigned int BBS_port = 23;
|
| 28 |
sysadm |
1.2 |
long BBS_max_client = 256;
|
| 29 |
|
|
long BBS_max_user = 10000;
|
| 30 |
sysadm |
1.6 |
char BBS_start_dt[50] = "2004�� 1�� 1��";
|
| 31 |
sysadm |
1.3 |
|
| 32 |
sysadm |
1.4 |
char BBS_username[BBS_max_username_length];
|
| 33 |
sysadm |
1.3 |
BBS_user_priv BBS_priv;
|
| 34 |
|
|
int BBS_passwd_complex = 0;
|
| 35 |
sysadm |
1.5 |
int BBS_user_money = 0;
|
| 36 |
sysadm |
1.3 |
|
| 37 |
|
|
time_t BBS_login_tm;
|
| 38 |
|
|
time_t BBS_last_access_tm;
|
| 39 |
|
|
time_t BBS_last_sub_tm;
|
| 40 |
sysadm |
1.4 |
|
| 41 |
|
|
char BBS_current_section_name[20];
|
| 42 |
sysadm |
1.6 |
|
| 43 |
|
|
char *
|
| 44 |
|
|
setuserfile (char *buf, const char *filename)
|
| 45 |
|
|
{
|
| 46 |
|
|
sprintf (buf, "data/%s/%ld", filename, BBS_priv.uid);
|
| 47 |
|
|
return buf;
|
| 48 |
|
|
}
|
| 49 |
|
|
|
| 50 |
|
|
char *
|
| 51 |
|
|
sethomefile (char *buf, long int uid, char *filename) {
|
| 52 |
|
|
sprintf (buf, "data/%s/%ld", filename, uid);
|
| 53 |
|
|
return buf;
|
| 54 |
|
|
}
|