| 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" |
| 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); |
| 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; |