diff options
Diffstat (limited to 'config_load.h')
-rw-r--r-- | config_load.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/config_load.h b/config_load.h new file mode 100644 index 0000000..8d32ed7 --- /dev/null +++ b/config_load.h @@ -0,0 +1,40 @@ +#ifndef __CONFIG_LOAD_H +#define __CONFIG_LOAD_H + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + + +#include "arg.h" +#include "iniparser.h" +#include "debug.h" + +#include "config_servers.h" +#include "sds.h" +#include "util.h" + +typedef struct config_ini { + dictionary *ini; //dict with configs +} config_ini; + +/* +Load config file to dict +config should be NULL +*/ +int config_load_ini(char *ini_fname, config_ini **config); +/* +How many servers there are to be configured,count +*/ +int config_server_num(config_ini *config); +/* +server_conf should be preallocated +*/ +int config_get_irc_config(config_ini *config, int n, irc_server_conf *server_conf); +/* +free internal structures +*/ +void config_free(config_ini *config); + + +#endif
\ No newline at end of file |