1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-13 02:10:27 +00:00
Commit Graph

3596 Commits

Author SHA1 Message Date
Alexander Barton
4d519cfdbf Predefined channles: Fix handling of legacy configuration options
Fix the handling of legacy "Key" and "MaxUsers" [Channel] settings:

- Activate them before evaluating the "Modes" parameter, to allow the
  latter to override those legacy options.
- Enforce setting the respective +k/+l mode(s) to support the legacy
  "Mode = kl" notation, which was valid but is an invalid MODE string:
  key and limit are missing! So set them manually when "k" or "l" are
  detected in the first MODE parameter.
- Sort modes +kl alphabetically, adjust test suite accordingly.
2020-03-29 00:45:59 +01:00
Alexander Barton
fed22184c5 Enhance logging while setting up predefined channels 2020-03-29 00:30:36 +01:00
michi
a3072ce698 Allow multiple "Modes =" lines per [Channel] section 2020-03-29 00:29:50 +01:00
michi
decf98d5ef Evaluate initial channel modes
Allow setting arbitrary channel modes in the config file.

Closes #55.
2020-03-28 23:47:21 +01:00
Alexander Barton
a77353361b Xcode: add missing files in src/testsuite, and sort them 2020-03-28 23:46:16 +01:00
Alexander Barton
3f7caff630 Add "FNC" (forced nick changes) to ISUPPORT(005) numeric
Most probably this doesn't make any difference to any client, but it
seems correct. See <http://www.irc.org/tech_docs/005.html> for details.
2020-03-22 14:07:32 +01:00
Alexander Barton
8d173a3328 Fix memory leak in portabtest Check_strtok_r()
Fix the following Clang "LeakSanitizer" error (which isn't quite
relevant in this test program, but anyway):

  ERROR: LeakSanitizer: detected memory leaks

  Direct leak of 7 byte(s) in 1 object(s) allocated from:
      #0 0x7f8c4d022810 in strdup (/lib/x86_64-linux-gnu/libasan.so.5+0x3a810)
      #1 0x5601a801491a in Check_strtok_r (/net/arthur/home/alex/Develop/ngIRCd/ngIRCd.git/src/portab/portabtest+0x291a)
      #2 0x5601a8014d77 in main (/net/arthur/home/alex/Develop/ngIRCd/ngIRCd.git/src/portab/portabtest+0x2d77)
      #3 0x7f8c4c69009a in __libc_start_main ../csu/libc-start.c:308

  SUMMARY: AddressSanitizer: 7 byte(s) leaked in 1 allocation(s).
  FAIL: portabtest
2020-02-15 14:56:07 +01:00
michi
e7cb9b1a00 Reuse old SSL key if loading a new one failed 2020-02-15 14:47:20 +01:00
Alexander Barton
c411643d45 Update Xcode project for latest Xcode version (11.3.1) 2020-02-11 20:33:44 +01:00
Alexander Barton
2e1797d5a5 Remove outdated OpenBSD/NetBSD systrace.policy
Systrace was removed from OpenBSD and NetBSD, so remove this (old and
outdated?) configuration file from the ./contrib directory.

See <https://en.wikipedia.org/wiki/Systrace>.

Thanks to "michi" for pointing this out on #ngircd!
2020-02-11 20:31:15 +01:00
Alexander Barton
f5fa7db4ba 2020! 2020-01-21 22:02:40 +01:00
Alexander Barton
22cae1b5fc Enhance handling of command line errors, and "--help" & "--version"
Return with exit code 0 ("no error") when "--help" or "--version" was
used (this resulted in exit code 1, "error" before).

And exit with code 2 ("command line error") for all invalid command
line options, and show the error message on stderr (message was printed
to stdout before, and exit code was 1, "generic error").

This new behaviour is more in line with the GNU "coding standards",
see <https://www.gnu.org/prep/standards/html_node/_002d_002dhelp.html>.
2019-12-31 16:34:23 +01:00
Alexander Barton
fb5aa8f652 Fix and update Xcode project
- Reference correct contrib/Makefile.am file
- Correctly sort contrib/nglog.sh
- Add "ORGANIZATIONNAME" setting
2019-12-16 16:57:56 +01:00
Alexander Barton
91e87af605 Update ngindent.sh name in Makefile and Xcode project, too 2019-12-16 16:54:13 +01:00
Alexander Barton
9286686c09 contrib/README: Add nglog.sh script to the list 2019-12-07 01:43:00 +01:00
Alexander Barton
1f69f1d0ab contrib/nglog.sh: Use bright colors for warning & error messages 2019-12-07 01:42:33 +01:00
Alexander Barton
b03fcaab5a contrib/ngindent.sh: Enhance and rename script
Add more GNU indent options for better results, and add the ".sh" suffix
to bring this script in line with the others in the contrib/ folder.
2019-12-07 01:41:39 +01:00
Windree
70eb1ee57d Update install documentation: libgnutls-dev
According https://packages.debian.org/search?keywords=libgnutls28-dev
in Ubuntu and Debian libgnutls-dev package name is libgnutls28-dev

Closes #264.

Thanks Windree!
2019-12-02 00:45:09 +01:00
Alexander Barton
80437b2533 Add simple log colorization script: ./contrib/nglog.sh
This script parses the log output of ngircd(8), and colorizes the
messages accoring to their log level. Example usage:

ngircd -f $PWD/doc/sample-ngircd.conf -np | ./contrib/nglog.sh
2019-11-10 22:07:26 +01:00
Alexander Barton
de1de40551 Log received signals (using strsignal(3), when available) 2019-11-10 21:12:43 +01:00
Alexander Barton
4169cb25e6 Make test suite compatible with Haiku 2019-11-03 15:15:59 +01:00
Alexander Barton
9a69c02567 Add VIM "swap files" (*.swp) to .gitignore file 2019-11-03 15:01:51 +01:00
JRMU
147e424d98 Fix hostmask cloaking bug, don't cloak multiple times
Previously, each server would cloak every user's hostmask. The problem
is that if a network has more than one server, then a user's hostmask
would get cloaked twice. This patch ensures that a server only cloaks
the hostmask if it has not yet been cloaked (the period indicates it's
still an IP address).

Closes #228.
2019-09-09 15:30:44 +02:00
Alexander Barton
e954b59d41 Fix some typos (documentation files, ngircd.conf manual page, ...)
Spotted by Étienne Mollier <etienne.mollier@mailoo.org> and Christoph
Biedl <debian.axhn@manchmal.in-ulm.de>, see Debian bug #932462
(https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=932462). Thank you!
2019-07-21 16:23:07 +02:00
Alexander Barton
b1893e740e Make sure HAVE_LIBSSL is defined, even when using pkg-config
Without this, the configure script assumes and states that OpenSSL will
be used, but the code won't include support for it because there we use
the "HAVE_LIBSSL" define to test for it ("#ifdef HAVE_LIBSSL").

So define the latter when pkg-config(1) is used, too.

This fixes #257, a regression introduced by commit ad86a41ee :-/
2019-07-01 22:03:47 +02:00
Alexander Barton
2c495a1fe7 Enlage buffers of info texts to 128 bytes.
This includes:
- "Real name" of a client (4th filed of the USER command).
- Server info text ("Info" configuration option).
- Admin info texts and email address ("AdminInfo1", "AdminInfo2" and
  "AdminEmail" configuration options).
- Network name ("Network" configuration option).

The limit was 64 bytes before ...

Closes #258.
2019-06-29 16:13:16 +02:00
Alexander Barton
52c53f523a Add ".vscode" to .gitignore file 2019-06-29 16:04:59 +02:00
Alexander Barton
f8002057f2 Streamline handling of invalid and unset server name
Don't exit during runtime (REHASH command, HUP signal), because the
server name can't be changed in this case anyway and the new invalid
name will be ignored.
2019-06-29 16:02:52 +02:00
Alexander Barton
13122bc97d Fix and extend documentation a little bit
- Fix syntax of LINKS amd LIST commands.
- Whitespace and spelling fixes.
- Add some more information about IRCv3 support.
2019-06-29 16:02:18 +02:00
Alexander Barton
bb1d014aba Slightly reoder startup steps, and enhance logging
- Show name of configuration file at the beginning of start up.
- Add a message when ngIRCd is ready, including its host name.
- Show name of configuration file on REHASH (SIGHUP), too.
- Change level of "done message" to NOTICE, like "starting" & "ready".
- Initialize IO functions before channels, connections, clients, ...
2019-06-29 16:00:53 +02:00
Alexander Barton
ad8c4b8efb Update autogen.sh & INSTALL for pkg-config requirements 2019-04-20 18:51:39 +02:00
Fabrice Fontaine
ad86a41eee configure.ng: use pkg-config to find PpenSSL dependencies
OpenSSL can depends on lz or latomic so use pkg-config to find those
dependencies and fallback to existing mechanism.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Closes #256.
2019-04-20 18:50:09 +02:00
Christoph Biedl
aec86aa84c ngircd.conf.5: Fix wording as suggested by lintian 2019-01-28 10:45:53 +01:00
Alexander Barton
74631fa728 ngIRCd Release 25 2019-01-23 23:15:02 +01:00
Alexander Barton
1d4f80b422 Platforms.txt: Add and update systems
- Update x86_64/apple/darwin16.5.0 (Apple clang 8.1)
- Add x86_64/apple/darwin17.7.0 (Apple clang 10.0)
- Add x86_64/apple/darwin18.2.0 (Apple clang 10.0)
- Add x86_64/unknown/haiku (gcc 7.3)
- Update x86_64/pc/linux-gnu (gcc 6.3.0)
2019-01-23 22:45:07 +01:00
shankari
fe01ef9a51 Fix documentation of MotdPhrase length (#254)
The max length is actually 126 (< 127), since the check errors out if
length >= 127. See
<https://github.com/ngircd/ngircd/blob/master/src/ngircd/conf.c#L1487>.

I didn't look through the history to see when the change happened. I
just happened to find during a migration that my 140 character MOTD
didn't work.

Update sample configuration file as well as the man page.
2019-01-03 14:06:01 +01:00
Alexander Barton
96bad2b861 2019! 2019-01-02 00:10:06 +01:00
Alexander Barton
456eea6f18
Implement new configuration option "MaxPenaltyTime" (#251)
This option configures the maximum penalty time increase in seconds, per
penalty event. Set to -1 for no limit (the default), 0 to disable
penalties altogether. ngIRCd doesn't use penalty increases higher than 2
seconds during normal operation, so values higher than 1 rarely make
sense.

Disabling (or reducing) penalties can greatly speed up "make check" runs
for example, see below, but are mostly a debugging feature and normally
not meant to be used on production systems!

Some example timings running "make check" from my macOS workstation:

- MaxPenaltyTime not set: 4:41,79s
- "MaxPenaltyTime = 1":   3:14,71s
- "MaxPenaltyTime = 0":     25,46s

Closes #249.
2018-11-28 14:13:09 +01:00
Rosen Penev
7690716e4f Fix compilation without deprecated OpenSSL APIs (#252) 2018-11-28 14:10:46 +01:00
Alexander Barton
c97fb2e93e Update Xcode project for latest Xcode version (10.0) 2018-10-30 01:56:13 +01:00
Alexander Barton
c8162a80be Fix some compiler warnings of Apple Xcode/Clang
For example:

* src/ngircd/irc-login.c:102:21: Implicit conversion loses integer
  precision: 'int' to 'char'

* src/ngircd/conn.c:1084:9: Implicit conversion turns floating-point
  number into integer: 'double' to 'bool'

* src/tool/tool.c:85:10: Implicit conversion loses integer precision:
  'int' to 'char'
2018-10-30 01:53:24 +01:00
Alexander Barton
e8e04b4c8f Fix typos/errors/... in file comments
Found by Xcode/Clang code analyzer. No functional changes.
2018-10-30 01:48:31 +01:00
Alexander Barton
a38eea8987 Update doc/Protocol.txt for IRCv3 WEBIRC extension
See commit d0f9d3d92.
2018-10-07 23:55:30 +02:00
ItsOnlyBinary
d0f9d3d92e Allow a 5th parameter in WEBIRC
According to an IRCv3 extension, the 5th parameter can be used for extra
flags that are fine to ignore for now, but limiting WEBIRC params to 4
causes a syntax error.

See https://github.com/ircv3/ircv3-ideas/issues/12 for more information.

This closes #247.
2018-10-07 23:33:27 +02:00
Alexander Barton
bb4101cd6c Update HowToRelease.txt: Include the website 2018-09-01 01:48:17 +02:00
Alexander Barton
e29e15ca27 Platforms.txt: Add and update systems
- Update x86_64/unknown/freebsd10.0 (FreeBSD clang 3.3)
- Add x86_64/unknown/freebsd10.3 (FreeBSD clang 3.4)
- Update i386/pc/solaris2.11 (gcc 4.8.2)
- Add mipsel/openwrt/linux-uclibc (gcc 4.8) [cross-compiler]
- Add x86_64/pc/linux-gnu (gcc 5.4.0) [Win10/WSL]
- Platforms.txt: Update "pre-ANSI compiler" foot note.

Thanks to Götz Hoffart <goetz@hoffart.de>!
2018-08-29 23:05:45 +02:00
Alexander Barton
8bd88be8ad ngIRCd Release 25~rc1 2018-08-11 21:37:42 +02:00
Alexander Barton
fb760d9473 Update and fix logcheck(8) rules 2018-05-20 21:52:56 +02:00
Alexander Barton
7f2d21f962 Update config.guess and config.sub to recent versions
- config.guess: 2018-03-08
- config.sub: 2018-03-08
2018-04-01 02:32:24 +02:00
Alexander Barton
6af9476cad Initialize listening socket: Streamline error message 2018-04-01 02:19:08 +02:00