.\"
-.\" $Id: ngircd.conf.5.tmpl,v 1.4 2007/10/13 20:45:12 fw Exp $
+.\" $Id: ngircd.conf.5.tmpl,v 1.5 2007/10/25 11:01:19 fw Exp $
.\"
.TH ngircd.conf 5 "August 2005" ngircd "ngIRCd Manual"
.SH NAME
If enabled, no new channels can be created. Useful if
you do not want to have channels other than those defined in
the config file.
+Default: No.
+.TP
+\fBNoDNS\fR
+If enabled, ngircd will not make DNS lookups when clients connect.
+If you configure ngircd to connect to other servers, ngircd may still
+perform a DNS lookup if required.
+Default: No.
.TP
\fBMaxConnections\fR
Maximum number of simultaneous connection the server is allowed to accept
#include "portab.h"
-static char UNUSED id[] = "$Id: client.c,v 1.95 2007/01/23 16:07:19 alex Exp $";
+static char UNUSED id[] = "$Id: client.c,v 1.96 2007/10/25 11:01:19 fw Exp $";
#include "imp.h"
#include <assert.h>
This_Server->hops = 0;
gethostname( This_Server->host, CLIENT_HOST_LEN );
- h = gethostbyname( This_Server->host );
- if( h ) strlcpy( This_Server->host, h->h_name, sizeof( This_Server->host ));
-
+ if (!Conf_NoDNS) {
+ h = gethostbyname( This_Server->host );
+ if (h) strlcpy(This_Server->host, h->h_name, sizeof(This_Server->host));
+ }
Client_SetID( This_Server, Conf_ServerName );
Client_SetInfo( This_Server, Conf_ServerInfo );
#include "portab.h"
-static char UNUSED id[] = "$Id: conf.c,v 1.100 2007/10/24 00:48:41 fw Exp $";
+static char UNUSED id[] = "$Id: conf.c,v 1.101 2007/10/25 11:01:19 fw Exp $";
#include "imp.h"
#include <assert.h>
printf( " OperCanUseMode = %s\n", Conf_OperCanMode == true ? "yes" : "no" );
printf( " OperServerMode = %s\n", Conf_OperServerMode == true? "yes" : "no" );
printf( " PredefChannelsOnly = %s\n", Conf_PredefChannelsOnly == true ? "yes" : "no" );
+ printf( " NoDNS = %s\n", Conf_NoDNS ? "yes" : "no");
printf( " MaxConnections = %ld\n", Conf_MaxConnections);
printf( " MaxConnectionsIP = %d\n", Conf_MaxConnectionsIP);
printf( " MaxJoins = %d\n\n", Conf_MaxJoins);
Conf_Channel_Count = 0;
Conf_OperCanMode = false;
+ Conf_NoDNS = false;
Conf_PredefChannelsOnly = false;
Conf_OperServerMode = false;
Conf_PredefChannelsOnly = Check_ArgIsTrue( Arg );
return;
}
+ if( strcasecmp( Var, "NoDNS" ) == 0 ) {
+ /* don't do reverse dns lookups when clients connect? */
+ Conf_NoDNS = Check_ArgIsTrue( Arg );
+ return;
+ }
if( strcasecmp( Var, "OperCanUseMode" ) == 0 ) {
/* Are IRC operators allowed to use MODE in channels they aren't Op in? */
Conf_OperCanMode = Check_ArgIsTrue( Arg );
* (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information.
*
- * $Id: conf.h,v 1.43 2007/06/28 05:15:18 fw Exp $
+ * $Id: conf.h,v 1.44 2007/10/25 11:01:19 fw Exp $
*
* Configuration management (header)
*/
/* 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 */
#include "portab.h"
#include "io.h"
-static char UNUSED id[] = "$Id: conn.c,v 1.212 2007/10/04 15:03:56 alex Exp $";
+static char UNUSED id[] = "$Id: conn.c,v 1.213 2007/10/25 11:01:19 fw Exp $";
#include "imp.h"
#include <assert.h>
Client_SetHostname( c, My_Connections[new_sock].host );
- Resolve_Addr(&My_Connections[new_sock].res_stat, &new_addr,
- My_Connections[new_sock].sock, cb_Read_Resolver_Result);
+ if (!Conf_NoDNS)
+ Resolve_Addr(&My_Connections[new_sock].res_stat, &new_addr,
+ My_Connections[new_sock].sock, cb_Read_Resolver_Result);
- /* Penalty-Zeit setzen */
- Conn_SetPenalty( new_sock, 4 );
+ Conn_SetPenalty(new_sock, 4);
return new_sock;
} /* New_Connection */