1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-10-28 21:06:16 +00:00
Commit Graph

3114 Commits

Author SHA1 Message Date
Alexander Barton
cb7e4e8679 Commands.txt: Update description of the "USERS" command 2013-02-10 00:25:19 +01:00
Alexander Barton
35452b3157 Commands.txt: Update description of the "SUMMON" command 2013-02-10 00:25:09 +01:00
Alexander Barton
e90d30a2cc Commands.txt: Update description of the "SERVLIST" command 2013-02-10 00:24:52 +01:00
Alexander Barton
45ab73ac81 Commands.txt: Update description of the "WHOWAS" command 2013-02-10 00:24:34 +01:00
Alexander Barton
78978994df Commands.txt: Update description of the "WHOIS" command 2013-02-10 00:24:14 +01:00
Alexander Barton
19cb29da51 Commands.txt: Update description of the "WHO" command 2013-02-10 00:23:59 +01:00
Alexander Barton
6ed3b6f85c Commands.txt: Update description of the "VERSION" command 2013-02-10 00:23:43 +01:00
Alexander Barton
5b8f13a4a9 Commands.txt: Update description of the "USERHOST" command 2013-02-10 00:23:27 +01:00
Alexander Barton
b6e6e2e1da Commands.txt: Update description of the "TIME" command 2013-02-10 00:23:10 +01:00
Alexander Barton
7c7fc8b5c4 Commands.txt: Update description of the "STATS" command 2013-02-10 00:22:50 +01:00
Alexander Barton
1a5e08f3f6 Commands.txt: Update description of the "NAMES" command 2013-02-10 00:22:24 +01:00
Alexander Barton
e051ea06fc Commands.txt: Update description of the "MOTD" command 2013-02-10 00:20:41 +01:00
Alexander Barton
a7023113e7 Commands.txt: Update description of the "LUSERS" command 2013-02-10 00:20:19 +01:00
Alexander Barton
02e24f5d1e Commands.txt: Update description of the "LINKS" command 2013-02-10 00:19:59 +01:00
Alexander Barton
13740c1bf4 Commands.txt: Update description of the "ISON" command 2013-02-10 00:19:41 +01:00
Alexander Barton
8212b730c7 Commands.txt: Update description of the "INFO" command 2013-02-10 00:19:20 +01:00
Alexander Barton
a4daa613ae Commands.txt: Update description of the "ADMIN" command 2013-02-10 00:18:43 +01:00
Alexander Barton
5dce3301bd Update irc-info.c to use irc-macros.h
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.
2013-02-09 23:58:11 +01:00
Alexander Barton
a917514546 Add new irc-macros.h to project
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_
2013-02-09 23:55:42 +01:00
Alexander Barton
4dc940f59e irc-info.c: add/streamline function documentation comments
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 ...
2013-02-09 23:33:29 +01:00
Alexander Barton
5facf5c15e irc-info: move static functions at the top of the file 2013-02-09 23:18:49 +01:00
Alexander Barton
1e8b775a7a "WHO <hostmask>": use displayed hostname for matching
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.
2013-02-08 17:18:43 +01:00
Alexander Barton
0ad0fe207a Implement new function Client_SearchServer()
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.
2013-02-05 13:06:08 +01:00
Alexander Barton
f295117fba New configuration option "IdleTimeout": exit daemon when idle
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.
2013-02-04 23:15:53 +01:00
Alexander Barton
8ab097afb7 Implement support for systemd(8) "socket activation"
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>
2013-02-04 21:52:27 +01:00
Alexander Barton
84e24afd2f contrib/README: add more files 2013-02-04 21:31:42 +01:00
Alexander Barton
f16d230530 Rename ports_initlisteners() to Init_Listeners() 2013-02-03 21:43:29 +01:00
Alexander Barton
3a3b3225d4 NewListener(): Code cleanup 2013-02-03 21:43:29 +01:00
Alexander Barton
84a599ece4 Enable WHOIS to display information about IRC Services
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.
2013-02-03 21:32:53 +01:00
Alexander Barton
b7690a0add Commands.txt: Add description for the "CHARCONV" command 2013-02-03 19:02:42 +01:00
Alexander Barton
18ecc2fd81 Commands.txt: Add description for the "CAP" command 2013-02-03 18:59:44 +01:00
Alexander Barton
999c11ad49 Exit message: use singular & plural :-) 2013-01-27 23:22:00 +01:00
Alexander Barton
c891b5f250 autogen.sh: Check for autoconf/automake wrapper scripts
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.
2013-01-27 12:54:48 +01:00
Alexander Barton
419ff38a07 autogen.sh: Don't use "egrep -o", use "sed"
"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 ...
2013-01-27 12:25:58 +01:00
Alexander Barton
8d8201502f IRC_WHO_Channel(): Use strlcpy() instead of strcpy()
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()
2013-01-27 01:00:32 +01:00
Alexander Barton
d38d153f51 Streamline punctuation of log messages
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 ...
2013-01-26 17:00:03 +01:00
Alexander Barton
fd260404ca configure: "netinet/in_systm.h" is optional
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 :-)
2013-01-24 22:45:00 +01:00
DNS
a551942635 contrib/Debian/rules: Do no compress Commands.txt
This is required, because ngIRCd can't use a compressed file as
help text ...

(cherry picked from commit 6d09b4f366f656f6d2732ea96a653e086380e458)
2013-01-23 19:55:56 +01:00
Alexander Barton
b60d5a0a11 AUTHORS: Update list of contributors 2013-01-23 19:45:00 +01:00
Alexander Barton
fae0054d31 AUTHORS: Use "email address syntax" 2013-01-23 19:41:52 +01:00
Alexander Barton
73fded7515 Commands.txt: Import descriptions from "rbose/command_help"
Import command description texts from the "rbose/command_help" branch,
which have been written by DNS <dns@rbose.org> -- thanks a lot!
2013-01-23 15:16:33 +01:00
Alexander Barton
7630e8ffc6 Commands.txt: Reorder some commands
Reorder some commands and introduce new section "Connection Handling".
Idea by DNS <dns@rbose.org>, thanks!
2013-01-23 15:02:46 +01:00
Alexander Barton
4552ad5269 Commands.txt: Fix some wording and spelling 2013-01-23 14:51:19 +01:00
Alexander Barton
3d49e8ac84 ngircd.service: Use "forking" service type
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.
2013-01-23 00:44:16 +01:00
Alexander Barton
508ca3044d Return better "Connection not registered as server link" errors
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).
2013-01-22 10:54:06 +01:00
Alexander Barton
d8f2964710 MODE: don't report error on "more modes than parameters"
Don't report ERR_NEEDMOREPARAMS(461) when a MDOE command with more modes
than nicknames is handled, as well as for channel limit and key changes
without specifying the limit or key parameters.

This is how a lot (all?) other IRC servers behave, including ircd2.11,
InspIRCd, and ircd-seven. And because of clients (tested with Textual and
mIRC) sending bogus MODE commands like "MODE -ooo nick", end-users got the
expected result as well as correct but misleading error messages ...

If ngIRCd is compiled using "strict mode", these errors are still reported.

Reported-by: Tim <tim@stackwatch.net>
2013-01-13 17:18:04 +01:00
Alexander Barton
ab00997698 Correctly detect when SSL subsystem must be initialized
This patch introduces the new function Conf_SSLInUse() to check when the
current server configuration requires the SSL subsystem to be initialized
and accounts incoming as well as outgoing connections -- so this fixes
commit bb20aeb9 ("Initialize SSL when needed only, and disable SSL on
errors") which only handled the inbound case  ...

Tested-by: Brett Smith <brett@w3.org>
2013-01-07 20:34:55 +01:00
Alexander Barton
b4966aa1bd configure: use AS_HELP_STRING for --with-iconv 2013-01-06 17:46:06 +01:00
Alexander Barton
0703fcd719 autogen.sh: Enforce serial test harness on automake >=1.13 2013-01-05 03:05:56 +01:00
Alexander Barton
4594583f52 autogen.sh: Reformat messages. 2013-01-05 02:39:06 +01:00