This patch makes sure that ngIRCd doesn't try to handle sockets of
unsupported types, for example of AF_INET6 sockets when ngIRCd isn't
compiled with support for IPv6 ...
* HelpText: (22 commits)
Commands.txt: Update description of the "USERS" command
Commands.txt: Update description of the "SUMMON" command
Commands.txt: Update description of the "SERVLIST" command
Commands.txt: Update description of the "WHOWAS" command
Commands.txt: Update description of the "WHOIS" command
Commands.txt: Update description of the "WHO" command
Commands.txt: Update description of the "VERSION" command
Commands.txt: Update description of the "USERHOST" command
Commands.txt: Update description of the "TIME" command
Commands.txt: Update description of the "STATS" command
Commands.txt: Update description of the "NAMES" command
Commands.txt: Update description of the "MOTD" command
Commands.txt: Update description of the "LUSERS" command
Commands.txt: Update description of the "LINKS" command
Commands.txt: Update description of the "ISON" command
Commands.txt: Update description of the "INFO" command
Commands.txt: Update description of the "ADMIN" command
Commands.txt: Add description for the "CHARCONV" command
Commands.txt: Add description for the "CAP" command
Commands.txt: Import descriptions from "rbose/command_help"
...
This includes:
- move IRC_SetPenalty() at the beginning of the handler functions,
- use macros provided by irc-macros.h,
- code cleanup.
The main benefits of this patch are core size reduction, streamlined
structure of the handler functions, and enhanced functionality:
because of the _IRC_GET_TARGET_SERVER_OR_RETURN_() macro using the
Client_SearchServer() function, the target of the specific IRC command
can now be given server names, server mask, or the nickname of a user
connected to the server.
Closes bug #153.
This file prvides some macros for common tasks required by functions
implementing handlers for IRC commands:
* _IRC_ARGC_LE_OR_RETURN_
* _IRC_ARGC_GE_OR_RETURN_
* _IRC_GET_SENDER_OR_RETURN_
* _IRC_GET_TARGET_SERVER_OR_RETURN_
Add missing comments, streamline wording, and remove references to the
RFCs: this will be added to ./doc/Commands.txt with an other patch and
we want to avoid redundancy ...
Use the currently "displayed hostname" (which can be cloaked!) for
hostname matching, not the real one. In other words: don't display
all the cloaked users on a specific real hostname!
Thanks to DNS <dns@rbose.org> for reporting this issue.
This function returns the server structure of a client or a given "mask";
it is useful for implemention handlers for commands like "COMMAND *.net",
which should work on a server matching "*.net".
Please note that the local server is always returned when it matches the
mask, but besides that, the order is completely arbitrary.
This patch implements a new configuration option "IdleTimeout" in the
[Limits] section of the configuration file which can be used to set a
timeout (in seconds) after which the whole daemon will shutdown when no
more connections are left active after handling at least one client.
The default is 0, "never".
This can be useful for testing or when ngIRCd is started using "socket
activation" with systemd(8), for example.
This patch enables ngIRCd to work with listening sockets already
initialized and passed-in by systemd(8) and hereby to support on-demand
"socket activation".
systemd(8) uses two environment variables to pass information about the
sockets to ngIRCd, LISTEN_PID and LISTEN_FDS, and this mechanism only
kicks in when both variables are set. In all other cases, and therefore
in most installations out there, nothing changes at all.
Please note:
If socket activation is in effect, ngIRCd will not initialize any (other)
soeckets on its own! All sockets must be configured in the systemd(8)
socket unit configuration file in this case, see ./contrib/ngircd.socket
for example.
Probably it would be interesting to match passed-in sockets to configured
listening sockets and to initialize all the remaining ones not already
set up by systemd(8), but this is kept back for an other patch ...
See
- <http://0pointer.de/blog/projects/socket-activation.html>
- <http://0pointer.de/blog/projects/socket-activation2.html>
- <http://www.freedesktop.org/software/systemd/man/systemd.socket.html>
This patch introduces the new numeric 310(RPL_WHOISSERVICE) and enables
WHOIS to display information about IRC services. This numeric is used
for this purpose by InspIRCd, for example -- but as usual, other numerics
are in use, too, like 613 in UltimateIRCd ...
Please note that neither the Operator (+o) not the "bot status" (+B)
of an IRC service id displayed in the output.
Change suggested by Federico G. Schwindt <fgsch@lodoss.net>, Thanks.
For example OpenBSD uses a "autoconf" and "automake" wrapper script which
tells the user to set AUTOCONF_VERSION and AUTOMAKE_VERSION environment
variables. This patch enhances autogen.sh to not detect these wrapper
scripts as regular autoconf/automake commands but to set the required
environment variables after detecting the real "command-X.Y" commands.
Tested on OpenBSD 5.1.
"egrep -o" isn't portable and not available on OpenBSD, for example. So
let's use sed instead to get the automake version. The expression used
now is less specific but should work as well ...
This fixes the following warning, at least on OpenBSD 4.8:
irc-info.o(.text+0x2427): In function `IRC_WHO':
src/ngircd/irc-info.c:896: warning: strcpy() is almost always misused,
please use strlcpy()
Make sure that all log messages end with a correct punctuation mark.
The rules for formatting log messages are:
1. Add punctuation marks to all messages passed to the actual logging
functions like Log() and LogDebug().
2. Don't add any punctuation marks to messages that are stored in
variables for later use or are passed over the network.
3. IP addresses, DNS host names and IRC server names should be quoted.
4. Messages originating in the network should be quoted (at least if
they are "untrusted" or variable).
Most probably this patch doesn't fix all mistakes, but it should be a
good starting point ...
The header file "netinet/in_systm.h" already is optional in ngIRCd, so
don't require it in the configure script. Now ngIRCd can be built on
Minix 3 again :-)
Don't run ngIRCd in forground mode but let it daemonize itself. This
enhances the log output of "systemctl status ngircd.service", because
now ngIRCd doesn't print out its PID and timestamp on each log message
which is redundant: it becomes logged by systemd/journald already.
Now ngIRCd returns a more specific error message for numeric
ERR_NOTREGISTERED(451) when a regular user tries to use a command that
isn't allowed for users but for servers: ERR_NOTREGISTEREDSERVER(451).