/[LeafOK_CVS]/lbbs/src/bbs.c
ViewVC logotype

Contents of /lbbs/src/bbs.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.27 - (show annotations)
Wed Oct 1 02:21:15 2025 UTC (5 months, 2 weeks ago) by sysadm
Branch: MAIN
Changes since 1.26: +1 -0 lines
Content type: text/x-csrc
Refine user_online_update()

1 /***************************************************************************
2 bbs.c - description
3 -------------------
4 Copyright : (C) 2004-2025 by Leaflet
5 Email : leaflet@leafok.com
6 ***************************************************************************/
7
8 /***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 3 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17 #include "bbs.h"
18 #include "common.h"
19 #include "user_priv.h"
20 #include <stdio.h>
21 #include <signal.h>
22 #include <time.h>
23
24 #define BBS_port_default 23
25 #define BBS_ssh_port_default 22
26
27 // BBS enviroment
28 char BBS_id[BBS_id_max_len + 1] = "Example BBS";
29 char BBS_name[BBS_name_max_len + 1] = "Example Site Name";
30 char BBS_server[BBS_server_max_len + 1] = "bbs.example.com";
31 char BBS_address[BBS_address_max_len + 1] = "0.0.0.0";
32 in_port_t BBS_port[2] = {BBS_port_default, BBS_ssh_port_default};
33 int BBS_max_client = MAX_CLIENT_LIMIT;
34 int BBS_max_client_per_ip = MAX_CLIENT_PER_IP_LIMIT;
35 int BBS_max_user = BBS_MAX_USER_LIMIT;
36 char BBS_start_dt[BBS_start_dt_max_len + 1] = "2000年 1月 1日";
37
38 char BBS_username[BBS_username_max_len + 1];
39 char BBS_nickname[BBS_nickname_max_len + 1];
40 char BBS_user_tz[BBS_user_tz_max_len + 1];
41 int BBS_user_exp;
42
43 time_t BBS_login_tm;
44 time_t BBS_last_access_tm;
45
46 char BBS_current_action[BBS_current_action_max_len + 1];
47 time_t BBS_current_action_tm;
48
49 char *setuserfile(char *buf, size_t len, const char *filename)
50 {
51 snprintf(buf, len, "%s/%d", filename, BBS_priv.uid);
52 return buf;
53 }

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1