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

Diff of /lbbs/src/bbs.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.17 by sysadm, Mon May 26 12:06:05 2025 UTC Revision 1.30 by sysadm, Wed Oct 22 04:48:53 2025 UTC
# Line 15  Line 15 
15   ***************************************************************************/   ***************************************************************************/
16    
17  #include "bbs.h"  #include "bbs.h"
18    #include "common.h"
19  #include "user_priv.h"  #include "user_priv.h"
20  #include <stdio.h>  #include <stdio.h>
21  #include <signal.h>  #include <signal.h>
22  #include <time.h>  #include <time.h>
23    
24    #define BBS_port_default 23
25    #define BBS_ssh_port_default 22
26    
27  // BBS enviroment  // BBS enviroment
28  char BBS_id[20] = "";  char BBS_id[BBS_id_max_len + 1] = "Example BBS";
29  char BBS_name[50] = "";  char BBS_name[BBS_name_max_len + 1] = "Example Site Name";
30  char BBS_server[256] = "";  char BBS_server[BBS_server_max_len + 1] = "bbs.example.com";
31  char BBS_address[50] = "";  char BBS_address[BBS_address_max_len + 1] = "0.0.0.0";
32  in_port_t BBS_port = 23;  in_port_t BBS_port[2] = {BBS_port_default, BBS_ssh_port_default};
33  unsigned int BBS_max_client = 256;  int BBS_max_client = MAX_CLIENT_LIMIT;
34  unsigned int BBS_max_user = 10000;  int BBS_max_client_per_ip = MAX_CLIENT_PER_IP_LIMIT;
35  char BBS_start_dt[50] = "2004Äê 1Ô 1ÈÕ";  char BBS_start_dt[BBS_start_dt_max_len + 1] = "2000å¹´ 1月 1æ—¥";
36    int BBS_sys_id = 1;
37    
38    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  char BBS_username[BBS_username_max_len + 1];  char BBS_username[BBS_username_max_len + 1];
46    char BBS_nickname[BBS_nickname_max_len + 1];
47  char BBS_user_tz[BBS_user_tz_max_len + 1];  char BBS_user_tz[BBS_user_tz_max_len + 1];
48    int BBS_user_exp;
49    
50  time_t BBS_login_tm;  time_t BBS_login_tm;
51  time_t BBS_last_access_tm;  time_t BBS_last_access_tm;
52    
53  char BBS_current_section_name[BBS_section_name_max_len + 1];  char BBS_current_action[BBS_current_action_max_len + 1];
54    time_t BBS_current_action_tm;
55    
56    const int BBS_current_action_refresh_interval = 60; // 1 minute
57    
58  char *setuserfile(char *buf, size_t len, const char *filename)  char *setuserfile(char *buf, size_t len, const char *filename)
59  {  {
60          snprintf(buf, len, "%s/%ld", filename, BBS_priv.uid);          snprintf(buf, len, "%s/%d", filename, BBS_priv.uid);
61          return buf;          return buf;
62  }  }


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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