/* * This file is part of uIRCd. (https://git.redxen.eu/caskd/uIRCd) * Copyright (c) 2019, 2020 Alex-David Denes * * uIRCd 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 * any later version. * * uIRCd is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with uIRCd. If not, see . */ #ifdef UIRCD_FEATURE_LIBCONFIG #include // config_t config_setting_t config_init() ... #endif /* UIRCD_FEATURE_LIBCONFIG */ #include "connection.h" #ifndef UIRCD_GUARD_CONFIGURATION #define UIRCD_GUARD_CONFIGURATION #define UIRCD_DEFAULT_ADDR "localhost" #define UIRCD_DEFAULT_PORT "6667" #define UIRCD_DEFAULT_NICK "uirc-user" #define UIRCD_DEFAULT_USER "uIRC-user" #define UIRCD_DEFAULT_REAL "uIRC user" #define UIRCD_DEFAULT_QUITMSG "uIRCd " UIRCD_VERSION typedef struct { const char* str; char** save; } Mapping; #ifdef UIRCD_FEATURE_LIBCONFIG int parse_configfile(char* config_path, Connection* conn); void mapconf(config_setting_t* setting, Mapping* mapping, unsigned long len); #endif /* UIRCD_FEATURE_LIBCONFIG */ int set_config_defaults(Connection* conn); #endif /* UIRCD_GUARD_CONFIGURATION */