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

Diff of /lbbs/src/init.c

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

Revision 1.30 by sysadm, Fri Oct 10 01:55:06 2025 UTC Revision 1.33 by sysadm, Tue Nov 4 14:58:56 2025 UTC
# Line 1  Line 1 
1  /***************************************************************************  /* SPDX-License-Identifier: GPL-3.0-or-later */
2                                                    init.c  -  description  /*
3                                                           -------------------   * init
4          Copyright            : (C) 2004-2025 by Leaflet   *   - initializer of server daemon
5          Email                : leaflet@leafok.com   *
6   ***************************************************************************/   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>
7     */
 /***************************************************************************  
  *                                                                         *  
  *   This program is free software; you can redistribute it and/or modify  *  
  *   it under the terms of the GNU General Public License as published by  *  
  *   the Free Software Foundation; either version 3 of the License, or     *  
  *   (at your option) any later version.                                   *  
  *                                                                         *  
  ***************************************************************************/  
8    
9  #include "bbs.h"  #include "bbs.h"
10  #include "common.h"  #include "common.h"
# Line 155  int load_conf(const char *conf_file) Line 147  int load_conf(const char *conf_file)
147                                  BBS_max_client_per_ip = MAX_CLIENT_PER_IP_LIMIT;                                  BBS_max_client_per_ip = MAX_CLIENT_PER_IP_LIMIT;
148                          }                          }
149                  }                  }
                 else if (strcasecmp(p, "bbs_max_user") == 0)  
                 {  
                         BBS_max_user = atoi(q);  
                         if (BBS_max_user <= 0 || BBS_max_user > BBS_MAX_USER_LIMIT)  
                         {  
                                 log_error("Ignore config bbs_max_client with incorrect value %d\n", BBS_max_user);  
                                 BBS_max_user = BBS_MAX_USER_LIMIT;  
                         }  
                 }  
150                  else if (strcasecmp(p, "bbs_start_dt") == 0)                  else if (strcasecmp(p, "bbs_start_dt") == 0)
151                  {                  {
152                          y = strtok_r(q, "-", &saveptr);                          y = strtok_r(q, "-", &saveptr);
# Line 180  int load_conf(const char *conf_file) Line 163  int load_conf(const char *conf_file)
163                  else if (strcasecmp(p, "bbs_sys_id") == 0)                  else if (strcasecmp(p, "bbs_sys_id") == 0)
164                  {                  {
165                          v = atoi(q);                          v = atoi(q);
166                          if (v <= 0 || v > BBS_MAX_USER_LIMIT)                          if (v <= 0)
167                          {                          {
168                                  log_error("Ignore config bbs_sys_id with incorrect value %d\n", v);                                  log_error("Ignore config bbs_sys_id with incorrect value %d\n", v);
169                                  continue;                                  continue;


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

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