Module: ngircd.git
Branch: master
Commit: d587926eb091929faa4f57c8e79d181ce7946357
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=d587926e…
Author: Alexander Barton <alex(a)barton.de>
Date: Wed Mar 23 01:08:49 2011 +0100
Update INSTALL text
---
INSTALL | 23 ++++++++++++++---------
1 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/INSTALL b/INSTALL
index 601ec2d..8547efc 100644
--- a/INSTALL
+++ b/INSTALL
@@ -73,7 +73,8 @@ location, /usr/local/sbin/.
The next step is to configure and afterwards starting the daemon. Please
have a look at the ngircd(8) and ngircd.conf(5) manual pages for details
-and all possible options.
+and all possible options -- and don't forget to run "ngircd --configtest"
+to validate your configuration file!
If no previous version of the configuration file exists (the standard name
is /usr/local/etc/ngircd.conf), a sample configuration file containing all
@@ -128,11 +129,12 @@ the local system. Normally, root privileges are necessary to complete this
step. If there is already an older configuration file present, it won't be
overwritten.
-This files will be installed by default:
+These files and folders will be installed by default:
- /usr/local/sbin/ngircd: executable server
- /usr/local/etc/ngircd.conf: sample configuration (if not already present)
- /usr/local/share/doc/ngircd/: documentation
+- /usr/local/share/man/: manual pages
III. Additional features
@@ -226,19 +228,20 @@ V. Sample configuration file ngircd.conf
In the sample configuration file, there are comments beginning with "#" OR
";" -- this is only for the better understanding of the file.
-The file is separated in four blocks: [Global], [Operator], [Server], and
-[Channel].
+The file is separated in five blocks: [Global], [Features], [Operator],
+[Server], and [Channel].
In the [Global] section, there is the main configuration like the server
-name and the ports, on which the server should be listening. IRC operators
-of this server are defined in [Operator] blocks. [Server] is the section
-where server links are configured. And [Channel] blocks are used to
-configure pre-defined ("persistent") IRC channels.
+name and the ports, on which the server should be listening. Options in
+the [Features] section enable or disable functionality in the daemon.
+IRC operators of this server are defined in [Operator] blocks, remote
+servers are configured in [Server] sections, and [Channel] blocks are
+used to configure pre-defined ("persistent") IRC channels.
The meaning of the variables in the configuration file is explained in the
"doc/sample-ngircd.conf", which is used as sample configuration file in
/usr/local/etc after running "make install" (if you don't already have one)
-and in the "ngircd.conf" manual page.
+and in the ngircd.conf(5) manual page.
VI. Command line options
@@ -263,3 +266,5 @@ These parameters could be passed to the ngIRCd:
Use "--help" to see a short help text describing all available parameters
the server understands, with "--version" the ngIRCd shows its version
number. In both cases the server exits after the output.
+
+Please see the ngircd(8) manual page for complete details!
Module: ngircd.git
Branch: master
Commit: 62f705f97e580fe61520793b3387081915f240ba
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=62f705f9…
Author: Alexander Barton <alex(a)barton.de>
Date: Mon Mar 21 09:42:01 2011 +0100
Allow servers to send more commands in the first 10 secods
This helps to speed up server login and network synchronisation.
---
src/ngircd/conn.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c
index 397bc91..63093c2 100644
--- a/src/ngircd/conn.c
+++ b/src/ngircd/conn.c
@@ -1629,18 +1629,25 @@ Handle_Buffer(CONN_ID Idx)
CLIENT *c;
c = Conn_GetClient(Idx);
- assert( c != NULL);
+ starttime = time(NULL);
+
+ assert(c != NULL);
/* Servers do get special command limits, so they can process
* all the messages that are required while peering. */
switch (Client_Type(c)) {
case CLIENT_SERVER:
- maxcmd = MAX_COMMANDS_SERVER; break;
+ /* Allow servers to send more commands in the first 10 secods
+ * to speed up server login and network synchronisation. */
+ if (starttime - Client_StartTime(c) < 10)
+ maxcmd = MAX_COMMANDS_SERVER * 5;
+ else
+ maxcmd = MAX_COMMANDS_SERVER;
+ break;
case CLIENT_SERVICE:
maxcmd = MAX_COMMANDS_SERVICE; break;
}
- starttime = time(NULL);
for (i=0; i < maxcmd; i++) {
/* Check penalty */
if (My_Connections[Idx].delaytime > starttime)
Module: ngircd.git
Branch: master
Commit: ae7470ceb546d87cbd366d508641276313ec9130
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=ae7470ce…
Author: Alexander Barton <alex(a)barton.de>
Date: Sat Mar 19 16:58:29 2011 +0100
Rename ClientHost to CloakHost, and ClientUserNick to CloakUserToNick
---
doc/sample-ngircd.conf.tmpl | 6 +++---
man/ngircd.conf.5.tmpl | 4 ++--
src/ngircd/client.c | 8 ++++----
src/ngircd/conf.c | 19 ++++++++++---------
src/ngircd/conf.h | 12 +++++++-----
5 files changed, 26 insertions(+), 23 deletions(-)
diff --git a/doc/sample-ngircd.conf.tmpl b/doc/sample-ngircd.conf.tmpl
index fee3570..a2eeee9 100644
--- a/doc/sample-ngircd.conf.tmpl
+++ b/doc/sample-ngircd.conf.tmpl
@@ -154,11 +154,11 @@
# maximum nick name length!
;MaxNickLength = 9
- # Set this hostname for every client instead of the real one
- ;ClientHost = irc.example.net
+ # Set this hostname for every client instead of the real one.
+ ;CloakHost = irc.example.net
# Set every clients' user name to their nick name
- ;ClientUserNick = yes
+ ;CloakUserToNick = yes
[Features]
# Do any DNS lookups when a client connects to the server.
diff --git a/man/ngircd.conf.5.tmpl b/man/ngircd.conf.5.tmpl
index 3282476..fa77c64 100644
--- a/man/ngircd.conf.5.tmpl
+++ b/man/ngircd.conf.5.tmpl
@@ -237,11 +237,11 @@ Maximum length of an user nick name (Default: 9, as in RFC 2812). Please
note that all servers in an IRC network MUST use the same maximum nick name
length!
.TP
-\fBClientHost\fR
+\fBCloakHost\fR
Set this hostname for every client instead of the real one. Default: empty,
don't change.
.TP
-\fBClientUserNick\fR
+\fBCloakUserToNick\fR
Set every clients' user name to their nick name and hide the one supplied
by the IRC client. Default: no.
.SH [OPERATOR]
diff --git a/src/ngircd/client.c b/src/ngircd/client.c
index 1a6ad93..e01c424 100644
--- a/src/ngircd/client.c
+++ b/src/ngircd/client.c
@@ -319,8 +319,8 @@ Client_SetHostname( CLIENT *Client, const char *Hostname )
assert( Client != NULL );
assert( Hostname != NULL );
- if (strlen(Conf_ClientHost)) {
- strlcpy( Client->host, Conf_ClientHost, sizeof( Client->host ));
+ if (strlen(Conf_CloakHost)) {
+ strlcpy( Client->host, Conf_CloakHost, sizeof( Client->host ));
} else {
strlcpy( Client->host, Hostname, sizeof( Client->host ));
}
@@ -335,7 +335,7 @@ Client_SetID( CLIENT *Client, const char *ID )
strlcpy( Client->id, ID, sizeof( Client->id ));
- if (Conf_ClientUserNick)
+ if (Conf_CloakUserToNick)
strlcpy( Client->user, ID, sizeof( Client->user ));
/* Hash */
@@ -351,7 +351,7 @@ Client_SetUser( CLIENT *Client, const char *User, bool Idented )
assert( Client != NULL );
assert( User != NULL );
- if (Conf_ClientUserNick) return;
+ if (Conf_CloakUserToNick) return;
if (Idented) {
strlcpy(Client->user, User, sizeof(Client->user));
diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c
index 12893ad..fb8db2c 100644
--- a/src/ngircd/conf.c
+++ b/src/ngircd/conf.c
@@ -352,8 +352,8 @@ Conf_Test( void )
printf(" MaxConnectionsIP = %d\n", Conf_MaxConnectionsIP);
printf(" MaxJoins = %d\n", Conf_MaxJoins > 0 ? Conf_MaxJoins : -1);
printf(" MaxNickLength = %u\n", Conf_MaxNickLength - 1);
- printf(" ClientHost = %s\n", Conf_ClientHost);
- printf(" ClientUserNick = %s\n\n", yesno_to_str(Conf_ClientUserNick));
+ printf(" CloakHost = %s\n", Conf_CloakHost);
+ printf(" CloakUserToNick = %s\n\n", yesno_to_str(Conf_CloakUserToNick));
puts("[FEATURES]");
printf(" DNS = %s\n", yesno_to_str(Conf_DNS));
@@ -592,8 +592,6 @@ Set_Defaults(bool InitServers)
int i;
strcpy(Conf_ServerName, "");
- strcpy(Conf_ClientHost, "");
- Conf_ClientUserNick = false;
snprintf(Conf_ServerInfo, sizeof Conf_ServerInfo, "%s %s",
PACKAGE_NAME, PACKAGE_VERSION);
strcpy(Conf_ServerPwd, "");
@@ -633,6 +631,9 @@ Set_Defaults(bool InitServers)
Conf_MaxJoins = 10;
Conf_MaxNickLength = CLIENT_NICK_LEN_DEFAULT;
+ strcpy(Conf_CloakHost, "");
+ Conf_CloakUserToNick = false;
+
#ifdef SYSLOG
#ifdef LOG_LOCAL5
Conf_SyslogFacility = LOG_LOCAL5;
@@ -974,16 +975,16 @@ Handle_GLOBAL( int Line, char *Var, char *Arg )
Config_Error_TooLong( Line, Var );
return;
}
- if( strcasecmp( Var, "ClientHost" ) == 0 ) {
+ if( strcasecmp( Var, "CloakHost" ) == 0 ) {
/* Client hostname */
- len = strlcpy( Conf_ClientHost, Arg, sizeof( Conf_ClientHost ));
- if (len >= sizeof( Conf_ClientHost ))
+ len = strlcpy( Conf_CloakHost, Arg, sizeof( Conf_CloakHost ));
+ if (len >= sizeof( Conf_CloakHost ))
Config_Error_TooLong( Line, Var );
return;
}
- if( strcasecmp( Var, "ClientUserNick" ) == 0 ) {
+ if( strcasecmp( Var, "CloakUserToNick" ) == 0 ) {
/* Use client nick name as user name */
- Conf_ClientUserNick = Check_ArgIsTrue( Arg );
+ Conf_CloakUserToNick = Check_ArgIsTrue( Arg );
return;
}
if( strcasecmp( Var, "Info" ) == 0 ) {
diff --git a/src/ngircd/conf.h b/src/ngircd/conf.h
index 10b6407..305ccaa 100644
--- a/src/ngircd/conf.h
+++ b/src/ngircd/conf.h
@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
- * Copyright (c)2001-2010 Alexander Barton (alex(a)barton.de)
+ * Copyright (c)2001-2011 Alexander Barton (alex(a)barton.de) and Contributors.
*
* 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
@@ -97,10 +97,6 @@ struct Conf_Channel {
/** Name (ID, "nick") of this server */
GLOBAL char Conf_ServerName[CLIENT_ID_LEN];
-/** Hostname of the clients */
-GLOBAL char Conf_ClientHost[CLIENT_ID_LEN];
-GLOBAL bool Conf_ClientUserNick;
-
/** Server info text */
GLOBAL char Conf_ServerInfo[CLIENT_INFO_LEN];
@@ -167,6 +163,12 @@ GLOBAL bool Conf_OperServerMode;
/** Flag indicating if remote IRC operators are allowed to manage this server */
GLOBAL bool Conf_AllowRemoteOper;
+/** Cloaked hostname of the clients */
+GLOBAL char Conf_CloakHost[CLIENT_ID_LEN];
+
+/** Use nick name as user name? */
+GLOBAL bool Conf_CloakUserToNick;
+
/** Enable all DNS functions? */
GLOBAL bool Conf_DNS;
Module: ngircd.git
Branch: master
Commit: acd7a5d6d41ca8017d3c2217b0c0bde129b4e041
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=acd7a5d6…
Author: Alexander Barton <alex(a)barton.de>
Date: Sat Mar 19 17:02:39 2011 +0100
Add a note not to use a percent sign ("%") in CloakHost variable
The percent sign is reserved for future extensions, for example to
expand some variables like %H to a hash value of the real host name ...
Idea by kaFux in #ngircd.
---
doc/sample-ngircd.conf.tmpl | 2 ++
man/ngircd.conf.5.tmpl | 6 ++++++
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/doc/sample-ngircd.conf.tmpl b/doc/sample-ngircd.conf.tmpl
index a2eeee9..e07b520 100644
--- a/doc/sample-ngircd.conf.tmpl
+++ b/doc/sample-ngircd.conf.tmpl
@@ -155,6 +155,8 @@
;MaxNickLength = 9
# Set this hostname for every client instead of the real one.
+ # Please note: don't use the percentage sign ("%"), it is reserved for
+ # future extensions!
;CloakHost = irc.example.net
# Set every clients' user name to their nick name
diff --git a/man/ngircd.conf.5.tmpl b/man/ngircd.conf.5.tmpl
index fa77c64..131fa29 100644
--- a/man/ngircd.conf.5.tmpl
+++ b/man/ngircd.conf.5.tmpl
@@ -240,6 +240,12 @@ length!
\fBCloakHost\fR
Set this hostname for every client instead of the real one. Default: empty,
don't change.
+.PP
+.RS
+.B Please note:
+.br
+Don't use the percentage sign ("%"), it is reserved for future extensions!
+.RE
.TP
\fBCloakUserToNick\fR
Set every clients' user name to their nick name and hide the one supplied
Module: ngircd.git
Branch: master
Commit: fa8b83e69b0d7edcfdcf8f0a4496c79f9c5ec161
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=fa8b83e6…
Author: Alexander Barton <alex(a)barton.de>
Date: Sat Mar 19 17:16:14 2011 +0100
Merge branches 'CloakUserHost', 'QuitOnHTTP' and 'bug72-WHOIS-List'
* CloakUserHost:
Add a note not to use a percent sign ("%") in CloakHost variable
Rename ClientHost to CloakHost, and ClientUserNick to CloakUserToNick
Don't use "the.net" in sample-ngircd.conf, use "example.net"
ngircd.conf.5: document "ClientHost" and "ClientUserNick"
Move "ClientHost" and "ClientUserNick" to end of [Global] section
ClientUserNick setting
ClientHost setting
* QuitOnHTTP:
Only "handle" HTTP commands on unregistered connections
Don't use IRC_QUIT_HTTP() if STRICT_RFC is #define'd
IRC_QUIT_HTTP(): enhance error message
Move IRC_QUIT_HTTP() below IRC_QUIT()
quit on HTTP commands: GET & POST
* bug72-WHOIS-List:
Add "whois-test" to testsuite and distribution archive
Add support for up to 3 targets in WHOIS queries.
---
Module: ngircd.git
Branch: master
Commit: 25dd193e9b49b38db39cf549f94df4ba11812fe9
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=25dd193e…
Author: Alexander Barton <alex(a)barton.de>
Date: Wed Mar 16 23:43:29 2011 +0100
Move "ClientHost" and "ClientUserNick" to end of [Global] section
---
doc/sample-ngircd.conf.tmpl | 12 ++++++------
src/ngircd/conf.c | 6 +++---
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/doc/sample-ngircd.conf.tmpl b/doc/sample-ngircd.conf.tmpl
index 7cfe08f..8591759 100644
--- a/doc/sample-ngircd.conf.tmpl
+++ b/doc/sample-ngircd.conf.tmpl
@@ -24,12 +24,6 @@
# (".") and be unique in the IRC network. Required!
Name = irc.the.net
- # Set this hostname for every client instead of the real one
- ;ClientHost = irc.the.net
-
- # Set every clients' user name to their nick name
- ;ClientUserNick = yes
-
# Info text of the server. This will be shown by WHOIS and
# LINKS requests for example.
Info = Server Info Text
@@ -160,6 +154,12 @@
# maximum nick name length!
;MaxNickLength = 9
+ # Set this hostname for every client instead of the real one
+ ;ClientHost = irc.the.net
+
+ # Set every clients' user name to their nick name
+ ;ClientUserNick = yes
+
[Features]
# Do any DNS lookups when a client connects to the server.
;DNS = yes
diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c
index 487c1eb..12893ad 100644
--- a/src/ngircd/conf.c
+++ b/src/ngircd/conf.c
@@ -295,8 +295,6 @@ Conf_Test( void )
puts( "[GLOBAL]" );
printf(" Name = %s\n", Conf_ServerName);
- printf(" ClientHost = %s\n", Conf_ClientHost);
- printf(" ClientUserNick = %s\n", yesno_to_str(Conf_ClientUserNick));
printf(" Info = %s\n", Conf_ServerInfo);
#ifndef PAM
printf(" Password = %s\n", Conf_ServerPwd);
@@ -353,7 +351,9 @@ Conf_Test( void )
printf(" MaxConnections = %ld\n", Conf_MaxConnections);
printf(" MaxConnectionsIP = %d\n", Conf_MaxConnectionsIP);
printf(" MaxJoins = %d\n", Conf_MaxJoins > 0 ? Conf_MaxJoins : -1);
- printf(" MaxNickLength = %u\n\n", Conf_MaxNickLength - 1);
+ printf(" MaxNickLength = %u\n", Conf_MaxNickLength - 1);
+ printf(" ClientHost = %s\n", Conf_ClientHost);
+ printf(" ClientUserNick = %s\n\n", yesno_to_str(Conf_ClientUserNick));
puts("[FEATURES]");
printf(" DNS = %s\n", yesno_to_str(Conf_DNS));