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

Annotation of /lbbs/src/bbs.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.30 - (hide annotations)
Wed Oct 22 04:48:53 2025 UTC (4 months, 3 weeks ago) by sysadm
Branch: MAIN
Changes since 1.29: +9 -0 lines
Content type: text/x-csrc
Add user_online_list

1 sysadm 1.1 /***************************************************************************
2 sysadm 1.8 bbs.c - description
3     -------------------
4 sysadm 1.15 Copyright : (C) 2004-2025 by Leaflet
5     Email : leaflet@leafok.com
6 sysadm 1.1 ***************************************************************************/
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 sysadm 1.15 * the Free Software Foundation; either version 3 of the License, or *
13 sysadm 1.1 * (at your option) any later version. *
14     * *
15     ***************************************************************************/
16    
17 sysadm 1.3 #include "bbs.h"
18 sysadm 1.20 #include "common.h"
19 sysadm 1.10 #include "user_priv.h"
20     #include <stdio.h>
21 sysadm 1.7 #include <signal.h>
22 sysadm 1.3 #include <time.h>
23    
24 sysadm 1.22 #define BBS_port_default 23
25     #define BBS_ssh_port_default 22
26    
27 sysadm 1.8 // BBS enviroment
28 sysadm 1.20 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 sysadm 1.22 in_port_t BBS_port[2] = {BBS_port_default, BBS_ssh_port_default};
33 sysadm 1.20 int BBS_max_client = MAX_CLIENT_LIMIT;
34     int BBS_max_client_per_ip = MAX_CLIENT_PER_IP_LIMIT;
35 sysadm 1.26 char BBS_start_dt[BBS_start_dt_max_len + 1] = "2000年 1月 1日";
36 sysadm 1.28 int BBS_sys_id = 1;
37 sysadm 1.3
38 sysadm 1.30 const int BBS_section_list_load_interval = 5; // second
39    
40     // User
41     const int BBS_user_list_load_interval = 60; // second
42     const int BBS_user_online_list_load_interval = 5; // second
43     const int BBS_user_off_line = 900; // 15 minutes
44    
45 sysadm 1.11 char BBS_username[BBS_username_max_len + 1];
46 sysadm 1.24 char BBS_nickname[BBS_nickname_max_len + 1];
47 sysadm 1.17 char BBS_user_tz[BBS_user_tz_max_len + 1];
48 sysadm 1.24 int BBS_user_exp;
49 sysadm 1.3
50     time_t BBS_login_tm;
51     time_t BBS_last_access_tm;
52 sysadm 1.4
53 sysadm 1.25 char BBS_current_action[BBS_current_action_max_len + 1];
54 sysadm 1.27 time_t BBS_current_action_tm;
55 sysadm 1.6
56 sysadm 1.30 const int BBS_current_action_refresh_interval = 60; // 1 minute
57    
58 sysadm 1.13 char *setuserfile(char *buf, size_t len, const char *filename)
59 sysadm 1.6 {
60 sysadm 1.23 snprintf(buf, len, "%s/%d", filename, BBS_priv.uid);
61 sysadm 1.8 return buf;
62 sysadm 1.6 }

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