2 cbc1e59f 2001-12-12 alex * ngIRCd -- The Next Generation IRC Daemon
3 03d971d9 2002-01-02 alex * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
5 cbc1e59f 2001-12-12 alex * Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
6 cbc1e59f 2001-12-12 alex * der GNU General Public License (GPL), wie von der Free Software Foundation
7 cbc1e59f 2001-12-12 alex * herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2
8 cbc1e59f 2001-12-12 alex * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version.
9 cbc1e59f 2001-12-12 alex * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
10 804b1ec4 2001-12-31 alex * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
12 f86083a0 2002-03-27 alex * $Id: conf.c,v 1.21 2002/03/27 16:39:22 alex Exp $
14 cbc1e59f 2001-12-12 alex * conf.h: Konfiguration des ngircd
18 ca33cbda 2002-03-12 alex #include "portab.h"
20 ca33cbda 2002-03-12 alex #include "imp.h"
21 cbc1e59f 2001-12-12 alex #include <assert.h>
22 9856253d 2001-12-30 alex #include <errno.h>
23 f86083a0 2002-03-27 alex #include <stdarg.h>
24 9856253d 2001-12-30 alex #include <stdio.h>
25 b20fa7c6 2002-01-01 alex #include <stdlib.h>
26 9856253d 2001-12-30 alex #include <string.h>
27 f86083a0 2002-03-27 alex #include <unistd.h>
29 f86083a0 2002-03-27 alex #include "ngircd.h"
30 9856253d 2001-12-30 alex #include "client.h"
31 ca33cbda 2002-03-12 alex #include "defines.h"
32 9856253d 2001-12-30 alex #include "log.h"
33 9856253d 2001-12-30 alex #include "tool.h"
35 ca33cbda 2002-03-12 alex #include "exp.h"
36 cbc1e59f 2001-12-12 alex #include "conf.h"
39 f86083a0 2002-03-27 alex LOCAL BOOLEAN Use_Log = TRUE;
42 f86083a0 2002-03-27 alex LOCAL VOID Set_Defaults( VOID );
43 574ae82c 2001-12-26 alex LOCAL VOID Read_Config( VOID );
44 f86083a0 2002-03-27 alex LOCAL VOID Validate_Config( VOID );
46 03d971d9 2002-01-02 alex GLOBAL VOID Handle_GLOBAL( INT Line, CHAR *Var, CHAR *Arg );
47 03d971d9 2002-01-02 alex GLOBAL VOID Handle_OPERATOR( INT Line, CHAR *Var, CHAR *Arg );
48 03d971d9 2002-01-02 alex GLOBAL VOID Handle_SERVER( INT Line, CHAR *Var, CHAR *Arg );
50 f86083a0 2002-03-27 alex LOCAL VOID Config_Error( CONST INT Level, CONST CHAR *Format, ... );
53 cbc1e59f 2001-12-12 alex GLOBAL VOID Conf_Init( VOID )
55 f86083a0 2002-03-27 alex Set_Defaults( );
56 f86083a0 2002-03-27 alex Read_Config( );
57 f86083a0 2002-03-27 alex Validate_Config( );
58 f86083a0 2002-03-27 alex } /* Config_Init */
61 f86083a0 2002-03-27 alex GLOBAL INT Conf_Test( VOID )
63 f86083a0 2002-03-27 alex /* Konfiguration einlesen, ueberpruefen und ausgeben. */
67 f86083a0 2002-03-27 alex Use_Log = FALSE;
68 f86083a0 2002-03-27 alex Set_Defaults( );
70 f86083a0 2002-03-27 alex printf( "Using \"%s\" as configuration file ...\n", NGIRCd_ConfFile );
71 f86083a0 2002-03-27 alex Read_Config( );
73 f86083a0 2002-03-27 alex /* Wenn stdin ein ein TTY ist: auf Taste warten */
74 f86083a0 2002-03-27 alex if( isatty( fileno( stdout )))
76 f86083a0 2002-03-27 alex puts( "OK, press enter to see a dump of your service configuration ..." );
79 f86083a0 2002-03-27 alex else puts( "Ok, dump of your server configuration follows:\n" );
81 f86083a0 2002-03-27 alex puts( "[GLOBAL]" );
82 f86083a0 2002-03-27 alex printf( " ServerName = %s\n", Conf_ServerName );
83 f86083a0 2002-03-27 alex printf( " ServerInfo = %s\n", Conf_ServerInfo );
84 f86083a0 2002-03-27 alex printf( " ServerPwd = %s\n", Conf_ServerPwd );
85 f86083a0 2002-03-27 alex printf( " MotdFile = %s\n", Conf_MotdFile );
86 f86083a0 2002-03-27 alex printf( " ListenPorts = " );
87 f86083a0 2002-03-27 alex for( i = 0; i < Conf_ListenPorts_Count; i++ )
89 f86083a0 2002-03-27 alex if( i != 0 ) printf( ", " );
90 f86083a0 2002-03-27 alex printf( "%d", Conf_ListenPorts[i] );
92 f86083a0 2002-03-27 alex if( Conf_ListenPorts_Count < 1 ) puts( "<none>");
93 f86083a0 2002-03-27 alex else puts( "" );
94 f86083a0 2002-03-27 alex printf( " PingTimeout = %d\n", Conf_PingTimeout );
95 f86083a0 2002-03-27 alex printf( " PongTimeout = %d\n", Conf_PongTimeout );
96 f86083a0 2002-03-27 alex printf( " ConnectRetry = %d\n", Conf_ConnectRetry );
99 f86083a0 2002-03-27 alex for( i = 0; i < Conf_Oper_Count; i++ )
101 f86083a0 2002-03-27 alex puts( "[OPERATOR]" );
102 f86083a0 2002-03-27 alex printf( " Name = %s\n", Conf_Oper[i].name );
103 f86083a0 2002-03-27 alex printf( " Password = %s\n", Conf_Oper[i].pwd );
104 f86083a0 2002-03-27 alex puts( "" );
107 f86083a0 2002-03-27 alex for( i = 0; i < Conf_Server_Count; i++ )
109 f86083a0 2002-03-27 alex puts( "[SERVER]" );
110 f86083a0 2002-03-27 alex printf( " Name = %s\n", Conf_Server[i].name );
111 f86083a0 2002-03-27 alex printf( " Host = %s\n", Conf_Server[i].host );
112 f86083a0 2002-03-27 alex printf( " Port = %d\n", Conf_Server[i].port );
113 f86083a0 2002-03-27 alex printf( " Password = %s\n", Conf_Server[i].pwd );
114 f86083a0 2002-03-27 alex printf( " Group = %d\n", Conf_Server[i].group );
115 f86083a0 2002-03-27 alex puts( "" );
119 f86083a0 2002-03-27 alex } /* Conf_Test */
122 f86083a0 2002-03-27 alex GLOBAL VOID Conf_Exit( VOID )
125 f86083a0 2002-03-27 alex } /* Config_Exit */
128 f86083a0 2002-03-27 alex LOCAL VOID Set_Defaults( VOID )
130 f86083a0 2002-03-27 alex /* Konfigurationsvariablen initialisieren, d.h. auf Default-Werte setzen. */
132 9856253d 2001-12-30 alex strcpy( Conf_ServerName, "" );
133 804b1ec4 2001-12-31 alex strcpy( Conf_ServerInfo, PACKAGE" "VERSION );
134 ed406b4a 2002-01-03 alex strcpy( Conf_ServerPwd, "" );
136 10aa35cc 2002-03-06 alex strcpy( Conf_MotdFile, MOTD_FILE );
138 9856253d 2001-12-30 alex Conf_ListenPorts_Count = 0;
140 08cf5607 2001-12-26 alex Conf_PingTimeout = 120;
141 281d8e45 2002-03-25 alex Conf_PongTimeout = 20;
143 03d971d9 2002-01-02 alex Conf_ConnectRetry = 60;
145 03d971d9 2002-01-02 alex Conf_Oper_Count = 0;
147 03d971d9 2002-01-02 alex Conf_Server_Count = 0;
148 f86083a0 2002-03-27 alex } /* Set_Defaults */
151 574ae82c 2001-12-26 alex LOCAL VOID Read_Config( VOID )
153 574ae82c 2001-12-26 alex /* Konfigurationsdatei einlesen. */
155 03d971d9 2002-01-02 alex CHAR section[LINE_LEN], str[LINE_LEN], *var, *arg, *ptr;
159 f86083a0 2002-03-27 alex fd = fopen( NGIRCd_ConfFile, "r" );
162 9856253d 2001-12-30 alex /* Keine Konfigurationsdatei gefunden */
163 f86083a0 2002-03-27 alex Config_Error( LOG_ALERT, "Can't read configuration \"%s\": %s", NGIRCd_ConfFile, strerror( errno ));
164 f86083a0 2002-03-27 alex Config_Error( LOG_ALERT, PACKAGE" exiting due to fatal errors!" );
169 03d971d9 2002-01-02 alex strcpy( section, "" );
170 9856253d 2001-12-30 alex while( TRUE )
172 804b1ec4 2001-12-31 alex if( ! fgets( str, LINE_LEN, fd )) break;
173 9856253d 2001-12-30 alex ngt_TrimStr( str );
176 9856253d 2001-12-30 alex /* Kommentarzeilen und leere Zeilen ueberspringen */
177 9856253d 2001-12-30 alex if( str[0] == ';' || str[0] == '#' || str[0] == '\0' ) continue;
179 03d971d9 2002-01-02 alex /* Anfang eines Abschnittes? */
180 03d971d9 2002-01-02 alex if(( str[0] == '[' ) && ( str[strlen( str ) - 1] == ']' ))
182 03d971d9 2002-01-02 alex strcpy( section, str );
183 03d971d9 2002-01-02 alex if( strcasecmp( section, "[GLOBAL]" ) == 0 ) continue;
184 03d971d9 2002-01-02 alex if( strcasecmp( section, "[OPERATOR]" ) == 0 )
186 f86083a0 2002-03-27 alex if( Conf_Oper_Count + 1 > MAX_OPERATORS ) Config_Error( LOG_ERR, "Too many operators configured." );
189 03d971d9 2002-01-02 alex /* neuen Operator initialisieren */
190 03d971d9 2002-01-02 alex strcpy( Conf_Oper[Conf_Oper_Count].name, "" );
191 03d971d9 2002-01-02 alex strcpy( Conf_Oper[Conf_Oper_Count].pwd, "" );
192 03d971d9 2002-01-02 alex Conf_Oper_Count++;
196 03d971d9 2002-01-02 alex if( strcasecmp( section, "[SERVER]" ) == 0 )
198 f86083a0 2002-03-27 alex if( Conf_Server_Count + 1 > MAX_SERVERS ) Config_Error( LOG_ERR, "Too many servers configured." );
201 03d971d9 2002-01-02 alex /* neuen Server ("Peer") initialisieren */
202 03d971d9 2002-01-02 alex strcpy( Conf_Server[Conf_Server_Count].host, "" );
203 03d971d9 2002-01-02 alex strcpy( Conf_Server[Conf_Server_Count].ip, "" );
204 03d971d9 2002-01-02 alex strcpy( Conf_Server[Conf_Server_Count].name, "" );
205 03d971d9 2002-01-02 alex strcpy( Conf_Server[Conf_Server_Count].pwd, "" );
206 03d971d9 2002-01-02 alex Conf_Server[Conf_Server_Count].port = 0;
207 d67d94ea 2002-03-10 alex Conf_Server[Conf_Server_Count].group = -1;
208 6debfc31 2002-01-18 alex Conf_Server[Conf_Server_Count].lasttry = time( NULL ) - Conf_ConnectRetry + STARTUP_DELAY;
209 03d971d9 2002-01-02 alex Conf_Server[Conf_Server_Count].res_stat = NULL;
210 03d971d9 2002-01-02 alex Conf_Server_Count++;
214 f86083a0 2002-03-27 alex Config_Error( LOG_ERR, "%s, line %d: Unknown section \"%s\"!", NGIRCd_ConfFile, line, section );
215 03d971d9 2002-01-02 alex section[0] = 0x1;
217 03d971d9 2002-01-02 alex if( section[0] == 0x1 ) continue;
219 03d971d9 2002-01-02 alex /* In Variable und Argument zerlegen */
220 9856253d 2001-12-30 alex ptr = strchr( str, '=' );
221 9856253d 2001-12-30 alex if( ! ptr )
223 f86083a0 2002-03-27 alex Config_Error( LOG_ERR, "%s, line %d: Syntax error!", NGIRCd_ConfFile, line );
226 9856253d 2001-12-30 alex *ptr = '\0';
227 9856253d 2001-12-30 alex var = str; ngt_TrimStr( var );
228 9856253d 2001-12-30 alex arg = ptr + 1; ngt_TrimStr( arg );
230 03d971d9 2002-01-02 alex if( strcasecmp( section, "[GLOBAL]" ) == 0 ) Handle_GLOBAL( line, var, arg );
231 03d971d9 2002-01-02 alex else if( strcasecmp( section, "[OPERATOR]" ) == 0 ) Handle_OPERATOR( line, var, arg );
232 03d971d9 2002-01-02 alex else if( strcasecmp( section, "[SERVER]" ) == 0 ) Handle_SERVER( line, var, arg );
233 f86083a0 2002-03-27 alex else Config_Error( LOG_ERR, "%s, line %d: Variable \"%s\" outside section!", NGIRCd_ConfFile, line, var );
236 03d971d9 2002-01-02 alex fclose( fd );
237 03d971d9 2002-01-02 alex } /* Read_Config */
240 03d971d9 2002-01-02 alex GLOBAL VOID Handle_GLOBAL( INT Line, CHAR *Var, CHAR *Arg )
243 95a4b1b1 2002-03-25 alex INT32 port;
245 03d971d9 2002-01-02 alex assert( Line > 0 );
246 03d971d9 2002-01-02 alex assert( Var != NULL );
247 03d971d9 2002-01-02 alex assert( Arg != NULL );
249 03d971d9 2002-01-02 alex if( strcasecmp( Var, "Name" ) == 0 )
251 03d971d9 2002-01-02 alex /* Der Server-Name */
252 10363b39 2002-03-03 alex strncpy( Conf_ServerName, Arg, CLIENT_ID_LEN - 1 );
253 03d971d9 2002-01-02 alex Conf_ServerName[CLIENT_ID_LEN - 1] = '\0';
256 03d971d9 2002-01-02 alex if( strcasecmp( Var, "Info" ) == 0 )
258 03d971d9 2002-01-02 alex /* Server-Info-Text */
259 10363b39 2002-03-03 alex strncpy( Conf_ServerInfo, Arg, CLIENT_INFO_LEN - 1 );
260 03d971d9 2002-01-02 alex Conf_ServerInfo[CLIENT_INFO_LEN - 1] = '\0';
263 ed406b4a 2002-01-03 alex if( strcasecmp( Var, "Password" ) == 0 )
265 10363b39 2002-03-03 alex /* Server-Passwort */
266 10363b39 2002-03-03 alex strncpy( Conf_ServerPwd, Arg, CLIENT_PASS_LEN - 1 );
267 ed406b4a 2002-01-03 alex Conf_ServerPwd[CLIENT_PASS_LEN - 1] = '\0';
270 03d971d9 2002-01-02 alex if( strcasecmp( Var, "Ports" ) == 0 )
272 03d971d9 2002-01-02 alex /* Ports, durch "," getrennt, auf denen der Server
273 03d971d9 2002-01-02 alex * Verbindungen annehmen soll */
274 03d971d9 2002-01-02 alex ptr = strtok( Arg, "," );
275 03d971d9 2002-01-02 alex while( ptr )
277 03d971d9 2002-01-02 alex ngt_TrimStr( ptr );
278 03d971d9 2002-01-02 alex port = atol( ptr );
279 f86083a0 2002-03-27 alex if( Conf_ListenPorts_Count + 1 > MAX_LISTEN_PORTS ) Config_Error( LOG_ERR, "Too many listen ports configured. Port %ld ignored.", port );
282 95a4b1b1 2002-03-25 alex if( port > 0 && port < 0xFFFF ) Conf_ListenPorts[Conf_ListenPorts_Count++] = (INT)port;
283 f86083a0 2002-03-27 alex else Config_Error( LOG_ERR, "%s, line %d (section \"Global\"): Illegal port number %ld!", NGIRCd_ConfFile, Line, port );
285 03d971d9 2002-01-02 alex ptr = strtok( NULL, "," );
289 03d971d9 2002-01-02 alex if( strcasecmp( Var, "MotdFile" ) == 0 )
291 03d971d9 2002-01-02 alex /* Datei mit der "message of the day" (MOTD) */
292 10363b39 2002-03-03 alex strncpy( Conf_MotdFile, Arg, FNAME_LEN - 1 );
293 03d971d9 2002-01-02 alex Conf_MotdFile[FNAME_LEN - 1] = '\0';
296 03d971d9 2002-01-02 alex if( strcasecmp( Var, "PingTimeout" ) == 0 )
298 03d971d9 2002-01-02 alex /* PING-Timeout */
299 03d971d9 2002-01-02 alex Conf_PingTimeout = atoi( Arg );
300 03d971d9 2002-01-02 alex if(( Conf_PingTimeout ) < 5 ) Conf_PingTimeout = 5;
303 03d971d9 2002-01-02 alex if( strcasecmp( Var, "PongTimeout" ) == 0 )
305 03d971d9 2002-01-02 alex /* PONG-Timeout */
306 03d971d9 2002-01-02 alex Conf_PongTimeout = atoi( Arg );
307 03d971d9 2002-01-02 alex if(( Conf_PongTimeout ) < 5 ) Conf_PongTimeout = 5;
310 03d971d9 2002-01-02 alex if( strcasecmp( Var, "ConnectRetry" ) == 0 )
312 03d971d9 2002-01-02 alex /* Sekunden zwischen Verbindungsversuchen zu anderen Servern */
313 03d971d9 2002-01-02 alex Conf_ConnectRetry = atoi( Arg );
314 03d971d9 2002-01-02 alex if(( Conf_ConnectRetry ) < 5 ) Conf_ConnectRetry = 5;
318 f86083a0 2002-03-27 alex Config_Error( LOG_ERR, "%s, line %d (section \"Global\"): Unknown variable \"%s\"!", NGIRCd_ConfFile, Line, Var );
319 03d971d9 2002-01-02 alex } /* Handle_GLOBAL */
322 03d971d9 2002-01-02 alex GLOBAL VOID Handle_OPERATOR( INT Line, CHAR *Var, CHAR *Arg )
324 03d971d9 2002-01-02 alex assert( Line > 0 );
325 03d971d9 2002-01-02 alex assert( Var != NULL );
326 03d971d9 2002-01-02 alex assert( Arg != NULL );
327 03d971d9 2002-01-02 alex assert( Conf_Oper_Count > 0 );
329 03d971d9 2002-01-02 alex if( strcasecmp( Var, "Name" ) == 0 )
331 03d971d9 2002-01-02 alex /* Name des IRC Operator */
332 10363b39 2002-03-03 alex strncpy( Conf_Oper[Conf_Oper_Count - 1].name, Arg, CLIENT_ID_LEN - 1 );
333 03d971d9 2002-01-02 alex Conf_Oper[Conf_Oper_Count - 1].name[CLIENT_ID_LEN - 1] = '\0';
336 03d971d9 2002-01-02 alex if( strcasecmp( Var, "Password" ) == 0 )
338 03d971d9 2002-01-02 alex /* Passwort des IRC Operator */
339 10363b39 2002-03-03 alex strncpy( Conf_Oper[Conf_Oper_Count - 1].pwd, Arg, CLIENT_PASS_LEN - 1 );
340 03d971d9 2002-01-02 alex Conf_Oper[Conf_Oper_Count - 1].pwd[CLIENT_PASS_LEN - 1] = '\0';
344 f86083a0 2002-03-27 alex Config_Error( LOG_ERR, "%s, line %d (section \"Operator\"): Unknown variable \"%s\"!", NGIRCd_ConfFile, Line, Var );
345 03d971d9 2002-01-02 alex } /* Handle_OPERATOR */
348 03d971d9 2002-01-02 alex GLOBAL VOID Handle_SERVER( INT Line, CHAR *Var, CHAR *Arg )
350 d67d94ea 2002-03-10 alex INT32 port;
352 03d971d9 2002-01-02 alex assert( Line > 0 );
353 03d971d9 2002-01-02 alex assert( Var != NULL );
354 03d971d9 2002-01-02 alex assert( Arg != NULL );
356 03d971d9 2002-01-02 alex if( strcasecmp( Var, "Host" ) == 0 )
358 03d971d9 2002-01-02 alex /* Hostname des Servers */
359 10363b39 2002-03-03 alex strncpy( Conf_Server[Conf_Server_Count - 1].host, Arg, HOST_LEN - 1 );
360 03d971d9 2002-01-02 alex Conf_Server[Conf_Server_Count - 1].host[HOST_LEN - 1] = '\0';
363 03d971d9 2002-01-02 alex if( strcasecmp( Var, "Name" ) == 0 )
365 03d971d9 2002-01-02 alex /* Name des Servers ("Nick") */
366 10363b39 2002-03-03 alex strncpy( Conf_Server[Conf_Server_Count - 1].name, Arg, CLIENT_ID_LEN - 1 );
367 2e289b50 2002-01-05 alex Conf_Server[Conf_Server_Count - 1].name[CLIENT_ID_LEN - 1] = '\0';
370 03d971d9 2002-01-02 alex if( strcasecmp( Var, "Password" ) == 0 )
372 03d971d9 2002-01-02 alex /* Passwort des Servers */
373 10363b39 2002-03-03 alex strncpy( Conf_Server[Conf_Server_Count - 1].pwd, Arg, CLIENT_PASS_LEN - 1 );
374 03d971d9 2002-01-02 alex Conf_Server[Conf_Server_Count - 1].pwd[CLIENT_PASS_LEN - 1] = '\0';
377 03d971d9 2002-01-02 alex if( strcasecmp( Var, "Port" ) == 0 )
379 03d971d9 2002-01-02 alex /* Port, zu dem Verbunden werden soll */
380 03d971d9 2002-01-02 alex port = atol( Arg );
381 d67d94ea 2002-03-10 alex if( port > 0 && port < 0xFFFF ) Conf_Server[Conf_Server_Count - 1].port = (INT)port;
382 f86083a0 2002-03-27 alex else Config_Error( LOG_ERR, "%s, line %d (section \"Server\"): Illegal port number %ld!", NGIRCd_ConfFile, Line, port );
385 d67d94ea 2002-03-10 alex if( strcasecmp( Var, "Group" ) == 0 )
387 d67d94ea 2002-03-10 alex /* Server-Gruppe */
388 d67d94ea 2002-03-10 alex Conf_Server[Conf_Server_Count - 1].group = atoi( Arg );
392 f86083a0 2002-03-27 alex Config_Error( LOG_ERR, "%s, line %d (section \"Server\"): Unknown variable \"%s\"!", NGIRCd_ConfFile, Line, Var );
393 03d971d9 2002-01-02 alex } /* Handle_SERVER */
396 9856253d 2001-12-30 alex LOCAL VOID Validate_Config( VOID )
398 9856253d 2001-12-30 alex /* Konfiguration ueberpruefen */
400 9856253d 2001-12-30 alex if( ! Conf_ServerName[0] )
402 9856253d 2001-12-30 alex /* Kein Servername konfiguriert */
403 f86083a0 2002-03-27 alex Config_Error( LOG_ALERT, "No server name configured in \"%s\"!", NGIRCd_ConfFile );
404 f86083a0 2002-03-27 alex Config_Error( LOG_ALERT, PACKAGE" exiting due to fatal errors!" );
407 9856253d 2001-12-30 alex } /* Validate_Config */
410 f86083a0 2002-03-27 alex LOCAL VOID Config_Error( CONST INT Level, CONST CHAR *Format, ... )
412 f86083a0 2002-03-27 alex /* Fehler! Auf Console und/oder ins Log schreiben */
414 f86083a0 2002-03-27 alex CHAR msg[MAX_LOG_MSG_LEN];
415 f86083a0 2002-03-27 alex va_list ap;
417 f86083a0 2002-03-27 alex assert( Format != NULL );
419 f86083a0 2002-03-27 alex /* String mit variablen Argumenten zusammenbauen ... */
420 f86083a0 2002-03-27 alex va_start( ap, Format );
421 f86083a0 2002-03-27 alex vsnprintf( msg, MAX_LOG_MSG_LEN, Format, ap );
422 f86083a0 2002-03-27 alex va_end( ap );
424 f86083a0 2002-03-27 alex /* Im "normalen Betrieb" soll der Log-Mechanismus des ngIRCd verwendet
425 f86083a0 2002-03-27 alex * werden, beim Testen der Konfiguration jedoch nicht, hier sollen alle
426 f86083a0 2002-03-27 alex * Meldungen direkt auf die Konsole ausgegeben werden: */
427 f86083a0 2002-03-27 alex if( Use_Log ) Log( Level, msg );
428 f86083a0 2002-03-27 alex else puts( msg );
429 f86083a0 2002-03-27 alex } /* Config_Error */
432 cbc1e59f 2001-12-12 alex /* -eof- */