2001-12-12 18:18:20 +01:00
|
|
|
/*
|
|
|
|
* ngIRCd -- The Next Generation IRC Daemon
|
2002-01-02 03:44:36 +01:00
|
|
|
* Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
|
2001-12-12 18:18:20 +01:00
|
|
|
*
|
2002-12-12 12:26:08 +01:00
|
|
|
* 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 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
* Please read the file COPYING, README and AUTHORS for more information.
|
2001-12-12 18:18:20 +01:00
|
|
|
*
|
2002-12-30 01:01:42 +01:00
|
|
|
* $Id: conf.h,v 1.25 2002/12/30 00:01:45 alex Exp $
|
2001-12-12 18:18:20 +01:00
|
|
|
*
|
2002-12-12 12:26:08 +01:00
|
|
|
* Configuration management (header)
|
2001-12-12 18:18:20 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef __conf_h__
|
|
|
|
#define __conf_h__
|
|
|
|
|
2002-01-02 03:44:36 +01:00
|
|
|
#include <time.h>
|
|
|
|
|
2002-03-12 15:37:51 +01:00
|
|
|
#include "defines.h"
|
2002-02-28 00:23:53 +01:00
|
|
|
|
2002-01-02 03:44:36 +01:00
|
|
|
|
|
|
|
typedef struct _Conf_Oper
|
|
|
|
{
|
2002-12-12 12:26:08 +01:00
|
|
|
CHAR name[CLIENT_PASS_LEN]; /* Name (ID) of IRC operator */
|
|
|
|
CHAR pwd[CLIENT_PASS_LEN]; /* Password */
|
2002-01-02 03:44:36 +01:00
|
|
|
} CONF_OPER;
|
|
|
|
|
|
|
|
typedef struct _Conf_Server
|
|
|
|
{
|
2002-03-10 18:50:48 +01:00
|
|
|
CHAR host[HOST_LEN]; /* Hostname */
|
2002-12-12 12:26:08 +01:00
|
|
|
CHAR ip[16]; /* IP address (Resolver) */
|
2002-03-10 18:50:48 +01:00
|
|
|
CHAR name[CLIENT_ID_LEN]; /* IRC-Client-ID */
|
2002-12-12 12:26:08 +01:00
|
|
|
CHAR pwd_in[CLIENT_PASS_LEN]; /* Password which must be received */
|
|
|
|
CHAR pwd_out[CLIENT_PASS_LEN]; /* Password to send to peer */
|
|
|
|
INT port; /* Server port */
|
|
|
|
INT group; /* Group of server */
|
|
|
|
time_t lasttry; /* Last connect attempt */
|
|
|
|
RES_STAT *res_stat; /* Status of the resolver */
|
2002-12-30 01:01:42 +01:00
|
|
|
BOOLEAN once; /* This server is valid only once */
|
|
|
|
CONN_ID conn_id; /* ID of server connection or NONE */
|
2002-01-02 03:44:36 +01:00
|
|
|
} CONF_SERVER;
|
|
|
|
|
2002-05-21 02:10:16 +02:00
|
|
|
typedef struct _Conf_Channel
|
|
|
|
{
|
2002-12-12 12:26:08 +01:00
|
|
|
CHAR name[CHANNEL_NAME_LEN]; /* Name of the channel */
|
|
|
|
CHAR modes[CHANNEL_MODE_LEN]; /* Initial channel modes */
|
|
|
|
CHAR topic[CHANNEL_TOPIC_LEN]; /* Initial topic */
|
2002-05-21 02:10:16 +02:00
|
|
|
} CONF_CHANNEL;
|
|
|
|
|
2002-01-02 03:44:36 +01:00
|
|
|
|
2002-12-12 12:26:08 +01:00
|
|
|
/* Name ("Nick") of the servers */
|
2002-01-02 03:44:36 +01:00
|
|
|
GLOBAL CHAR Conf_ServerName[CLIENT_ID_LEN];
|
|
|
|
|
2002-12-12 12:26:08 +01:00
|
|
|
/* Server info text */
|
2002-01-02 03:44:36 +01:00
|
|
|
GLOBAL CHAR Conf_ServerInfo[CLIENT_INFO_LEN];
|
2001-12-12 18:18:20 +01:00
|
|
|
|
2002-12-12 12:26:08 +01:00
|
|
|
/* Global server passwort */
|
2002-01-03 03:27:20 +01:00
|
|
|
GLOBAL CHAR Conf_ServerPwd[CLIENT_PASS_LEN];
|
|
|
|
|
2002-12-12 12:26:08 +01:00
|
|
|
/* Administrative information */
|
2002-09-16 11:13:40 +02:00
|
|
|
GLOBAL CHAR Conf_ServerAdmin1[CLIENT_INFO_LEN];
|
|
|
|
GLOBAL CHAR Conf_ServerAdmin2[CLIENT_INFO_LEN];
|
|
|
|
GLOBAL CHAR Conf_ServerAdminMail[CLIENT_INFO_LEN];
|
|
|
|
|
2002-12-12 12:26:08 +01:00
|
|
|
/* File with MOTD text */
|
2002-01-02 03:44:36 +01:00
|
|
|
GLOBAL CHAR Conf_MotdFile[FNAME_LEN];
|
2001-12-26 23:48:53 +01:00
|
|
|
|
2002-12-12 12:26:08 +01:00
|
|
|
/* Ports the server should listen on */
|
2002-03-29 23:53:59 +01:00
|
|
|
GLOBAL UINT Conf_ListenPorts[MAX_LISTEN_PORTS];
|
2002-01-02 03:44:36 +01:00
|
|
|
GLOBAL INT Conf_ListenPorts_Count;
|
2001-12-26 23:48:53 +01:00
|
|
|
|
2002-12-12 12:26:08 +01:00
|
|
|
/* User and group ID the server should run with */
|
2002-03-29 23:53:59 +01:00
|
|
|
GLOBAL UINT Conf_UID;
|
|
|
|
GLOBAL UINT Conf_GID;
|
|
|
|
|
2002-12-12 12:26:08 +01:00
|
|
|
/* Timeouts for PING and PONG */
|
2002-01-02 03:44:36 +01:00
|
|
|
GLOBAL INT Conf_PingTimeout;
|
|
|
|
GLOBAL INT Conf_PongTimeout;
|
2001-12-26 23:48:53 +01:00
|
|
|
|
2002-12-12 12:26:08 +01:00
|
|
|
/* Seconds between connect attempts to other servers */
|
2002-01-02 03:44:36 +01:00
|
|
|
GLOBAL INT Conf_ConnectRetry;
|
2001-12-26 23:48:53 +01:00
|
|
|
|
2002-12-12 12:26:08 +01:00
|
|
|
/* Operators */
|
2002-01-02 03:44:36 +01:00
|
|
|
GLOBAL CONF_OPER Conf_Oper[MAX_OPERATORS];
|
|
|
|
GLOBAL INT Conf_Oper_Count;
|
2001-12-31 03:18:51 +01:00
|
|
|
|
2002-12-12 12:26:08 +01:00
|
|
|
/* Servers */
|
2002-01-02 03:44:36 +01:00
|
|
|
GLOBAL CONF_SERVER Conf_Server[MAX_SERVERS];
|
2001-12-26 04:19:57 +01:00
|
|
|
|
2002-12-12 12:26:08 +01:00
|
|
|
/* Pre-defined channels */
|
2002-05-21 02:10:16 +02:00
|
|
|
GLOBAL CONF_CHANNEL Conf_Channel[MAX_DEFCHANNELS];
|
|
|
|
GLOBAL INT Conf_Channel_Count;
|
|
|
|
|
2002-12-12 12:26:08 +01:00
|
|
|
/* Are IRC operators allowed to always use MODE? */
|
2002-09-02 16:59:17 +02:00
|
|
|
GLOBAL BOOLEAN Conf_OperCanMode;
|
2001-12-26 04:19:57 +01:00
|
|
|
|
2002-12-12 12:26:08 +01:00
|
|
|
/* Maximum number of connections to this server */
|
2002-11-02 23:58:41 +01:00
|
|
|
GLOBAL LONG Conf_MaxConnections;
|
|
|
|
|
2002-12-13 18:32:33 +01:00
|
|
|
/* Maximum number of channels a user can join */
|
|
|
|
GLOBAL INT Conf_MaxJoins;
|
|
|
|
|
2002-11-02 23:58:41 +01:00
|
|
|
|
2002-05-27 15:09:26 +02:00
|
|
|
GLOBAL VOID Conf_Init PARAMS((VOID ));
|
2002-12-30 01:01:42 +01:00
|
|
|
GLOBAL VOID Conf_Rehash PARAMS((VOID ));
|
2002-05-27 15:09:26 +02:00
|
|
|
GLOBAL INT Conf_Test PARAMS((VOID ));
|
2001-12-12 18:18:20 +01:00
|
|
|
|
2002-12-30 01:01:42 +01:00
|
|
|
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 ));
|
|
|
|
|
2001-12-12 18:18:20 +01:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/* -eof- */
|