Module: ngircd.git
Branch: master
Commit: f38a9035e5439cb395b2de6b9bdfa36102bfe80c
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=f38a9035…
Author: Alexander Barton <alex(a)barton.de>
Date: Tue Sep 11 11:40:47 2012 +0200
Show a warning on startup if config file is not a full path
ngIRCd is a long-running process and changes its working directory to "/" to
not block mounted filesystems and the like when running as daemon ("not in the
foreground"); therefore the path to the configuration file must be relative to
"/" (or the chroot() directory), which basically is "not relative", to ensure
that "kill -HUP" and the "REHASH" command work as expected later on.
This fixes parts of bug #127.
---
src/ngircd/conf.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/ngircd/conf.c b/src/ngircd/conf.c
index 034281c..627e6d3 100644
--- a/src/ngircd/conf.c
+++ b/src/ngircd/conf.c
@@ -1911,6 +1911,13 @@ Validate_Config(bool Configtest, bool Rehash)
bool config_valid = true;
char *ptr;
+ /* Emit a warning when the config file is not a full path name */
+ if (NGIRCd_ConfFile[0] && NGIRCd_ConfFile[0] != '/') {
+ Config_Error(LOG_WARNING,
+ "Not specifying a full path name to \"%s\" can cause problems when rehashing the server!",
+ NGIRCd_ConfFile);
+ }
+
/* Validate configured server name, see RFC 2812 section 2.3.1 */
ptr = Conf_ServerName;
do {
Module: ngircd.git
Branch: master
Commit: 2205227c3b3cbc8788bcf97a037c9e3016f71c9c
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=2205227c…
Author: Alexander Barton <alex(a)barton.de>
Date: Mon Sep 10 12:43:44 2012 +0200
WHO #channel: don't limit list size
It makes no sense to limit the list size when doing WHO for a channel
and not to return all the users in that channel, so I removed the check.
But if there are more than MAX_RPL_WHO(25) replies, the client requesting
the list will be "penalized" one second more (then 2 in total).
This fixes bug #125.
---
src/ngircd/irc-info.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/ngircd/irc-info.c b/src/ngircd/irc-info.c
index 6ec184a..6eb8d94 100644
--- a/src/ngircd/irc-info.c
+++ b/src/ngircd/irc-info.c
@@ -848,6 +848,8 @@ IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
assert( Client != NULL );
assert( Chan != NULL );
+ IRC_SetPenalty(Client, 1);
+
is_member = Channel_IsMemberOf(Chan, Client);
/* Secret channel? */
@@ -866,9 +868,6 @@ IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
is_visible = strchr(client_modes, 'i') == NULL;
if (is_member || is_visible) {
- if (IRC_CheckListTooBig(Client, count, MAX_RPL_WHO, "WHO"))
- break;
-
strcpy(flags, who_flags_status(client_modes));
if (is_ircop)
strlcat(flags, "*", sizeof(flags));
@@ -883,6 +882,11 @@ IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
count++;
}
}
+
+ /* If there are a lot of clients, augment penalty a bit */
+ if (count > MAX_RPL_WHO)
+ IRC_SetPenalty(Client, 1);
+
return IRC_WriteStrClient(Client, RPL_ENDOFWHO_MSG, Client_ID(Client),
Channel_Name(Chan));
}
@@ -911,6 +915,7 @@ IRC_WHO_Mask(CLIENT *Client, char *Mask, bool OnlyOps)
if (Mask)
ngt_LowerStr(Mask);
+ IRC_SetPenalty(Client, 3);
for (c = Client_First(); c != NULL; c = Client_Next(c)) {
if (Client_Type(c) != CLIENT_USER)
continue;
@@ -1014,13 +1019,11 @@ IRC_WHO(CLIENT *Client, REQUEST *Req)
chan = Channel_Search(Req->argv[0]);
if (chan) {
/* Members of a channel have been requested */
- IRC_SetPenalty(Client, 1);
return IRC_WHO_Channel(Client, chan, only_ops);
}
if (strcmp(Req->argv[0], "0") != 0) {
/* A mask has been given. But please note this RFC
* stupidity: "0" is same as no arguments ... */
- IRC_SetPenalty(Client, 3);
return IRC_WHO_Mask(Client, Req->argv[0], only_ops);
}
}
Module: ngircd.git
Branch: master
Commit: d2d867ea36b57c594546c5486aa8c2d4ef199af0
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=d2d867ea…
Author: Alexander Barton <alex(a)barton.de>
Date: Tue Sep 4 23:28:32 2012 +0200
Define EV_SET() for kqueue() on systems that don't have it
Some systems, notably FreeBSD 4.x, do have the kqueue() function but
lack the definition of EV_SET() in their header files -- but don't
worry, we can #define it on our own ;-)
Definition taken from /usr/include/sys/event.h of FreeBSD 8.1.
Patch tested on FreeBSD 4.1 by Götz Hoffart. Thanks!
---
src/ngircd/io.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/ngircd/io.c b/src/ngircd/io.c
index 9ffdfd6..cce6ef5 100644
--- a/src/ngircd/io.c
+++ b/src/ngircd/io.c
@@ -86,6 +86,20 @@ static int io_masterfd;
static int io_dispatch_kqueue(struct timeval *tv);
static bool io_event_change_kqueue(int, short, const int action);
+
+#ifndef EV_SET
+/* Taken from /usr/include/sys/event.h of FreeBSD 8.1 and required by all
+ * platforms that have kqueue but lack EV_SET() -- for example FreeBSD 4. */
+#define EV_SET(kevp, a, b, c, d, e, f) do { \
+ struct kevent *__kevp__ = (kevp); \
+ __kevp__->ident = (a); \
+ __kevp__->filter = (b); \
+ __kevp__->flags = (c); \
+ __kevp__->fflags = (d); \
+ __kevp__->data = (e); \
+ __kevp__->udata = (f); \
+} while(0)
+#endif
#endif
#ifdef IO_USE_POLL
Module: ngircd.git
Branch: master
Commit: 53b2acc00b60777b622e471ae6eef67e1876a01d
URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=53b2acc0…
Author: Alexander Barton <alex(a)barton.de>
Date: Tue Sep 4 13:09:27 2012 +0200
Update project description
---
README | 15 +++++++++------
contrib/Debian/control | 30 +++++++++++++++---------------
contrib/ngircd.spec | 10 +++++-----
3 files changed, 29 insertions(+), 26 deletions(-)
diff --git a/README b/README
index 2e19d83..11d140d 100644
--- a/README
+++ b/README
@@ -12,12 +12,15 @@
I. Introduction
~~~~~~~~~~~~~~~
-ngIRCd is an Open Source server for the Internet Relay Chat (IRC), which
-is developed and published under the terms of the GNU General Public
-Licence, see the file COPYING for details. ngIRCd means "next generation
-IRC daemon" (which is a little bit exaggerated, "lightweight Internet Relay
-Chat server" would be better), it's written from scratch and not deduced
-from the "grandfather of IRC daemons", the daemon of the IRCNet.
+ngIRCd is a free, portable and lightweight Internet Relay Chat server for
+small or private networks, developed under the GNU General Public License
+(GPL; please see the file COPYING for details). It is simple to configure,
+can cope with dynamic IP addresses, and supports IPv6 as well as SSL. It is
+written from scratch and not based on the original IRCd.
+
+The name ngIRCd means next generation IRC daemon, which is a little bit
+exaggerated: lightweight Internet Relay Chat server most probably would be a
+better name :-)
Please see the INSTALL document for installation and upgrade information!
diff --git a/contrib/Debian/control b/contrib/Debian/control
index 0ac6d22..d6cf418 100644
--- a/contrib/Debian/control
+++ b/contrib/Debian/control
@@ -18,11 +18,11 @@ Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: ircd
Description: lightweight Internet Relay Chat server
- This package provides ngIRCd, a lightweight Internet Relay Chat
- server for small or private networks. It is simple to configure, can
- cope with dynamic IP addresses, and supports IPv6 as well as SSL. It
- is written from scratch, not based on the original IRCd and quite
- portable.
+ This package provides ngIRCd, a portable and lightweight Internet Relay
+ Chat server for small or private networks, developed under the GNU
+ General Public License (GPL). It is simple to configure, can cope with
+ dynamic IP addresses, and supports IPv6 as well as SSL. It is written
+ from scratch and not based on the original IRCd.
.
This package contains the "standard distribution", including support for
syslog logging and compressed server-links using zlib. Please have a look
@@ -35,11 +35,11 @@ Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: ircd
Conflicts: ngircd, ngircd-dbg
Description: lightweight Internet Relay Chat server
- This package provides ngIRCd, a lightweight Internet Relay Chat
- server for small or private networks. It is simple to configure, can
- cope with dynamic IP addresses, and supports IPv6 as well as SSL. It
- is written from scratch, not based on the original IRCd and quite
- portable.
+ This package provides ngIRCd, a portable and lightweight Internet Relay
+ Chat server for small or private networks, developed under the GNU
+ General Public License (GPL). It is simple to configure, can cope with
+ dynamic IP addresses, and supports IPv6 as well as SSL. It is written
+ from scratch and not based on the original IRCd.
.
In addition to the features of the "standard package", this package
includes support for TCP wrappers, IDENT requests, the IPv6 protocol and
@@ -51,11 +51,11 @@ Depends: ${shlibs:Depends}, ${misc:Depends}
Provides: ircd
Conflicts: ngircd, ngircd-full
Description: lightweight Internet Relay Chat server
- This package provides ngIRCd, a lightweight Internet Relay Chat
- server for small or private networks. It is simple to configure, can
- cope with dynamic IP addresses, and supports IPv6 as well as SSL. It
- is written from scratch, not based on the original IRCd and quite
- portable.
+ This package provides ngIRCd, a portable and lightweight Internet Relay
+ Chat server for small or private networks, developed under the GNU
+ General Public License (GPL). It is simple to configure, can cope with
+ dynamic IP addresses, and supports IPv6 as well as SSL. It is written
+ from scratch and not based on the original IRCd.
.
In addition to the features of the "standard package", this package
includes support for TCP wrappers, IDENT requests, the IPv6 protocol and
diff --git a/contrib/ngircd.spec b/contrib/ngircd.spec
index 2041aa0..aeb10f2 100644
--- a/contrib/ngircd.spec
+++ b/contrib/ngircd.spec
@@ -15,11 +15,11 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: zlib-devel, openssl-devel
%description
-This package provides ngIRCd, a lightweight Internet Relay Chat
-server for small or private networks. It is simple to configure, can
-cope with dynamic IP addresses, and supports IPv6 as well as SSL. It
-is written from scratch, not based on the original IRCd and quite
-portable.
+This package provides ngIRCd, a portable and lightweight Internet Relay
+Chat server for small or private networks, developed under the GNU
+General Public License (GPL). It is simple to configure, can cope with
+dynamic IP addresses, and supports IPv6 as well as SSL. It is written
+from scratch and not based on the original IRCd.
Advantages:
- well arranged (lean) configuration file