X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fconf.h;h=371f94db64233155d2169f16093d93e5df470195;hp=e4ff606430bdb15c6e04cfbbac6f56064a8f8f33;hb=47ca178a219d682c589b27e64ee1a4e936cc7bdc;hpb=326607eea1189ede39eaebeda1661b299ef564cc diff --git a/src/ngircd/conf.h b/src/ngircd/conf.h index e4ff6064..371f94db 100644 --- a/src/ngircd/conf.h +++ b/src/ngircd/conf.h @@ -8,7 +8,7 @@ * (at your option) any later version. * Please read the file COPYING, README and AUTHORS for more information. * - * $Id: conf.h,v 1.34 2005/03/20 13:54:06 fw Exp $ + * $Id: conf.h,v 1.45 2007/11/21 12:16:36 alex Exp $ * * Configuration management (header) */ @@ -20,6 +20,7 @@ #include #include "defines.h" +#include "array.h" #include "portab.h" typedef struct _Conf_Oper @@ -39,7 +40,7 @@ typedef struct _Conf_Server UINT16 port; /* Server port */ int group; /* Group of server */ time_t lasttry; /* Last connect attempt */ - RES_STAT *res_stat; /* Status of the resolver */ + RES_STAT res_stat; /* Status of the resolver */ int flags; /* Flags */ CONN_ID conn_id; /* ID of server connection or NONE */ } CONF_SERVER; @@ -48,7 +49,9 @@ typedef struct _Conf_Channel { char name[CHANNEL_NAME_LEN]; /* Name of the channel */ char modes[CHANNEL_MODE_LEN]; /* Initial channel modes */ - char topic[CHANNEL_TOPIC_LEN]; /* Initial topic */ + char key[CLIENT_PASS_LEN]; /* Channel key ("password", mode "k" ) */ + unsigned long maxusers; /* maximum usercount for this channel, mode "l" */ + array topic; /* Initial topic */ } CONF_CHANNEL; @@ -77,15 +80,14 @@ GLOBAL char Conf_MotdFile[FNAME_LEN]; GLOBAL char Conf_MotdPhrase[LINE_LEN]; /* Ports the server should listen on */ -GLOBAL UINT16 Conf_ListenPorts[MAX_LISTEN_PORTS]; -GLOBAL int Conf_ListenPorts_Count; +GLOBAL array Conf_ListenPorts; /* Address to which the socket should be bound or empty (=all) */ GLOBAL char Conf_ListenAddress[16]; /* User and group ID the server should run with */ -GLOBAL unsigned int Conf_UID; -GLOBAL unsigned int Conf_GID; +GLOBAL uid_t Conf_UID; +GLOBAL gid_t Conf_GID; /* A directory to chroot() in */ GLOBAL char Conf_Chroot[FNAME_LEN]; @@ -102,18 +104,23 @@ GLOBAL int Conf_ConnectRetry; /* Operators */ GLOBAL CONF_OPER Conf_Oper[MAX_OPERATORS]; -GLOBAL int Conf_Oper_Count; +GLOBAL unsigned int Conf_Oper_Count; /* Servers */ GLOBAL CONF_SERVER Conf_Server[MAX_SERVERS]; /* Pre-defined channels */ GLOBAL CONF_CHANNEL Conf_Channel[MAX_DEFCHANNELS]; -GLOBAL int Conf_Channel_Count; +GLOBAL unsigned int Conf_Channel_Count; +/* Pre-defined channels only */ +GLOBAL bool Conf_PredefChannelsOnly; /* Are IRC operators allowed to always use MODE? */ GLOBAL bool Conf_OperCanMode; +/* Disable all DNS functions? */ +GLOBAL bool Conf_NoDNS; + /* If an IRC op gives chanop privileges without being a chanop, * ircd2 will ignore the command. This enables a workaround: * It masks the command as coming from the server */ @@ -128,16 +135,19 @@ GLOBAL int Conf_MaxJoins; /* Maximum number of connections per IP address */ GLOBAL int Conf_MaxConnectionsIP; +/* Maximum length of a nick name */ +GLOBAL unsigned int Conf_MaxNickLength; -GLOBAL void Conf_Init PARAMS((void )); -GLOBAL void Conf_Rehash PARAMS((void )); -GLOBAL int Conf_Test PARAMS((void )); +GLOBAL void Conf_Init PARAMS((void)); +GLOBAL void Conf_Rehash PARAMS((void)); +GLOBAL int Conf_Test PARAMS((void)); GLOBAL void Conf_UnsetServer PARAMS(( CONN_ID Idx )); GLOBAL void Conf_SetServer PARAMS(( int ConfServer, CONN_ID Idx )); GLOBAL int Conf_GetServer PARAMS(( CONN_ID Idx )); GLOBAL bool Conf_EnableServer PARAMS(( char *Name, UINT16 Port )); +GLOBAL bool Conf_EnablePassiveServer PARAMS((const char *Name)); GLOBAL bool Conf_DisableServer PARAMS(( char *Name )); GLOBAL bool Conf_AddServer PARAMS(( char *Name, UINT16 Port, char *Host, char *MyPwd, char *PeerPwd ));