2 * ngIRCd -- The Next Generation IRC Daemon
3 * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 * Please read the file COPYING, README and AUTHORS for more information.
11 * $Id: conf.h,v 1.25 2002/12/30 00:01:45 alex Exp $
13 * Configuration management (header)
25 typedef struct _Conf_Oper
27 CHAR name[CLIENT_PASS_LEN]; /* Name (ID) of IRC operator */
28 CHAR pwd[CLIENT_PASS_LEN]; /* Password */
31 typedef struct _Conf_Server
33 CHAR host[HOST_LEN]; /* Hostname */
34 CHAR ip[16]; /* IP address (Resolver) */
35 CHAR name[CLIENT_ID_LEN]; /* IRC-Client-ID */
36 CHAR pwd_in[CLIENT_PASS_LEN]; /* Password which must be received */
37 CHAR pwd_out[CLIENT_PASS_LEN]; /* Password to send to peer */
38 INT port; /* Server port */
39 INT group; /* Group of server */
40 time_t lasttry; /* Last connect attempt */
41 RES_STAT *res_stat; /* Status of the resolver */
42 BOOLEAN once; /* This server is valid only once */
43 CONN_ID conn_id; /* ID of server connection or NONE */
46 typedef struct _Conf_Channel
48 CHAR name[CHANNEL_NAME_LEN]; /* Name of the channel */
49 CHAR modes[CHANNEL_MODE_LEN]; /* Initial channel modes */
50 CHAR topic[CHANNEL_TOPIC_LEN]; /* Initial topic */
54 /* Name ("Nick") of the servers */
55 GLOBAL CHAR Conf_ServerName[CLIENT_ID_LEN];
57 /* Server info text */
58 GLOBAL CHAR Conf_ServerInfo[CLIENT_INFO_LEN];
60 /* Global server passwort */
61 GLOBAL CHAR Conf_ServerPwd[CLIENT_PASS_LEN];
63 /* Administrative information */
64 GLOBAL CHAR Conf_ServerAdmin1[CLIENT_INFO_LEN];
65 GLOBAL CHAR Conf_ServerAdmin2[CLIENT_INFO_LEN];
66 GLOBAL CHAR Conf_ServerAdminMail[CLIENT_INFO_LEN];
68 /* File with MOTD text */
69 GLOBAL CHAR Conf_MotdFile[FNAME_LEN];
71 /* Ports the server should listen on */
72 GLOBAL UINT Conf_ListenPorts[MAX_LISTEN_PORTS];
73 GLOBAL INT Conf_ListenPorts_Count;
75 /* User and group ID the server should run with */
79 /* Timeouts for PING and PONG */
80 GLOBAL INT Conf_PingTimeout;
81 GLOBAL INT Conf_PongTimeout;
83 /* Seconds between connect attempts to other servers */
84 GLOBAL INT Conf_ConnectRetry;
87 GLOBAL CONF_OPER Conf_Oper[MAX_OPERATORS];
88 GLOBAL INT Conf_Oper_Count;
91 GLOBAL CONF_SERVER Conf_Server[MAX_SERVERS];
93 /* Pre-defined channels */
94 GLOBAL CONF_CHANNEL Conf_Channel[MAX_DEFCHANNELS];
95 GLOBAL INT Conf_Channel_Count;
97 /* Are IRC operators allowed to always use MODE? */
98 GLOBAL BOOLEAN Conf_OperCanMode;
100 /* Maximum number of connections to this server */
101 GLOBAL LONG Conf_MaxConnections;
103 /* Maximum number of channels a user can join */
104 GLOBAL INT Conf_MaxJoins;
107 GLOBAL VOID Conf_Init PARAMS((VOID ));
108 GLOBAL VOID Conf_Rehash PARAMS((VOID ));
109 GLOBAL INT Conf_Test PARAMS((VOID ));
111 GLOBAL VOID Conf_UnsetServer PARAMS(( CONN_ID Idx ));
112 GLOBAL VOID Conf_SetServer PARAMS(( INT ConfServer, CONN_ID Idx ));
113 GLOBAL INT Conf_GetServer PARAMS(( CONN_ID Idx ));