1
0
mirror of https://github.com/osmarks/ngircd.git synced 2025-09-29 07:24:04 +00:00

Compare commits

..

91 Commits

Author SHA1 Message Date
Alexander Barton
f2cef85fde ngIRCd Release 23 2015-11-16 21:33:15 +01:00
Alexander Barton
6ed59a8548 Update ChangeLog file 2015-11-15 17:07:56 +01:00
Alexander Barton
49acb68584 Update doc/Platforms.txt 2015-11-15 17:06:24 +01:00
Alexander Barton
d8aba40f07 Explicitly cast time_t to long when printing it out
This prevents wrong sizes data types on platforms where time_t doesn't
equal a long any more, for example on OpenBSD.
2015-11-15 15:14:12 +01:00
Alexander Barton
87887bc632 contrib/Debian/changelog: Fix email address 2015-09-11 21:11:38 +02:00
Alexander Barton
cb3a4321a2 Documentation: Spelling fixes 2015-09-06 19:38:16 +02:00
Alexander Barton
1e84b2640e ngIRCd Release 23~rc1 2015-09-06 16:57:01 +02:00
Alexander Barton
86d27eaf89 Update AUTHORS and .mailmap file
And add a note to doc/HowToRelease.txt to not forget to update the list
of authors in the future ...
2015-09-06 16:51:56 +02:00
Alexander Barton
4acf95ab61 Update ChangeLog file 2015-09-03 17:05:58 +02:00
Alexander Barton
57cd41d289 Add ".clang_complete" file
This file is used of the "linter-clang" package of the Atom editor,
for example.
2015-09-03 16:46:48 +02:00
Alexander Barton
eb9929e82c Make server-to-server protocol more robust
Now ngIRCd catches more errors on the server-to-server (S2S) protocol
that could crash the daemon before. This hasn't been a real problem
because the IRC S2S protocol is "trusted" by design, but the behavior
is much better now.

Thanks to wowaname on #ngircd for pointing this out!
2015-09-03 16:22:36 +02:00
Alexander Barton
c2e4c304e3 platformtest.sh: Fix quoting 2015-08-27 00:12:50 +02:00
Alexander Barton
c56138c280 autogen.sh: Fix parameter quoting 2015-08-27 00:10:41 +02:00
Alexander Barton
a1ce3fc779 ngircd.init: Fix non-POSIX "==" test operator 2015-08-27 00:10:18 +02:00
Christoph Biedl
ccc899c7f4 Reproducible builds
At the moment ngircd fails the tests for reproducible builds in Debian
since it uses the __DATE__ and __TIME__ macros for the INFO command.

Instead of patching this out I decided to implement an optional
constant BIRTHTIME that allows you to set a time stamp for the "Birth
Date" information, in seconds since the epoch, like in

    export CFLAGS += -DBIRTHTIME=$(shell date +%s --date="2015/08/15 23:42:22")

In the future, Debian will provide a SOURCE_DATE_EPOCH environment
variable, dealing with the situation until then will be my job.

The time format was taken from the NGIRCd_StartStr formatting in
ngircd.c so the "Birth Date" and "On-line since" lines in the INFO
output look similar:

    :irc.example.net 371 nick :ngIRCd 22.1-IDENT+IPv6+IRCPLUS+PAM+SSL+SYSLOG+ZLIB-x86_64/pc/linux-gnu
    :irc.example.net 371 nick :Birth Date: Tue Aug 25 2015 at 18:11:11 (CEST)
    :irc.example.net 371 nick :On-line since Tue Aug 25 2015 at 18:11:33 (CEST)
    :irc.example.net 374 nick :End of INFO list

The format of the time stamped is changed, but as far as I can tell, there's no
rule that is violated by that.

Bonus level: Reformat the messages so the time stamps are aligned.
2015-08-26 10:05:36 +02:00
Alexander Barton
2a52befa56 Update systemd service file 2015-08-14 19:55:32 +02:00
Alexander Barton
2c18e9a7f8 Update NEWS and ChangeLog files 2015-08-07 17:20:47 +02:00
Alexander Barton
9811223fb8 Whitespace fixes (no functional changes) 2015-08-01 15:15:30 +02:00
Alexander Barton
0083fe177f Fix debug message "Client ... is closing connection"
It should be "host:port"!
2015-08-01 15:14:23 +02:00
Alexander Barton
34578b8b30 INSTALL: Add deprecation notice for "PredefChannelsOnly"
Obviously I forgot to list this for ngIRCd 21 ... oops!
2015-08-01 14:52:11 +02:00
Alexander Barton
85dc4d8777 "NoticeAuth" configuration variable is deprecated now! 2015-08-01 14:52:07 +02:00
Alexander Barton
64c265cf33 Merge pull request #217 from SaberUK/master+notice-auth
Use "NOTICE *" before registration instead of "NOTICE AUTH".
2015-08-01 14:51:04 +02:00
Alexander Barton
b72a7a4b96 Channel mode "N" is targeted for ngIRCd 23. 2015-08-01 14:26:16 +02:00
Alexander Barton
b8482fd3cf First check if channel has mode "N", then check membership
This should be more efficient.
2015-08-01 14:26:11 +02:00
Alexander Barton
90ea23ab4f Merge pull request #214 from Flupsy/channel-mode-N
Channel mode N (users on this channel can't change their nick)
2015-08-01 14:24:20 +02:00
Alexander Barton
6e7e744cc6 Add "build+*" to .gitignore file 2015-07-20 09:34:39 +02:00
Alexander Barton
24cec978ee Remote GIT.txt from Makefile[.am], too! 2015-07-20 09:34:14 +02:00
Alexander Barton
a02524465e READNE, AUTHORS: Update mailing list and issue tracker URLs 2015-07-19 03:21:37 +02:00
Alexander Barton
813ea874f8 doc/Contributing.txt: Add note about using GitHub 2015-07-19 03:20:48 +02:00
Alexander Barton
813897023e Remove doc/GIT.txt: it is outdated
ngIRCd uses GitHub, and Git itself is quite common today. So don't
include an own Git "mini HowTo" any longer.
2015-07-19 03:19:41 +02:00
Alexander Barton
a5ca8be658 Streamline ".gitignore" files 2015-07-19 03:03:06 +02:00
Alexander Barton
c364d67f80 Update NEWS and ChangeLog files 2015-07-19 02:41:03 +02:00
Peter Powell
5545e1bebf Rename NoticeAuth to NoticeBeforeRegistration.
The old name is still supported for compatibility reasons.
2015-07-14 14:43:19 +01:00
Peter Powell
d118cd74b6 Use "NOTICE *" before registration instead of "NOTICE AUTH".
AUTH is a valid nickname so sending notices to it is probably not
a good idea. Use * as the target instead as done with numerics
when the nick is not available.

This mimics the behaviour in Charybdis, IRCD-Hybrid, InspIRCd 2.2,
Plexus 4, etc.
2015-07-14 14:37:42 +01:00
Ian Chard
599626d570 Only enforce channel mode N on users (not servers or services) 2015-06-26 10:36:57 +01:00
Alexander Barton
571b1a8b83 Merge pull request #215 from tejr/master
Specify session context for OpenSSL clients.

Closes #182.
2015-06-26 07:41:19 +02:00
Tom Ryder
b71a0ddbd5 Specify session context for OpenSSL clients
Reconnecting to ngIRCd 22.1 built with OpenSSL with some OpenSSL
clients, including Pidgin and stunnel 5.06, attempts to reuse a session
and fails due to the absence of this line.

The error message in syslog from ngIRCd is:

> SSL protocol error: SSL_accept (error:140D9115:SSL
> routines:SSL_GET_PREV_SESSION:session id context uninitialized)

This patch appears to fix the problem for both Pidgin and stunnel; it
may work for other OpenSSL clients that attempt to re-use sessions.

*   <https://github.com/ngircd/ngircd/issues/182>
*   <https://developer.pidgin.im/ticket/11568>
*   <https://www.openssl.org/docs/ssl/SSL_CTX_set_session_id_context.html>
2015-06-26 16:21:54 +12:00
Ian Chard
7ff16e8116 Don't bother looking for +N channels for an op 2015-06-24 20:28:27 +01:00
Unit 193
f6b7764eb5 Fix several broken URLs. 2015-06-24 21:15:44 +02:00
Ian Chard
adfe5affed Don't use a standard message number 2015-06-24 15:51:37 +01:00
Ian Chard
27934afd7e Add documentation for channel mode N 2015-06-24 15:41:31 +01:00
Ian Chard
f64cb901ef Add channel mode N (normal user can't change nick while on channel) 2015-06-24 15:37:56 +01:00
Alexander Barton
d28d838cb9 Merge remote-tracking branch 'LucentW/master'
* LucentW/master:
  Fix with oneshot invites
  Fixed building issues\
  Implement timestamp tracking of invites
  Keep track of who placed bans/invites/excepts
  IRC operators w/OperCanMode can kick anyone [already cherry-picked]

Closes #203, Closes #205.
2015-06-07 21:13:45 +02:00
Alexander Barton
2fc61ce8a6 Make setgroups(3) function optional
For example, Interix is missing this function, which prevented
ngIRCd to build on this platform. When setgroups(3) isn't available,
a warning message is issued when ngIRCd starts up.
2015-06-06 22:19:47 +02:00
LucentW
5c48d7e9c7 IRC operators w/OperCanMode can kick anyone
Closes #202.

(cherry picked from commit 10c7ba99e7)
2015-05-16 20:48:37 +02:00
LucentW
0f490b5cae Implement numeric RPL_LISTSTART(321)
lightIRC and other clients expecting RPL_LISTSTART should now behave correctly.

Closes #207.

(cherry picked from commit 0680ce5fd99bc643651d1433bcdaf271aeb73c46)
2015-05-16 20:29:10 +02:00
Alexander Barton
a43d79aeff Update ngircd.conf.5: "CloadUserToNick" hides user and real name
Closes #208.
2015-05-15 23:15:09 +02:00
LucentW
93a872a36b Fix with oneshot invites
This should finally implement correctly oneshot invites sent via /INVITE
2015-05-15 14:02:37 +02:00
Alexander Barton
c4245220de Fix MatchCaseInsensitive[List]](): lowercase string _and_ pattern
Up to now, only the the string ("haystack") became lowercased and was
the compared to the pattern ("needle") -- which failed, when the pattern
itself wasn't all lowercase ...
2015-05-13 23:47:53 +02:00
Alexander Barton
f8f7f83f5a Streamline effect of "MorePrivacy" option (WHOIS, LIST)
- Update documentation in ngircd.conf(5)
- LIST: Don't hide channels for IRC Ops when "MorePrivacy" is in effect
- WHOIS: Don't hide IP addresses/hostnames when "MorePrivacy" is in effect

Closes #198
2015-05-13 22:42:51 +02:00
LucentW
03c8997af3 Fixed building issues\
Now builds cleanly. Pass all tests from make check.
2015-05-13 20:08:26 +00:00
LucentW
4396936f38 Implement timestamp tracking of invites
Now lists nodes also have the "onlyonce" field, since the valid_until is
used to keep the timestamp of placing. Found no references to onlyonce
or about valid_until being == 1, though, so it might be unused, but
still available for other enhancements.
2015-05-11 22:15:01 +02:00
LucentW
4da04640e6 Keep track of who placed bans/invites/excepts
Implements #203.
WARNING: it does not track the time of placement of invites, since the
time_t is already used as a flag for single use invites!
2015-05-11 22:15:00 +02:00
LucentW
10c7ba99e7 IRC operators w/OperCanMode can kick anyone 2015-05-11 22:12:30 +02:00
Alexander Barton
1136b97690 doc/Modes.txt: Fix indentation 2015-04-30 09:29:41 +02:00
Alexander Barton
d9a97f2857 Merge pull request #197 from LucentW/master
Implement user mode "I": Hide channels on WHOIS

User mode +I prevents ngIRCd from showing channels on WHOIS.
IRC Operators can always see those.

Closes #197.
2015-04-30 09:28:15 +02:00
LucentW
a4af9024fd Fixed indents 2 2015-04-29 20:29:00 +02:00
LucentW
6fc53558ed Fixed indents and documentation
(also updated the copyright date on the txt I edited)
2015-04-29 20:25:18 +02:00
LucentW
21767c968d Implement +I (private channel list on whois)
Implements enhancement requested in issue #179
2015-04-29 14:04:06 +02:00
Alexander Barton
c5da483685 Make sure that the target user is able to join a local channel
Implement ERR_USERNOTONSERV(504) numeric and make sure that the
target user is on the same server when inviting other users to
local ("&") channels.

ircd-ratbox uses the ERR_USERNOTONSERV(504) numeric for this, and I
think this is a good idea -- other IRC daemons (like ircu) silently
drop such impossible invites, but thats not a big benefit ...

Idea by Cahata, thanks! Closes #183.
2015-04-12 20:59:43 +02:00
Alexander Barton
4330f5d1c9 INVITE command: Enforce 1 second penalty time
This prevents flooding of the target client.

This closes #186. Reported by Cahata, thanks!
2015-04-12 20:14:24 +02:00
Alexander Barton
81b81c818c MODE command: Always report channel creation time
Up to now when receiving a MODE command, ngIRCd only reported the channel
creation time to clients that were members of the channel. This patch
reports the channel creation time to all clients, regardless if they are
joined to that channel or not.

At least ircd-seven behaves like this.

This closes #188. Thanks Cahata!
2015-04-12 19:39:20 +02:00
Alexander Barton
52825cde29 Update Xcode project for latest Xcode version (6.3) 2015-04-10 22:30:17 +02:00
Alexander Barton
03e6568079 ngIRCd Release 22.1 2015-04-06 14:36:14 +02:00
Alexander Barton
7dacc314f9 Update NEWS and ChangeLog for ngIRCd 22.1 2015-04-06 14:33:23 +02:00
Alexander Barton
24adfb88b4 Update some copyright notices for 2015 2015-04-06 14:32:59 +02:00
Alexander Barton
6ed440a030 Platforms.txt: Add and update systems
- Update powerpc/apple/darwin7.9.0

Thanks to Götz Hoffart <goetz@hoffart.de>!
2015-04-06 14:07:16 +02:00
Alexander Barton
c7bbc9a390 Fix spelling of RPL_WHOISBOT message text 2015-03-27 22:51:21 +01:00
Alexander Barton
6171beb7ab Don't send nick name as default PART reason
No other IRC daemon seems to do this (today?), don't remember why
ngIRCd did it in the first place ...

Closes #185.

Reported by Cahata in #ngircd, thanks!
2015-03-14 11:13:50 +01:00
Alexander Barton
2196e945e4 Fix "WHO #<chan>" showing invisible users and hiding all visible
The logic is reversed ...

This bug has been introduced by commit c74115f2, "Simplify mode checking on
channels and users within a channel", ngIRCd releases 21, 21.1, and 22 are
affected :-(

Problem reported by Cahata in #ngircd, Thanks!
2015-03-14 10:16:16 +01:00
Alexander Barton
f16eb1b686 Fix typo in src/testsuite/README 2015-03-11 22:14:24 +01:00
Alexander Barton
c41f18e3f9 Auth PING: Fix our information text for manual sending of "PONG"
Up to now, ngIRCd doesn't send a valid IRC command at all, oops!
2015-01-20 22:50:13 +01:00
Alexander Barton
dbfe1beca8 Auth PING: The numeric ID is a "long", use atol() 2015-01-20 22:49:23 +01:00
Alexander Barton
6bdae55177 Auth PING: Don't send a prefix in our PING command
The prefix confuses WeeChat, at least, which doesn't send an appropriate
PONG in the case ...

Debugging and patch by "wowaname" on #ngircd, thanks!
2015-01-20 22:44:36 +01:00
Alexander Barton
fb5ae9e844 FAQ: How can I "auto-op" users in channels? 2015-01-13 12:44:29 +01:00
Alexander Barton
bd8d4e710c Fix syntax of ERR_LISTFULL_MSG(478) numeric
Pointed out by "wowaname" in #ngircd, thanks!
2014-12-27 01:50:27 +01:00
Alexander Barton
9a931a549b Enhance debug messages while sending CHANINFO commands 2014-12-20 15:35:49 +01:00
Alexander Barton
3c30490d54 Reset "last try" timer when enabling a passive server
This results in a new connection attempt as soon as possible.
2014-12-20 15:31:55 +01:00
Alexander Barton
6250335352 Change log message for "Can't resolve address" 2014-12-10 11:11:42 +01:00
Alexander Barton
7e14bd3b58 Change log messages issued for IP address forgeries 2014-12-10 11:02:03 +01:00
Alexander Barton
31b3c83c1f Merge remote-tracking branch 'alex/TestsuiteNoDNS'
* alex/TestsuiteNoDNS:
  Test suite: Don't use DNS lookups
2014-11-01 20:14:09 +01:00
Alexander Barton
6e4235443e Merge branch 'CipherListNoSSL3'
* CipherListNoSSL3:
  INSTALL: List the changed SSL CipherList default value.
  Update "CipherList" to not enable SSLv3 by default
2014-10-26 11:58:22 +01:00
Alexander Barton
cdcf474f15 INSTALL: List the changed SSL CipherList default value. 2014-10-26 11:55:28 +01:00
Alexander Barton
f33a4067a1 HowToRelease.txt: Add note about the bug tracker 2014-10-22 23:12:10 +02:00
Alexander Barton
100de3e4cc Update "CipherList" to not enable SSLv3 by default
Idea, initial patch, and testing by Christoph Biedl
<ngircd.anoy@manchmal.in-ulm.de>
2014-10-16 13:42:24 +02:00
Alexander Barton
7b58538074 ngIRCd Release 22 2014-10-11 20:30:42 +02:00
Alexander Barton
3f436e1810 Platforms.txt: Add and update systems
- Add armv7l/unk./linux-gnueabihf
- Update hppa/unknown/openbsd5.4
- Update i686/unknown/gnu0.5
- Update i686/pc/cygwin
- Add i386/pc/linux-gnu, gcc 4.4.5
- Update x86_64/apple/darwin14.0.0
- Update x86_64/unknown/freebsd8.4
- Update x86_64/unknown/freebsd9.2
- Add x86_64/unknown/freebsd10.0
- Add/update x86_64/unknown/linux-gnu, various compilers
- Update x86_64/unknown/openbsd4.8
- Add x86_64/unknown/openbsd5.5

Tested version is "rel-22-rc1-3-g967deeb".
2014-10-11 20:24:44 +02:00
Alexander Barton
967deebacd User mode "F": Fix description in NEWS and ChangeLog 2014-10-07 03:28:00 +02:00
Alexander Barton
74262a4093 Update NEWS and ChangeLog for ngIRCd 22 once more ... 2014-10-06 21:51:59 +02:00
Alexander Barton
be88707027 Match list patterns case-insensitive
The invite-, ban-, and except lists are affected by this change,
as well as G-Lines an K-Lines.

Problem pointed out by "wowaname" on #ngircd, thanks!
2014-10-06 21:47:34 +02:00
Alexander Barton
3f807e1045 Test suite: Don't use DNS lookups
Different operating systems do behave quite differently when doing DNS
lookups, for example "127.0.0.1" sometimes resolves to "localhost" and
sometimes to "localhost.localdomain" (for example OpenBSD). And other
systems resolve "localhost" to the real host name (for example Cygwin).

So not using DNS at all makes the test site much more portable.
2014-06-09 02:15:52 +02:00
87 changed files with 819 additions and 490 deletions

4
.clang_complete Normal file
View File

@@ -0,0 +1,4 @@
-I./src
-I./src/ipaddr
-I./src/portab
-I./src/tool

40
.gitignore vendored
View File

@@ -1,4 +1,5 @@
Makefile
Makefile.am
Makefile.in
aclocal.m4
ansi2knr.1
@@ -7,6 +8,7 @@ ansi2knr.h
ar-lib
autom4te.cache
build-stamp-ngircd*
build+*
compile
config.cache
config.log
@@ -24,3 +26,41 @@ ngircd.dest
.deps
*.a
*.o
doc/sample-ngircd.conf
doc/src/html
man/ngircd.8
man/ngircd.conf.5
src/config.h
src/config.h.in
src/config.h.in~
src/stamp-h1
src/ngircd/check-help
src/ngircd/check-version
src/ngircd/ngircd
src/ngircd/ngircd.exe
src/portab/portabtest
src/portab/portabtest.exe
src/testsuite/*.e_
src/testsuite/channel-test
src/testsuite/connect-test
src/testsuite/invite-test
src/testsuite/join-test
src/testsuite/kick-test
src/testsuite/logs
src/testsuite/message-test
src/testsuite/misc-test
src/testsuite/mode-test
src/testsuite/ngircd-test1.log
src/testsuite/ngircd-test1.motd
src/testsuite/ngircd-test2.log
src/testsuite/ngircd-test2.motd
src/testsuite/opless-channel-test
src/testsuite/server-link-test
src/testsuite/T-ngircd1
src/testsuite/T-ngircd1.exe
src/testsuite/T-ngircd2
src/testsuite/T-ngircd2.exe
src/testsuite/tests
src/testsuite/tests-skipped.lst
src/testsuite/who-test
src/testsuite/whois-test

View File

@@ -1,4 +1,14 @@
# mailmap file for git-[short]log and git-blame
# use "git shortlog -se" to see the list of all authors.
Alexander Barton <alex@barton.de> <anonymous>
Alexander Barton <alex@barton.de> <alex@kfreebsd.barton.de>
Alexander Barton <anonymous>
Ali Shemiran <ashemira@ucsd.edu>
Dana Dahlstrom <dana+ngIRCd@cs.ucsd.edu> <dana@cs.ucsd.edu>
Dana Dahlstrom <dana+ngIRCd@cs.ucsd.edu> <dana+70@cs.ucsd.edu>
DNS <dns@rbose.org>
LucentW <lucent@zebes.info> <LucentW@users.noreply.github.com>

18
AUTHORS
View File

@@ -2,16 +2,18 @@
ngIRCd - Next Generation IRC Server
http://ngircd.barton.de/
(c)2001-2014 Alexander Barton and Contributors.
(c)2001-2015 Alexander Barton and Contributors.
ngIRCd is free software and published under the
terms of the GNU General Public License.
-- AUTHORS and CONTRIBUTORS --
Note: If you have critics, patches or something else, please feel free to
post a mail to the ngIRCd mailing list: <ngircd-ml@arthur.barton.de> (please
see <http://ngircd.barton.de/#ml> for details).
Note:
If you have comments, patches or something else, please feel free to post
a mail to the ngIRCd mailing list: <ngircd-ml@ngircd.barton.de> (please see
<http://ngircd.barton.de/support.php> for details) or join the ngIRCd IRC
channel: <irc://irc.barton.de/ngircd>.
Don't mail the people listed here directly, if possible!
@@ -39,15 +41,23 @@ Eric Grunow <egrunow@ucsd.edu>
Federico G. Schwindt <fgsch@lodoss.net>
Gabor Adam Toth <tg@tgbit.net>
Goetz Hoffart <goetz@hoffart.de>
Ian Chard <ian@chard.org>
Ilja Osthoff <i.osthoff@gmx.net>
Jari Aalto <jari.aalto@cante.net>
LucentW <lucent@zebes.info>
Mantas Mikulėnas <grawity@gmail.com>
Neale Pickett <neale@woozle.org>
Peter Powell <petpow@saberuk.com>
Rolf Eike Beer <eike@sf-mail.de>
Roy Sindre Norangshol <roy.sindre@norangshol.no>
Scott Perry <scperry@ucsd.edu>
Sean Reifschneider <jafo-rpms@tummy.com>
Sebastian Köhler <sebkoehler@whoami.org.uk>
Tassilo Schweyer <dev@welterde.de>
Tom Ryder <tom@sanctum.geek.nz>
Unit 193 <unit193@ubuntu.com>
William Pitcock <nenolod@dereferenced.org>
Yecheng Fu <cofyc.jackson@gmail.com>
xor <xorboy@gmail.com>

155
ChangeLog
View File

@@ -2,14 +2,133 @@
ngIRCd - Next Generation IRC Server
http://ngircd.barton.de/
(c)2001-2014 Alexander Barton and Contributors.
(c)2001-2015 Alexander Barton and Contributors.
ngIRCd is free software and published under the
terms of the GNU General Public License.
-- ChangeLog --
ngIRCd 22
ngIRCd 23 (2015-11-16)
- Explicitly cast time_t to long when printing it out: this prevents
wrong sized data types on platforms where time_t doesn't equal a
long any more, for example on OpenBSD (which would result in garbled
output on those platforms).
- contrib/Debian/changelog: Fix email address.
- Documentation: Spelling fixes; update doc/Platforms.txt.
ngIRCd 23~rc1 (2015-09-06)
- Add ".clang_complete" file, which is used by the "linter-clang" package
of the Atom editor, for example.
- Make server-to-server protocol more robust: ngIRCd now catches more
errors on the server-to-server (S2S) protocol that could crash the
daemon before. This hasn't been a real problem because the IRC S2S
protocol is "trusted" by design, but the behavior is much better now.
Thanks to wowaname on #ngircd for pointing this out!
- Make platformtest.sh, autogen.sh, and ngircd.init more portable.
- Enables "reproducible builds" for ngIRCd: Use the optional BIRTHTIME
constant while building ngIRCd, which contains a time stamp for the
"Birth Date" information, in seconds since the epoch.
See <https://wiki.debian.org/ReproducibleBuilds>.
- Update "contrib/ngircd.service" file for systemd.
- INSTALL: Add deprecation notice for "PredefChannelsOnly" variable.
- Use "NOTICE *" before registration instead of "NOTICE AUTH". "AUTH" is
a valid nickname so sending notices to it is probably not a good idea.
Use "*" as the target instead as done with numerics when the nick is not
available. This mimics the behavior in Charybdis, IRCD-Hybrid, InspIRCd
2.2, Plexus 4, etc. Closes #217.
The "NoticeAuth" configuration variable (ngircd.conf) has been renamed
to "NoticeBeforeRegistration" accordingly, but the old name is still
supported for compatibility reasons.
- Implement new channel mode "N" (regular users can't change their nick
name while on this channel). Closes #214.
- README, AUTHORS: Update mailing list and issue tracker URLs.
- Remove doc/GIT.txt (it is outdated), update doc/Contributing.txt:
ngIRCd uses GitHub, and Git itself is quite common today. So don't
include an own Git "mini HowTo" any longer.
- Specify session context for OpenSSL clients. This enables some OpenSSL
clients, including Pidgin and stunnel 5.06, to reuse a session.
Patch by Tom Ryder <tom@sanctum.geek.nz>, thanks! Closes #182.
- Keep track of who placed bans, invites, and excepts.
Idea and implementation by LucentW, Thanks! Closes #203.
- Make setgroups(3) function optional: For example, Interix is missing
this function, which prevented ngIRCd to build on this platform. When
setgroups(3) isn't available, a warning message is issued on startup.
- Implement numeric RPL_LISTSTART(321). lightIRC and other clients
expecting RPL_LISTSTART should now behave correctly.
Idea and implementation by LucentW, Thanks! Closes #207.
- Update ngircd.conf.5: "CloakUserToNick" hides user _and_ real name.
This closes #208.
- Fix case insensitive pattern matching: Up to now, only the the input
string became lowercased and was then compared to the pattern -- which
failed when the pattern itself wasn't all lowercase!
- Streamline the effect of "MorePrivacy" option: Update documentation
in ngircd.conf(5); don't hide channels for IRC Ops on LIST and don't
hide IP addresses/hostnames on WHOIS when "MorePrivacy" is in effect.
This closes #198.
- IRC operators now can kick anyone when "OperCanMode" is set.
Idea and implementation by LucentW, Thanks! Closes #202.
- Implement user mode "I": Hide channels on WHOIS: this mode prevents
ngIRCd from showing channels on WHOIS (IRC Operators can always see
the channel list).
Idea and implementation by LucentW, Thanks! Closes #197.
- INVITE command: Implement ERR_USERNOTONSERV(504) numeric and make sure
that the target user is on the same server when inviting other users
to local ("&") channels.
Idea by Cahata, thanks! Closes #183.
- INVITE command: Enforce 1 second penalty time, which prevents flooding
of the target client.
This closes #186. Reported by Cahata, thanks!
- MODE command: Always report channel creation time. Up to now when
receiving a MODE command, ngIRCd only reported the channel creation
time to clients that were members of the channel. This patch reports
the channel creation time to all clients, regardless if they are joined
to that channel or not. At least ircd-seven behaves like this.
This closes #188. Reported by Cahata, thanks!
- Update Xcode project for latest Xcode version (6.3).
ngIRCd 22.1 (2015-04-06)
- Update doc/Platforms.txt and doc/FAQ.txt.
- Fix spelling of RPL_WHOISBOT message text.
- Don't send nick name as default PART reason: No other IRC daemon seems
to do this (today?). Closes #185.
Reported by Cahata in #ngircd, thanks!
- Fix "WHO #<chan>" showing invisible users and hiding all visible, the
logic was reversed! This bug has been introduced by commit c74115f2,
"Simplify mode checking on channels and users within a channel", ngIRCd
releases 21, 21.1, and 22 are affected :-( Problem reported by Cahata
in #ngircd, Thanks!
- Fix typo in src/testsuite/README
- Auth PING: Fix our information text for manual sending of "PONG". Up to
now, ngIRCd doesn't send a valid IRC command at all, oops!
- Auth PING: Fix internal time stamp conversion and don't send a prefix in
our PING command. The prefix confuses WeeChat, at least, which doesn't
send an appropriate PONG in the case ...
Debugging and patch by "wowaname" on #ngircd, thanks!
- Fix syntax of ERR_LISTFULL_MSG(478) numeric. Pointed out by "wowaname"
in #ngircd, thanks!
- Enhance debug messages while sending CHANINFO commands.
- Reset "last try" timer when enabling a passive server. This results in
a new connection attempt as soon as possible.
- Change log message for "Can't resolve address" and for IP address
forgeries.
- doc/HowToRelease.txt: Add note about the bug tracker.
- Update "CipherList" to not enable SSLv3 by default. Idea, initial patch,
and testing by Christoph Biedl <ngircd.anoy@manchmal.in-ulm.de>.
- Change ngIRCd test suite not to use DNS lookups: Different operating
systems do behave quite differently when doing DNS lookups, for example
"127.0.0.1" sometimes resolves to "localhost" and sometimes to
"localhost.localdomain" (for example OpenBSD). And other OS resolve
"localhost" to the real host name (for example Cygwin). So not using
DNS at all makes the test site much more portable.
ngIRCd 22 (2014-10-11)
- Match all list patterns case-insensitive: this affects the invite-,
ban-, and except lists, as well as G-Lines an K-Lines.
Problem pointed out by "wowaname" on #ngircd, thanks!
ngIRCd 22~rc1 (2014-09-29)
- Sync "except lists" between servers: Up to now, ban, invite, and G-Line
@@ -34,10 +153,10 @@ ngIRCd 22
- Allow "DefaultUserModes" to set all possible modes, including modes only
settable by IRC Operators.
- Spoofed prefixes: Really kill connection on non-server links.
- Implement user mode "F": "relaxed flood protection". Clients with mode "F"
set are allowed to send data to the daemon. This mode is only settable by
IRC Operators and can cause problems in the network -- so be careful and
only set it on "trusted" clients!
- Implement user mode "F": "relaxed flood protection". Clients with mode
"F" set are allowed to rapidly send data to the daemon. This mode is only
settable by IRC Operators and can cause problems in the network -- so be
careful and only set it on "trusted" clients!
User mode "F" is used by Bahamut for this purpose, for example.
- Handle "throttling" in a single function: ngIRCd implements "command
throttling" and "bps throttling" (bytes per second). The states are
@@ -518,7 +637,7 @@ ngIRCd 19.2 (2012-06-19)
"CC=xxx MAKE=yyy ./platformtest.sh" calling convention.
- Add instructions for setting up Atheme IRC services.
- Implement support for IRC capability handling, the new "CAP" command,
and capablity "multi-prefix" which allows both the NAME and WHO command
and capability "multi-prefix" which allows both the NAME and WHO command
handlers to return more than one "class prefix" to the client.
- Update Xcode project files: reference missing documentation files.
- Fix: Don't ignore "permission denied" errors when enabling chroot.
@@ -818,7 +937,7 @@ ngIRCd 17 (2010-11-07)
- contrib/platformtest.sh: make command name quoting consistent
ngIRCd 17~rc3 (2010-10-27)
- Xcode builds: detect version number correctly, updateed project file
- Xcode builds: detect version number correctly, updated project file
to use the Mac OS X 10.5.x SDK, disable pam_fail_delay() because it
is only available starting with Mac OS X 10.6, and generate a default
PAM configuration for the Mac OS X Installer.app package of ngIRCd.
@@ -830,7 +949,7 @@ ngIRCd 17 (2010-11-07)
ngIRCd 17~rc2 (2010-10-25)
- ZeroConf: include header files missing since commit a988bbc86a.
- Generate ngIRCd version number from GIT tag.
- Make sourcecode compatible with ansi2knr again. This allows to compile
- Make source code compatible with ansi2knr again. This allows to compile
ngIRCd using a pre-ANSI K&R C compiler again.
- ./configure: check if C compiler can compile ISO Standard C.
- ./configure: check support for C prototypes again.
@@ -846,7 +965,7 @@ ngIRCd 17 (2010-11-07)
Howl, Avahi or on Mac OS X).
- New configuration option "SyslogFacility" to define the syslog "facility"
(the "target"), to which ngIRCd should send its log messages.
Possible values are system dependant, but most probably "auth", "daemon",
Possible values are system dependent, but most probably "auth", "daemon",
"user" and "local1" through "local7" are possible values; see syslog(3).
Default is "local5" for historical reasons.
- Dump the "internal server state" (configured servers, established
@@ -867,7 +986,7 @@ ngIRCd 17 (2010-11-07)
- Make configure switch "--docdir" work (closes: #108).
- Reformat and update FAQ.txt a little bit.
- INSTALL: mention SSL, IPv6, and changed handling of MotdFile.
- Change MOTD file handling: ngIRCd now caches the contens of the MOTD
- Change MOTD file handling: ngIRCd now caches the contents of the MOTD
file, so the daemon now requires a HUP signal or REHASH command to
re-read the MOTD file when its content changed.
- Startup: open /dev/null before chroot'ing the daemon.
@@ -903,14 +1022,14 @@ ngIRCd 16 (2010-05-02)
- Include netinet/{in.h, in_systm.h} when checking for netinet/ip.h
- Only include <netinet/in_systm.h> if it exists
- Updated doc/Platforms.txt
- Enhace connection statistics counters: display total number of served
- Enhance connection statistics counters: display total number of served
connections on daemon shutdown and when a new client connects using
the new numeric RPL_STATSCONN (250).
ngIRCd 16~rc1 (2010-03-25)
- Various fixes to the build system and code cleanups.
- contrib/platformtest.sh: Only show latest commit.
- Updatet doc/Platforms.txt, added new README-Interix.txt documenting
- Updated doc/Platforms.txt, added new README-Interix.txt documenting
how to tun ngIRCd on Microsoft Services for UNIX (MS SFU, MS SUA).
- Updated links to the ngIRCd homepage (bug tracker, mailing list).
- Added missing modes to USERMODES #define
@@ -938,7 +1057,7 @@ ngIRCd 15 (2009-11-07)
ngIRCd 15~rc1 (2009-10-15)
- Do not add default listening port (6667) if SSL ports were specified, so
ngIRCd can be configured to only accept SSL-encrypted connections now.
- Enable IRC operators to use the IRC command SQUIT (insted of the already
- Enable IRC operators to use the IRC command SQUIT (instead of the already
implemented but non-standard DISCONNECT command).
- New configuration option "AllowRemoteOper" (disabled by default) that
enables remote IRC operators to use the IRC commands SQUIT and CONNECT
@@ -992,7 +1111,7 @@ ngIRCd 14 (2009-04-20)
- Fix memory leak when a encrypted and compressed server link goes down.
(closes bug #95, reported by Christoph, fiesh@fiesh.homeip.net)
- Fix handling of channels containing dots.
(closes ug #93, reported by Gonosz Csiga)
(closes bug #93, reported by Gonosz Csiga)
ngIRCd 13 (2008-12-25)
@@ -1222,7 +1341,7 @@ ngIRCd 0.9.0 (2005-07-24)
- Fixed ./configure test for TCP Wrappers: now it runs on Mac OS X as well.
- Enhanced configure script: now you can pass an (optional) search path
to all --with-XXX parameters, e. g. "--with-ident=/opt/ident".
- Removed typedefs for the native C datatypes.
- Removed typedefs for the native C data types.
Use stdbool.h / inttypes.h if available.
- New configuration option "OperServerMode" to enable a workaround needed
when running an network with ircd2 servers and "OperCanUseMode" enabled
@@ -1403,7 +1522,7 @@ ngIRCd 0.7.0 (2003-05-01)
to add a new server (ngIRCd tries to connect new servers only once!).
- Added DISCONNECT command ("DISCONNECT <name>") to disable servers.
- Restructured the documentation: Now the main language is English. The
german documentation has been removed (until there is a maintainer).
German documentation has been removed (until there is a maintainer).
- Enhanced killing of users caused by a nickname collision.
- Better error detection for status code ("numerics") forwarding.
- Moved tool functions to own library: "libngtool".
@@ -1444,7 +1563,7 @@ ngIRCd 0.6.1 (2003-01-21)
member when changing his channel user modes which could crash ngIRCd.
Older changes (sorry, only available in german language):
Older changes (sorry, only available in German language):
ngIRCd 0.6.0, 24.12.2002

33
INSTALL
View File

@@ -2,7 +2,7 @@
ngIRCd - Next Generation IRC Server
http://ngircd.barton.de/
(c)2001-2014 Alexander Barton and Contributors.
(c)2001-2015 Alexander Barton and Contributors.
ngIRCd is free software and published under the
terms of the GNU General Public License.
@@ -12,17 +12,34 @@
I. Upgrade Information
~~~~~~~~~~~~~~~~~~~~~~
Differences to version 22.x
- The "NoticeAuth" ngircd.conf configuration variable has been renamed to
"NoticeBeforeRegistration". The old "NoticeAuth" variable still works but
is deprecated now.
- The default value of the SSL "CipherList" variable has been changed to
"HIGH:!aNULL:@STRENGTH:!SSLv3" (OpenSSL) and "SECURE128:-VERS-SSL3.0"
(GnuTLS) to disable the old SSLv3 protocol by default.
To enable connections of clients still requiring the weak SSLv3 protocol,
the "CipherList" must be set to its old value (not recommended!), which
was "HIGH:!aNULL:@STRENGTH" (OpenSSL) and "SECURE128" (GnuTLS), see below.
Differences to version 20.x
- Starting with ngIRCd 21, the ciphers used by SSL are configurable and
default to HIGH:!aNULL:@STRENGTH (OpenSSL) or SECURE128 (GnuTLS).
Previous version were using the OpenSSL or GnuTLS defaults, DEFAULT
and NORMAL respectively.
default to "HIGH:!aNULL:@STRENGTH" (OpenSSL) or "SECURE128" (GnuTLS).
Previous version were using the OpenSSL or GnuTLS defaults, "DEFAULT"
and "NORMAL" respectively.
- When adding GLINE's or KLINE's to ngIRCd 21 (or newer), all clients matching
the new mask will be KILL'ed. This was not the case with earlier versions
that only added the mask but didn't kill already connected users.
- The "PredefChannelsOnly" configuration variable has been superseded by the
new "AllowedChannelTypes" variable. It is still supported and translated to
the appropriate "AllowedChannelTypes" setting but is deprecated now.
Differences to version 19.x
- Starting with ngIRCd 20, users can "cloak" their hostname only when the
@@ -31,7 +48,7 @@ Differences to version 19.x
set mode +x. This prevents regular users from changing their hostmask to
the name of the IRC server itself, which confused quite a few people ;-)
Differences to version 17
Differences to version 17.x
- Support for ZeroConf/Bonjour/Rendezvous service registration has been
removed. The configuration option "NoZeroconf" is no longer available.
@@ -68,7 +85,7 @@ Differences to version 17
You should adjust your ngircd.conf and run "ngircd --configtest" to make
sure that your settings are correct and up to date!
Differences to version 16
Differences to version 16.x
- Changes to the "MotdFile" specified in ngircd.conf now require a ngircd
configuration reload to take effect (HUP signal, REHASH command).
@@ -145,7 +162,7 @@ If you are using one of the "big" operating systems or Linux distributions,
you can use the following commands to install all the required packages to
build the sources including all optional features and to run the test suite:
* RedHat / Fedora based distributions:
* Red Hat / Fedora based distributions:
yum install \
autoconf automake expect gcc glibc-devel gnutls-devel \
@@ -169,7 +186,7 @@ This step is therefore only interesting for developers.
autogen.sh produces the Makefile.in's, which are necessary for the configure
script itself, and some more files for make. To run autogen.sh you'll need
GNU autoconf and GNU automake: at least autoconf 2.61 and automake 1.10 are
requird, newer is better. But don't use automake 1.12 or newer for creating
required, newer is better. But don't use automake 1.12 or newer for creating
distribution archives: it will work but lack "de-ANSI-fication" support in the
generated Makefile's! Stick with automake 1.11.x for this purpose ...
So automake 1.11.x and autoconf 2.67+ is recommended.

View File

@@ -1,6 +1,6 @@
#
# ngIRCd -- The Next Generation IRC Daemon
# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
# Copyright (c)2001-2015 Alexander Barton (alex@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
@@ -13,7 +13,7 @@ AUTOMAKE_OPTIONS = gnu
SUBDIRS = doc src man contrib
EXTRA_DIST = autogen.sh configure.ng .mailmap
EXTRA_DIST = autogen.sh configure.ng .clang_complete .mailmap
clean-local: osxpkg-clean
rm -f build-stamp*

80
NEWS
View File

@@ -2,14 +2,68 @@
ngIRCd - Next Generation IRC Server
http://ngircd.barton.de/
(c)2001-2014 Alexander Barton and Contributors.
(c)2001-2015 Alexander Barton and Contributors.
ngIRCd is free software and published under the
terms of the GNU General Public License.
-- NEWS --
ngIRCd 22
ngIRCd 23 (2015-11-16)
ngIRCd 23~rc1 (2015-09-06)
- Use "NOTICE *" before registration instead of "NOTICE AUTH". "AUTH" is
a valid nickname so sending notices to it is probably not a good idea.
Use "*" as the target instead as done with numerics when the nick is not
available. This mimics the behavior in Charybdis, IRCD-Hybrid, InspIRCd
2.2, Plexus 4, etc. Closes #217.
The "NoticeAuth" configuration variable (ngircd.conf) has been renamed
to "NoticeBeforeRegistration" accordingly, but the old name is still
supported for compatibility reasons.
- Implement new channel mode "N" (regular users can't change their nick
name while on this channel). Closes #214.
- Keep track of who placed bans, invites, and excepts.
Idea and implementation by LucentW, Thanks! Closes #203.
- Implement numeric RPL_LISTSTART(321). lightIRC and other clients
expecting RPL_LISTSTART should now behave correctly.
Idea and implementation by LucentW, Thanks! Closes #207.
- Streamline the effect of "MorePrivacy" option: Update documentation
in ngircd.conf(5); don't hide channels for IRC Ops on LIST and don't
hide IP addresses/hostnames on WHOIS when "MorePrivacy" is in effect.
This closes #198.
- IRC operators now can kick anyone when "OperCanMode" is set.
Idea and implementation by LucentW, Thanks! Closes #202.
- Implement user mode "I": Hide channels on WHOIS: this mode prevents
ngIRCd from showing channels on WHOIS (IRC Operators can always see
the channel list).
Idea and implementation by LucentW, Thanks! Closes #197.
- INVITE command: Implement ERR_USERNOTONSERV(504) numeric and make sure
that the target user is on the same server when inviting other users
to local ("&") channels.
Idea by Cahata, thanks! Closes #183.
- MODE command: Always report channel creation time. Up to now when
receiving a MODE command, ngIRCd only reported the channel creation
time to clients that were members of the channel. This patch reports
the channel creation time to all clients, regardless if they are joined
to that channel or not. At least ircd-seven behaves like this.
This closes #188. Reported by Cahata, thanks!
ngIRCd 22.1 (2015-04-06)
- Update "CipherList" to not enable SSLv3 by default. Idea, initial patch,
and testing by Christoph Biedl <ngircd.anoy@manchmal.in-ulm.de>.
- Change ngIRCd test suite not to use DNS lookups: Different operating
systems do behave quite differently when doing DNS lookups, for example
"127.0.0.1" sometimes resolves to "localhost" and sometimes to
"localhost.localdomain" (for example OpenBSD). And other OS resolve
"localhost" to the real host name (for example Cygwin). So not using
DNS at all makes the test site much more portable.
ngIRCd 22 (2014-10-11)
- Match all list patterns case-insensitive: this affects the invite-,
ban-, and except lists, as well as G-Lines an K-Lines.
Problem pointed out by "wowaname" on #ngircd, thanks!
ngIRCd 22~rc1 (2014-09-29)
- Sync "except lists" between servers: Up to now, ban, invite, and G-Line
@@ -24,10 +78,10 @@ ngIRCd 22
- Test suite/platformtest.sh: Detect when tests have been skipped.
- Allow "DefaultUserModes" to set all possible modes, including modes only
settable by IRC Operators.
- Implement user mode "F": "relaxed flood protection". Clients with mode "F"
set are allowed to send data to the daemon. This mode is only settable by
IRC Operators and can cause problems in the network -- so be careful and
only set it on "trusted" clients!
- Implement user mode "F": "relaxed flood protection". Clients with mode
"F" set are allowed to rapidly send data to the daemon. This mode is only
settable by IRC Operators and can cause problems in the network -- so be
careful and only set it on "trusted" clients!
User mode "F" is used by Bahamut for this purpose, for example.
- Use server password when PAM is compiled in but disabled.
- Streamline punctuation of log messages.
@@ -270,7 +324,7 @@ ngIRCd 19.2 (2012-06-19)
which still is the default when "CloakHostModeX" isn't set.
- Add instructions for setting up Atheme IRC services.
- Implement support for IRC capability handling, the new "CAP" command,
and capablity "multi-prefix" which allows both the NAME and WHO command
and capability "multi-prefix" which allows both the NAME and WHO command
handlers to return more than one "class prefix" to the client.
ngIRCd 19.1 (2012-03-19)
@@ -433,7 +487,7 @@ ngIRCd 17 (2010-11-07)
ngIRCd 17~rc2 (2010-10-25)
- Generate ngIRCd version number from GIT tag.
- Make sourcecode compatible with ansi2knr again. This allows to compile
- Make source code compatible with ansi2knr again. This allows to compile
ngIRCd using a pre-ANSI K&R C compiler again.
ngIRCd 17~rc1 (2010-10-11)
@@ -442,7 +496,7 @@ ngIRCd 17 (2010-11-07)
Howl, Avahi or on Mac OS X).
- New configuration option "SyslogFacility" to define the syslog "facility"
(the "target"), to which ngIRCd should send its log messages.
Possible values are system dependant, but most probably "auth", "daemon",
Possible values are system dependent, but most probably "auth", "daemon",
"user" and "local1" through "local7" are possible values; see syslog(3).
Default is "local5" for historical reasons.
- Dump the "internal server state" (configured servers, established
@@ -452,7 +506,7 @@ ngIRCd 17 (2010-11-07)
signal SIGUSR1, when debug code is compiled in, not only on startup
using the command line parameters.
- Implement user mode "x": host name cloaking (closes: #102).
- Change MOTD file handling: ngIRCd now caches the contens of the MOTD
- Change MOTD file handling: ngIRCd now caches the contents of the MOTD
file, so the daemon now requires a HUP signal or REHASH command to
re-read the MOTD file when its content changed.
- Allow IRC ops to change channel modes even without OperServerMode set.
@@ -468,7 +522,7 @@ ngIRCd 17 (2010-11-07)
ngIRCd 16 (2010-05-02)
ngIRCd 16~rc2 (2010-04-25)
- Enhace connection statistics counters: display total number of served
- Enhance connection statistics counters: display total number of served
connections on daemon shutdown and when a new client connects using
the new numeric RPL_STATSCONN (250).
@@ -490,7 +544,7 @@ ngIRCd 15 (2009-11-07)
ngIRCd 15~rc1 (2009-10-15)
- Do not add default listening port (6667) if SSL ports were specified, so
ngIRCd can be configured to only accept SSL-encrypted connections now.
- Enable IRC operators to use the IRC command SQUIT (insted of the already
- Enable IRC operators to use the IRC command SQUIT (instead of the already
implemented but non-standard DISCONNECT command).
- New configuration option "AllowRemoteOper" (disabled by default) that
enables remote IRC operators to use the IRC commands SQUIT and CONNECT
@@ -673,7 +727,7 @@ ngIRCd 0.7.0 (2003-05-01)
- Documentation is now installed in $(datadir)/doc/ngircd.
Older news (sorry, only available in german language):
Older news (sorry, only available in German language):
ngIRCd 0.6.0, 24.12.2002

16
README
View File

@@ -2,7 +2,7 @@
ngIRCd - Next Generation IRC Server
http://ngircd.barton.de/
(c)2001-2014 Alexander Barton and Contributors.
(c)2001-2015 Alexander Barton and Contributors.
ngIRCd is free software and published under the
terms of the GNU General Public License.
@@ -28,7 +28,7 @@ Please see the INSTALL document for installation and upgrade information!
II. Status
~~~~~~~~~~~
It is not the goal of ngIRCd to implement all the nasty behaviours of the
It is not the goal of ngIRCd to implement all the nasty behaviors of the
original ircd, but to implement most of the useful commands and semantics
specified by the RFCs.
@@ -74,7 +74,7 @@ releases there.
If you are interested in the latest development versions (which are not
always stable), then please read the section about "GIT" on the homepage and
the file "doc/GIT.txt" which describes the use of GIT, the version control
system used by ngIRCd (homepage: http://git-scm.com/).
system used by ngIRCd (homepage: <http://git-scm.com/>).
VI. Bugs
@@ -83,11 +83,11 @@ VI. Bugs
If you find bugs in the ngIRCd (which might be there :-), please report
them at the following URL:
<http://ngircd.barton.de/bugtracker.php>
<https://github.com/ngircd/ngircd/issues>
There you can read about known bugs and limitations, too.
If you have critics, patches or something else, please feel free to post a
mail to the ngIRCd mailing list: <ngircd-ml@arthur.barton.de> (please see
<http://ngircd.barton.de/support.php#ml> for details) or join the ngIRCd
IRC channel: <irc://irc.barton.de/ngircd>.
If you have comments, patches or something else, please feel free to post
a mail to the ngIRCd mailing list: <ngircd-ml@ngircd.barton.de> (please see
<http://ngircd.barton.de/support.php> for details) or join the ngIRCd IRC
channel: <irc://irc.barton.de/ngircd>.

View File

@@ -109,8 +109,8 @@ Notfound()
Run()
{
[ "$VERBOSE" = "1" ] && echo " - running \"$@\" ..."
$@
[ "$VERBOSE" = "1" ] && echo " - running \"$*\" ..."
"$@"
}
# Reset locale settings to suppress warning messages of Perl
@@ -157,7 +157,7 @@ AUTOMAKE_VERSION=`echo $AUTOMAKE | cut -d'-' -f2-`
&& export AUTOMAKE_VERSION || unset AUTOMAKE_VERSION
[ "$VERBOSE" = "1" ] && echo " - AUTOMAKE_VERSION=$AUTOMAKE_VERSION"
[ $# -gt 0 ] && CONFIGURE_ARGS=" $@" || CONFIGURE_ARGS=""
[ $# -gt 0 ] && CONFIGURE_ARGS=" $*" || CONFIGURE_ARGS=""
[ -z "$GO" -a -n "$CONFIGURE_ARGS" ] && GO=1
# Verify that all tools have been found

View File

@@ -221,8 +221,8 @@ AC_CHECK_FUNCS([ \
# Optional functions
AC_CHECK_FUNCS_ONCE([
arc4random arc4random_stir gai_strerror getnameinfo inet_aton \
sigaction sigprocmask snprintf vsnprintf strdup strndup strlcpy strlcat \
strtok_r unsetenv waitpid])
setgroups sigaction sigprocmask snprintf strdup strlcat strlcpy \
strndup strtok_r unsetenv vsnprintf waitpid])
WORKING_GETADDRINFO

View File

@@ -1,3 +1,27 @@
ngircd (23-0ab1) unstable; urgency=low
* New "upstream" release: ngIRCd 23.
-- Alexander Barton <alex@barton.de> Mon, 16 Nov 2015 21:27:03 +0100
ngircd (23~rc1-0ab1) unstable; urgency=low
* New "upstream" release candidate 1 for ngIRCd Release 23.
-- Alexander Barton <alex@barton.de> Sun, 06 Sep 2015 16:55:23 +0200
ngircd (22.1-0ab1) unstable; urgency=low
* New "upstream" release: ngIRCd 22.1.
-- Alexander Barton <alex@barton.de> Mon, 06 Apr 2015 14:34:50 +0200
ngircd (22-0ab1) unstable; urgency=low
* New "upstream" release: ngIRCd 22.
-- Alexander Barton <alex@barton.de> Sat, 11 Oct 2014 20:29:03 +0200
ngircd (22~rc1-0ab1) unstable; urgency=low
* New "upstream" release candidate 1 for ngIRCd Release 22.

View File

@@ -1,7 +1,7 @@
#!/bin/sh
#
# ngIRCd start and stop script for Debian-based systems
# Copyright 2008-2013 Alexander Barton <alex@barton.de>
# Copyright 2008-2015 Alexander Barton <alex@barton.de>
#
### BEGIN INIT INFO
@@ -37,7 +37,7 @@ log_daemon_msg() {
echo -n "$*"
}
log_end_msg() {
[ "$1" == "0" ] && echo "." || echo " failed!"
[ "$1" = "0" ] && echo "." || echo " failed!"
}
log_failure_msg() {
echo "$*"

View File

@@ -84,7 +84,7 @@
FA2D564811EA158B00D37A35 /* pam.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pam.h; sourceTree = "<group>"; };
FA2D564911EA158B00D37A35 /* pam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = pam.c; sourceTree = "<group>"; };
FA2D567A11EA1AB300D37A35 /* libpam.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpam.dylib; path = usr/lib/libpam.dylib; sourceTree = SDKROOT; };
FA322BBA0CEF72E4001761B3 /* ngIRCd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; name = ngIRCd; path = ngircd; sourceTree = BUILT_PRODUCTS_DIR; };
FA322BBA0CEF72E4001761B3 /* ngircd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ngircd; sourceTree = BUILT_PRODUCTS_DIR; };
FA322CD60CEF74B1001761B3 /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = Makefile.am; sourceTree = "<group>"; };
FA322CD90CEF74B1001761B3 /* array.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; path = array.c; sourceTree = "<group>"; };
FA322CDA0CEF74B1001761B3 /* array.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = array.h; sourceTree = "<group>"; };
@@ -310,7 +310,7 @@
1AB674ADFE9D54B511CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
FA322BBA0CEF72E4001761B3 /* ngIRCd */,
FA322BBA0CEF72E4001761B3 /* ngircd */,
);
name = Products;
sourceTree = "<group>";
@@ -626,7 +626,7 @@
name = ngIRCd;
productInstallPath = "$(HOME)/bin";
productName = ngIRCd;
productReference = FA322BBA0CEF72E4001761B3 /* ngIRCd */;
productReference = FA322BBA0CEF72E4001761B3 /* ngircd */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */
@@ -635,7 +635,7 @@
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0430;
LastUpgradeCheck = 0630;
};
buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "ngIRCd" */;
compatibilityVersion = "Xcode 3.2";
@@ -742,7 +742,6 @@
1DEB928B08733DD80010E9CD /* Default */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CODE_SIGN_IDENTITY = "";
GCC_VERSION = "";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -755,7 +754,6 @@
FAB0570C105D917F006AF9E2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
GCC_DEBUGGING_SYMBOLS = full;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_VERSION = "";

View File

@@ -12,7 +12,7 @@
Debian/
- Various files for building Debian GNU/Linux packages (".deb's").
- ngircd.init; ngircd.default: init script for Debian-based systems.
- ngircd.pam: example PAM configuraton.
- ngircd.pam: example PAM configuration.
MacOSX/
- Project files for XCode, the "project builder" of Apple Mac OS X.

View File

@@ -4,8 +4,19 @@ After=network.target
[Service]
Type=forking
User=irc
Group=irc
CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_SYS_CHROOT CAP_NET_BIND_SERVICE
PrivateTmp=yes
PrivateDevices=yes
ProtectSystem=full
ProtectHome=true
NoNewPrivileges=true
RuntimeDirectory=ircd
RuntimeDirectoryMode=750
ExecStart=/usr/sbin/ngircd
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
[Install]
WantedBy=multi-user.target

View File

@@ -1,5 +1,5 @@
%define name ngircd
%define version 22~rc1
%define version 23
%define release 1
%define prefix %{_prefix}

View File

@@ -161,7 +161,7 @@ if [ -r "Makefile" ]; then
fi
# Get ngIRCd version information
eval $(grep "^VERSION = " Makefile | sed -e 's/ //g')
eval "$(grep "^VERSION = " Makefile | sed -e 's/ //g')"
case "$VERSION" in
*~*-*)
VERSION=`echo "$VERSION" | cut -b1-10`

1
doc/.gitignore vendored
View File

@@ -1 +0,0 @@
sample-ngircd.conf

View File

@@ -13,7 +13,7 @@ This document lists and describes the "IRC capabilities" that ngIRCd supports
and can be requested by a IRC/IRCv3 client that supports the "CAP" command.
ngIRCd implements the "IRC Client Capabilities Extension" as described here:
<http://www.leeh.co.uk/draft-mitchell-irc-capabilities-02.html>
<http://ircv3.net/specs/core/capability-negotiation-3.1.html>
I. Supported Capabilities
@@ -25,4 +25,4 @@ I. Supported Capabilities
server to send all possible prefixes which apply to a user in NAMES and
WHO output.
See <http://ircv3.atheme.org/extensions/multi-prefix-3.1>.
See <http://ircv3.net/specs/extensions/multi-prefix-3.1.html>.

View File

@@ -78,7 +78,7 @@ Connection Handling Commands
like this: "CAP REQ :capability1 capability2 capability3" for example.
References:
- <http://ircv3.atheme.org/specification/capability-negotiation-3.1>
- <http://ircv3.net/specs/core/capability-negotiation-3.1.html>
- <http://ngircd.barton.de/doc/Capabilities.txt>
- doc/Capabilities.txt
@@ -380,7 +380,7 @@ Status and Informational Commands
Please note that "all" IRC daemons even parse separate nicknames in
a single parameter (like ":nick1 nick2"), and therefore ngIRCd
implements this behaviour, too.
implements this behavior, too.
References:
- RFC 2812, 4.9 "Ison message"

View File

@@ -2,7 +2,7 @@
ngIRCd - Next Generation IRC Server
http://ngircd.barton.de/
(c)2001-2011 Alexander Barton and Contributors.
(c)2001-2015 Alexander Barton and Contributors.
ngIRCd is free software and published under the
terms of the GNU General Public License.
@@ -15,7 +15,7 @@ get an idea of how to do it the best :-)
- Use GIT
The source code of ngIRCd is maintained using GIT, see doc/GIT.txt. So if
remotely possible, use GIT for your work, too. It makes your and our lifes
remotely possible, use GIT for your work, too. It makes your and our lives
much easier ;-)
- Don't forget to include documentation
@@ -52,3 +52,9 @@ get an idea of how to do it the best :-)
And this is open source, your work must not be 100% finished and perfect,
work in progress is interesting, too: "release early, release often"!
- Use GitHub to create "Pull Requests"
ngIRCd is hosted on GitHub (<https://github.com/ngircd>), so please use the
tools available there and open issues (comment!) and create pull requests!
See <https://help.github.com/articles/using-pull-requests/> for details.

View File

@@ -89,16 +89,21 @@ A: You need to set 'OperCanUseMode = yes' in ngircd.conf, then IRC operators
can use the MODE command for changing modes even when they are not joined
to the specific channel.
Q: How can I "auto-op" users in channels?
A: ngIRCd can't do this: you would have to use some "IRC Services", like
Atheme (<http://atheme.net/atheme.html>) or Anope (<http://www.anope.org>).
See "doc/Services.txt" for setup instructions.
IV. Bugs!?
~~~~~~~~~~
Q: Is there a list of known bugs and desired feature enhancements?
A: Yes. Have a look at the bug tracking system (Bugzilla) for ngIRCd located
at <http://ngircd.barton.de/bugzilla/index.cgi>. There you can file bug
A: Yes. Have a look at the bug tracking system (GitHub issues) for ngIRCd located
at <https://github.com/ngircd/ngircd/issues>. There you can file bug
reports and feature requests as well as search the bug database.
Q: What should I do if I found a bug?
A: Please file a bug report at <http://ngircd.barton.de/bugzilla/index.cgi>!
The author of the particular component will be notified automagically :-)
A: Please file a bug report at <https://github.com/ngircd/ngircd/issues/new>!
The author will be notified automagically :-)

View File

@@ -1,65 +0,0 @@
ngIRCd - Next Generation IRC Server
http://ngircd.barton.de/
(c)2001-2011 Alexander Barton and Contributors.
ngIRCd is free software and published under the
terms of the GNU General Public License.
-- GIT.txt --
The source code of ngIRCd is maintained using GIT, an distributed version
control system. Homepage including documentation: <http://git-scm.com/>.
I. Viewing the source code online
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The ngIRCd "GITweb" interface allows you to browse the GIT repository and
to see all individual files, tags, branches, commits etc.:
<http://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git>
II. Getting the source code
~~~~~~~~~~~~~~~~~~~~~~~~~~~
To access (copy, clone) the source tree repository anonymously, run:
$ git clone git://ngircd.barton.de/ngircd.git
Thereby a new folder "ngircd" will be created containing all the individual
source files.
The newly created directory ("ngircd") is the "working directory", all
GIT commands will be executed from within this directory in the future.
Please note: When checking out a fresh copy of ngIRCd using GIT, the
configure script doesn't exist; you have to run the autogen.sh shell script
(which is included in the source tree) to generate it. This requires you to
have GNU automake and GNU autoconf installed on your system. Please see the
file INSTALL for details!
To update the local GIT repository:
$ git pull
This retrieves all changes and merges them into the current branch.
III. Contributing
~~~~~~~~~~~~~~~~~
Patches should be sent to the ngircd mailing list. List homepage:
http://arthur.barton.de/mailman/listinfo/ngircd-ml
If you do not want to send them to the list, you can also mail them
to Alex Barton, <alex@barton.de>.
IV. Write Access
~~~~~~~~~~~~~~~~
If you want to contribute a couple of patches and write access to the GIT
repository would be handy, please contact Alex Barton, <alex@barton.de>.

View File

@@ -37,6 +37,7 @@ II. How to prepare a new ngIRCd release?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a) Make sure the source tree is in a releasable state ;-)
- is the AUTHORS file up to date?
b) Make sure you have working versions of GNU autoconf and GNU automake
installed on the system you use for generating the release:
@@ -74,4 +75,6 @@ l) Upload and distribute the newly generated ngIRCd release archive(s)
m) Write an announcement to the mailing list, freshmeat, Twitter, ...
n) Relax :-)
n) Update the list of releases in our bug tracker.
o) Relax :-)

View File

@@ -1,6 +1,6 @@
#
# ngIRCd -- The Next Generation IRC Daemon
# Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors
# Copyright (c)2001-2015 Alexander Barton (alex@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
@@ -23,7 +23,6 @@ static_docs = \
Commands.txt \
Contributing.txt \
FAQ.txt \
GIT.txt \
HowToRelease.txt \
Modes.txt \
PAM.txt \

View File

@@ -2,7 +2,7 @@
ngIRCd - Next Generation IRC Server
http://ngircd.barton.de/
(c)2001-2014 Alexander Barton and Contributors.
(c)2001-2015 Alexander Barton and Contributors.
ngIRCd is free software and published under the
terms of the GNU General Public License.
@@ -28,6 +28,7 @@ channels he is using at the moment.
C 19 Only users that share a channel are allowed to send messages.
F 22 Relaxed flood protection (only settable by IRC Operators).
i 0.0.1 User is "invisible".
I 23 No channels are shown on WHOIS (IRC Ops can always see those).
o 0.0.1 User is IRC operator.
q 20 User is protected, can not be kicked from a channel.
r 0.0.1 User is restricted.
@@ -55,6 +56,7 @@ users to lists (e.g. "invite list", "ban list"), others have parameters
m 0.3.0 Channel is moderated, only "voiced" users can send messages.
M 20 Only registered users (and IRC Ops) can send messages.
n 0.3.0 Channel doesn't allow messages of users not being members.
N 23 Users can't change their nickname while on this channel.
O 18 Only IRC operators are allowed to join this channel.
P 0.5.0 Channel is "persistent".
Q 20 Nobody can be kicked from the channel.
@@ -86,4 +88,4 @@ Notes
~~~~~
(1) This mode is not set by ngIRCd itself but by services. ngIRCd handles
the mode transparently and possibly adjusts its behaviour.
the mode transparently and possibly adjusts its behavior.

View File

@@ -30,9 +30,10 @@ alpha/unknown/netbsd3.0 gcc 3.3.3 CVSHEAD 06-05-07 fw Y Y Y Y 3
armv6l/unk./linux-gnueabi gcc 4.7.2 20.2 13-03-08 goetz Y Y Y Y 5
armv6l/unk./linux-gnueabihf gcc 4.6.3 21~rc2 13-10-26 pi Y Y Y Y 5
armv7l/unk./linux-gnueabi gcc 4.4.3 19.1 12-04-29 goetz Y Y Y Y 5
armv7l/unk./linux-gnueabihf gcc 4.6.3 22~rc1-3 14-10-10 alex Y Y Y Y 5
armv7l/unk./linux-gnueabihf gcc 4.8.2 21.1 14-07-15 goetz Y Y Y Y 5
hppa/unknown/openbsd3.5 gcc 2.95.3 CVSHEAD 04-05-25 alex Y Y Y Y
hppa/unknown/openbsd5.4 gcc 4.2.1 21 13-11-10 alex Y Y Y Y 3
hppa/unknown/openbsd5.4 gcc 4.2.1 22~rc1-3 14-10-10 alex Y Y y Y 3
hppa1.1/unknown/linux-gnu gcc 3.3.3 0.8.0 04-05-30 alex Y Y Y Y
hppa2.0/unknown/linux-gnu gcc 3.3.5 13~rc1 08-12-02 alex Y Y Y Y
hppa2.0w-hp-hpux11.11 gcc 4.2.3 14.1 09-07-22 goetz Y Y Y Y
@@ -46,7 +47,7 @@ i386/unknown/freebsd6.2 gcc 3.4.6 20~rc1 12-11-13 alex Y Y Y Y 3
i386/unknown/freebsd7.3 gcc 4.2.1 20~rc1 12-11-13 alex Y Y Y Y 3
i686/pc/minix gcc 4.4.6 21~rc2 13-10-27 alex Y Y N N
i686/unknown/gnu0.3 gcc 4.4.5 19 12-02-29 alex Y Y Y Y
i686/unknown/gnu0.5 gcc 4.8.2 21 14-02-09 alex Y Y Y Y
i686/unknown/gnu0.5 gcc 4.9.1 22~rc1-3 14-10-11 alex Y Y Y Y
i686/unkn./kfreebsd7.2-gnu gcc 4.3.4 15 09-12-02 alex Y Y Y Y 3
i386/unknown/netbsdelf1.5.2 egcs-1.1.2 21 13-11-25 goetz Y Y N Y
i386/unknown/netbsdelf1.6.2 gcc 2.95.3 18 11-07-10 goetz Y Y Y Y
@@ -60,11 +61,12 @@ i386/unknown/openbsd5.3 gcc 4.2.1 21 13-11-28 goetz Y Y Y Y 3
i386/unknown/openbsd5.4 gcc 4.2.1 21 13-11-28 goetz Y Y Y Y 3
i586/pc/haiku gcc 2.95.3 19.2~138 12-10-11 user Y Y N N
i586/pc/interix3.5 gcc 3.3 19 12-02-29 alex Y Y N Y
i686/pc/cygwin gcc 4.8.2 21 14-01-02 alex Y Y N Y
i686/pc/cygwin gcc 4.8.3 22~rc1-3 14-10-10 alex Y Y N Y
i686/pc/linux-gnu gcc 2.7.2 21~38 14-01-06 goetz Y Y Y Y 1
i686/pc/linux-gnu gcc 2.95.4 0.8.0 04-05-30 alex Y Y Y Y 1
i686/pc/linux-gnu gcc 3.3.5 14.1 09-08-04 alex Y Y Y Y 1
i386/pc/linux-gnu gcc 4.1.2 13~rc1 08-12-05 alex Y Y Y Y 1
i386/pc/linux-gnu gcc 4.4.5 22~rc1-3 14-10-10 alex Y Y Y Y 1
i686/pc/linux-gnu gcc 4.3.2 14.1 09-08-04 alex Y Y Y Y 1
m68k/apple/aux3.0.1 gcc 2.7.2 17 10-11-07 alex Y Y N Y
m68k/apple/aux3.0.1 Orig. A/UX 17 10-11-07 alex Y Y N Y 2
@@ -75,7 +77,7 @@ m88k/dg/dgux5.4R3.10 gcc 2.5.8 CVSHEAD 04-03-15 alex Y Y ? ?
mipsel/unknown/linux-gnu gcc 4.1.2 18 11-07-05 goetz Y Y N Y 1
mipsel/unknown/linux-gnu gcc 4.4.5 21 13-11-24 goetz Y Y Y Y 1
powerpc/apple/darwin6.8 gcc 3.1 21 14-01-03 goetz Y Y Y Y
powerpc/apple/darwin7.9.0 gcc 3.3 21.1 14-04-14 goetz Y Y Y Y 3
powerpc/apple/darwin7.9.0 gcc 3.3 22 15-03-22 goetz Y Y Y Y 3
powerpc/apple/darwin8.11.0 gcc 4.0.1 18 11-07-02 goetz Y Y Y Y 3
powerpc/apple/darwin9.8.0 gcc 4.0.1 21 14-01-04 goetz Y Y Y Y 3
powerpc/unknown/linux-gnu gcc 3.3.3 0.8.0 04-05-30 alex Y Y Y Y
@@ -87,20 +89,26 @@ sparc/unknown/openbsd5.5 gcc 4.2.1 21.1 14-05-03 goetz Y Y Y Y 3
x86_64/apple/darwin10.8.0 gcc 4.2.1 21~rc2 13-10-30 alex Y Y Y Y 3
x86_64/apple/darwin12.3.0 gcc 4.2.1 20.2 13-04-01 alex Y Y Y Y 3
x86_64/apple/darwin13.0.0 A-clang 5.0 21 14-01-02 alex Y Y Y Y 3
x86_64/apple/darwin14.0.0 A-clang 6.0 21.1 14-07-25 goetz Y Y Y Y 3
x86_64/apple/darwin14.5.0 A-clang 6.1 23~rc1 15-09-06 alex Y Y Y Y 3
x86_64/unknown/dragonfly3.4 gcc 4.7.2 21 13-11-12 goetz Y Y N Y 3
x86_64/unknown/freebsd8.4 gcc 4.2.1 21 14-01-02 alex Y Y Y Y 3
x86_64/unknown/freebsd9.1 gcc 4.2.1 21 14-01-02 alex Y Y Y Y 3
x86_64/unknown/freebsd8.4 gcc 4.2.1 22~rc1-3 14-10-10 alex Y Y y Y 3
x86_64/unknown/freebsd9.2 gcc 4.2.1 22~rc1-3 14-10-10 alex Y Y Y Y 3
x86_64/unknown/freebsd10.0 F-clang 3.3 22~rc1-3 14-10-10 alex Y Y Y Y 3
x86_64/unkn./freebsd8.1-gnu gcc 4.4.5 19 12-02-26 alex Y Y Y Y 3
x86_64/unknown/linux-gnu clang 3.3 21 14-01-07 alex Y Y Y Y 1
x86_64/unknown/linux-gnu clang 3.4 22~rc1-3 14-10-11 alex Y Y Y Y 1
x86_64/unknown/linux-gnu gcc 4.4.5 23~rc1-3 15-11-15 alex Y Y Y Y 1
x86_64/unknown/linux-gnu gcc 4.7.2 23~rc1-3 15-11-15 alex Y Y Y Y 1
x86_64/unknown/linux-gnu gcc 4.8.2 21 13-12-29 alex Y Y Y Y 1
x86_64/unknown/linux-gnu gcc 4.9.2 23~rc1-3 15-11-15 alex Y Y Y Y 1
x86_64/unknown/linux-gnu nwcc 0.8.2 21 13-12-01 goetz Y Y Y Y 1
x86_64/unknown/linux-gnu Open64 21.1 14-03-27 goetz Y Y Y Y 1
x86_64/unknown/linux-gnu Sun C 5.12 21.1 14-03-27 goetz Y Y Y Y 1
x86_64/unknown/linux-gnu tcc 0.9.25 21.1 14-03-27 goetz Y Y Y Y 1
x86_64/unknown/openbsd4.7 gcc 3.3.5 20~rc1 12-02-26 alex Y Y Y Y 3
x86_64/unknown/openbsd4.8 gcc 4.2.1 21 13-12-28 alex Y Y Y Y 3
x86_64/unknown/openbsd4.8 gcc 4.2.1 22~rc1-3 14-10-10 alex Y Y y Y 3
x86_64/unknown/openbsd5.1 gcc 4.2.1 21 13-12-28 alex Y Y Y Y 3
x86_64/unknown/openbsd5.5 gcc 4.2.1 22~rc1-3 14-10-10 alex Y Y Y Y 3
* Notes

View File

@@ -193,9 +193,9 @@
;MorePrivacy = no
# Normally ngIRCd doesn't send any messages to a client until it is
# registered. Enable this option to let the daemon send "NOTICE AUTH"
# registered. Enable this option to let the daemon send "NOTICE *"
# messages to clients while connecting.
;NoticeAuth = no
;NoticeBeforeRegistration = no
# Should IRC Operators be allowed to use the MODE command even if
# they are not(!) channel-operators?
@@ -259,9 +259,9 @@
# See 'man 1ssl ciphers' (OpenSSL) or 'man 3 gnutls_priority_init'
# (GnuTLS) for details.
# For OpenSSL:
;CipherList = HIGH:!aNULL:@STRENGTH
;CipherList = HIGH:!aNULL:@STRENGTH:!SSLv3
# For GnuTLS:
;CipherList = SECURE128
;CipherList = SECURE128:-VERS-SSL3.0
# Diffie-Hellman parameters
;DHFile = :ETCDIR:/ssl/dhparams.pem

1
doc/src/.gitignore vendored
View File

@@ -1 +0,0 @@
html

2
man/.gitignore vendored
View File

@@ -1,2 +0,0 @@
ngircd.8
ngircd.conf.5

View File

@@ -1,7 +1,7 @@
.\"
.\" ngircd.conf(5) manual page template
.\"
.TH ngircd.conf 5 "Jan 2014" ngIRCd "ngIRCd Manual"
.TH ngircd.conf 5 "Oct 2014" ngIRCd "ngIRCd Manual"
.SH NAME
ngircd.conf \- configuration file of ngIRCd
.SH SYNOPSIS
@@ -252,8 +252,8 @@ The Salt for cloaked hostname hashing. When undefined a random hash is
generated after each server start.
.TP
\fBCloakUserToNick\fR (boolean)
Set every clients' user name to their nickname and hide the one supplied
by the IRC client. Default: no.
Set every clients' user name and real name to their nickname and hide the one
supplied by the IRC client. Default: no.
.TP
\fBConnectIPv4\fR (boolean)
Set this to no if you do not want ngIRCd to connect to other IRC servers using
@@ -291,16 +291,17 @@ Default: none.
.TP
\fBMorePrivacy\fR (boolean)
This will cause ngIRCd to censor user idle time, logon time as well as the
part/quit messages (that are sometimes used to inform everyone about which
client software is being used). WHOWAS requests are also silently ignored.
PART/QUIT messages (that are sometimes used to inform everyone about which
client software is being used). WHOWAS requests are also silently ignored,
and NAMES output doesn't list any clients for non-members.
This option is most useful when ngIRCd is being used together with
anonymizing software such as TOR or I2P and one does not wish to make it
too easy to collect statistics on the users.
Default: no.
.TP
\fBNoticeAuth\fR (boolean)
\fBNoticeBeforeRegistration\fR (boolean)
Normally ngIRCd doesn't send any messages to a client until it is registered.
Enable this option to let the daemon send "NOTICE AUTH" messages to clients
Enable this option to let the daemon send "NOTICE *" messages to clients
while connecting. Default: no.
.TP
\fBOperCanUseMode\fR (boolean)
@@ -375,7 +376,7 @@ SSL Certificate file of the private server key.
.TP
\fBCipherList\fR (string)
Select cipher suites allowed for SSL/TLS connections. This defaults to
"HIGH:!aNULL:@STRENGTH" (OpenSSL) or "SECURE128" (GnuTLS).
"HIGH:!aNULL:@STRENGTH:!SSLv3" (OpenSSL) or "SECURE128:-VERS-SSL3.0" (GnuTLS).
Please see 'man 1ssl ciphers' (OpenSSL) and 'man 3 gnutls_priority_init'
(GnuTLS) for details.
.TP

4
src/.gitignore vendored
View File

@@ -1,4 +0,0 @@
config.h
config.h.in
config.h.in~
stamp-h1

View File

@@ -1 +0,0 @@
Makefile.am

View File

@@ -1,5 +0,0 @@
Makefile.am
check-help
check-version
ngircd
ngircd.exe

View File

@@ -352,14 +352,19 @@ Channel_Kick(CLIENT *Peer, CLIENT *Target, CLIENT *Origin, const char *Name,
!Channel_UserHasMode(chan, Target, 'q') &&
!Channel_UserHasMode(chan, Target, 'a'))
can_kick = true;
/* Half Op can't kick owner | admin | op */
/* Half Op can't kick owner | admin | op */
else if (Channel_UserHasMode(chan, Peer, 'h') &&
!Channel_UserHasMode(chan, Target, 'q') &&
!Channel_UserHasMode(chan, Target, 'a') &&
!Channel_UserHasMode(chan, Target, 'o'))
can_kick = true;
/* IRC operators & IRCd with OperCanMode enabled
* can kick anyways regardless of privilege */
else if(Client_HasMode(Origin, 'o') && Conf_OperCanMode)
can_kick = true;
if(!can_kick) {
IRC_WriteErrClient(Origin, ERR_CHANOPPRIVTOOLOW_MSG,
Client_ID(Origin), Name);
@@ -1039,7 +1044,7 @@ Remove_Client( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, const ch
switch( Type )
{
case REMOVE_QUIT:
/* QUIT: other servers have already been notified,
/* QUIT: other servers have already been notified,
* see Client_Destroy(); so only inform other clients
* in same channel. */
assert( InformServer == false );
@@ -1093,29 +1098,29 @@ Remove_Client( int Type, CHANNEL *Chan, CLIENT *Client, CLIENT *Origin, const ch
GLOBAL bool
Channel_AddBan(CHANNEL *c, const char *mask )
Channel_AddBan(CHANNEL *c, const char *mask, const char *who )
{
struct list_head *h = Channel_GetListBans(c);
LogDebug("Adding \"%s\" to \"%s\" ban list", mask, Channel_Name(c));
return Lists_Add(h, mask, false, NULL);
return Lists_Add(h, mask, time(NULL), who, false);
}
GLOBAL bool
Channel_AddExcept(CHANNEL *c, const char *mask )
Channel_AddExcept(CHANNEL *c, const char *mask, const char *who )
{
struct list_head *h = Channel_GetListExcepts(c);
LogDebug("Adding \"%s\" to \"%s\" exception list", mask, Channel_Name(c));
return Lists_Add(h, mask, false, NULL);
return Lists_Add(h, mask, time(NULL), who, false);
}
GLOBAL bool
Channel_AddInvite(CHANNEL *c, const char *mask, bool onlyonce)
Channel_AddInvite(CHANNEL *c, const char *mask, bool onlyonce, const char *who )
{
struct list_head *h = Channel_GetListInvites(c);
LogDebug("Adding \"%s\" to \"%s\" invite list", mask, Channel_Name(c));
return Lists_Add(h, mask, onlyonce, NULL);
return Lists_Add(h, mask, time(NULL), who, onlyonce);
}
@@ -1132,7 +1137,9 @@ ShowChannelList(struct list_head *head, CLIENT *Client, CHANNEL *Channel,
while (e) {
if (!IRC_WriteStrClient(Client, msg, Client_ID(Client),
Channel_Name(Channel),
Lists_GetMask(e)))
Lists_GetMask(e),
Lists_GetReason(e),
Lists_GetValidity(e)))
return DISCONNECTED;
e = Lists_GetNext(e);
}

View File

@@ -127,10 +127,10 @@ GLOBAL char *Channel_TopicWho PARAMS(( CHANNEL *Chan ));
GLOBAL unsigned int Channel_CreationTime PARAMS(( CHANNEL *Chan ));
#endif
GLOBAL bool Channel_AddBan PARAMS((CHANNEL *c, const char *Mask));
GLOBAL bool Channel_AddExcept PARAMS((CHANNEL *c, const char *Mask));
GLOBAL bool Channel_AddBan PARAMS((CHANNEL *c, const char *Mask, const char *who));
GLOBAL bool Channel_AddExcept PARAMS((CHANNEL *c, const char *Mask, const char *who));
GLOBAL bool Channel_AddInvite PARAMS((CHANNEL *c, const char *Mask,
bool OnlyOnce));
bool OnlyOnce, const char *who));
GLOBAL bool Channel_ShowBans PARAMS((CLIENT *client, CHANNEL *c));
GLOBAL bool Channel_ShowExcepts PARAMS((CLIENT *client, CHANNEL *c));

View File

@@ -105,7 +105,7 @@ Class_AddMask(const int Class, const char *Pattern, time_t ValidUntil,
Lists_MakeMask(Pattern, mask, sizeof(mask));
return Lists_Add(&My_Classes[Class], mask,
ValidUntil, Reason);
ValidUntil, Reason, false);
}
GLOBAL void

View File

@@ -72,7 +72,7 @@ GLOBAL void
Client_Init( void )
{
struct hostent *h;
This_Server = New_Client_Struct( );
if( ! This_Server )
{
@@ -98,7 +98,7 @@ Client_Init( void )
Client_SetInfo( This_Server, Conf_ServerInfo );
My_Clients = This_Server;
memset( &My_Whowas, 0, sizeof( My_Whowas ));
} /* Client_Init */
@@ -111,7 +111,7 @@ Client_Exit( void )
if( NGIRCd_SignalRestart ) Client_Destroy( This_Server, "Server going down (restarting).", NULL, false );
else Client_Destroy( This_Server, "Server going down.", NULL, false );
cnt = 0;
c = My_Clients;
while(c) {
@@ -228,7 +228,7 @@ GLOBAL void
Client_Destroy( CLIENT *Client, const char *LogMsg, const char *FwdMsg, bool SendQuit )
{
/* remove a client */
CLIENT *last, *c;
char msg[COMMAND_LEN];
const char *txt;
@@ -381,7 +381,7 @@ Client_SetID( CLIENT *Client, const char *ID )
{
assert( Client != NULL );
assert( ID != NULL );
strlcpy( Client->id, ID, sizeof( Client->id ));
if (Conf_CloakUserToNick) {
@@ -698,7 +698,7 @@ Client_ID( CLIENT *Client )
if(Client->type == CLIENT_USER)
assert(strlen(Client->id) < Conf_MaxNickLength);
#endif
if( Client->id[0] ) return Client->id;
else return "*";
} /* Client_ID */

View File

@@ -88,10 +88,10 @@ static void Init_Server_Struct PARAMS(( CONF_SERVER *Server ));
#endif
#ifdef HAVE_LIBSSL
#define DEFAULT_CIPHERS "HIGH:!aNULL:@STRENGTH"
#define DEFAULT_CIPHERS "HIGH:!aNULL:@STRENGTH:!SSLv3"
#endif
#ifdef HAVE_LIBGNUTLS
#define DEFAULT_CIPHERS "SECURE128"
#define DEFAULT_CIPHERS "SECURE128:-VERS-SSL3.0"
#endif
#ifdef SSL_SUPPORT
@@ -364,7 +364,7 @@ Conf_Test( void )
? (const char*) array_start(&Conf_Motd) : "");
}
printf(" Network = %s\n", Conf_Network);
if (!Conf_PAM)
if (!Conf_PAM)
printf(" Password = %s\n", Conf_ServerPwd);
printf(" PidFile = %s\n", Conf_PidFile);
printf(" Ports = ");
@@ -412,7 +412,7 @@ Conf_Test( void )
#endif
printf(" IncludeDir = %s\n", Conf_IncludeDir);
printf(" MorePrivacy = %s\n", yesno_to_str(Conf_MorePrivacy));
printf(" NoticeAuth = %s\n", yesno_to_str(Conf_NoticeAuth));
printf(" NoticeBeforeRegistration = %s\n", yesno_to_str(Conf_NoticeBeforeRegistration));
printf(" OperCanUseMode = %s\n", yesno_to_str(Conf_OperCanMode));
printf(" OperChanPAutoOp = %s\n", yesno_to_str(Conf_OperChanPAutoOp));
printf(" OperServerMode = %s\n", yesno_to_str(Conf_OperServerMode));
@@ -618,6 +618,7 @@ Conf_EnablePassiveServer(const char *Name)
&& (Conf_Server[i].port > 0)) {
/* BINGO! Enable server */
Conf_Server[i].flags &= ~CONF_SFLAG_DISABLED;
Conf_Server[i].lasttry = 0;
return true;
}
}
@@ -796,7 +797,7 @@ Set_Defaults(bool InitServers)
#endif
strcpy(Conf_IncludeDir, "");
Conf_MorePrivacy = false;
Conf_NoticeAuth = false;
Conf_NoticeBeforeRegistration = false;
Conf_OperCanMode = false;
Conf_OperChanPAutoOp = true;
Conf_OperServerMode = false;
@@ -1796,7 +1797,19 @@ Handle_OPTIONS(const char *File, int Line, char *Var, char *Arg)
return;
}
if (strcasecmp(Var, "NoticeAuth") == 0) {
Conf_NoticeAuth = Check_ArgIsTrue(Arg);
/*
* TODO: This section and support for "NoticeAuth" variable
* could be removed starting with ngIRCd release 24 (one
* release after marking it "deprecated") ...
*/
Config_Error(LOG_WARNING,
"%s, line %d (section \"Options\"): \"%s\" is deprecated, please use \"NoticeBeforeRegistration\"!",
File, Line, Var);
Conf_NoticeBeforeRegistration = Check_ArgIsTrue(Arg);
return;
}
if (strcasecmp(Var, "NoticeBeforeRegistration") == 0) {
Conf_NoticeBeforeRegistration = Check_ArgIsTrue(Arg);
return;
}
if (strcasecmp(Var, "OperCanUseMode") == 0) {

View File

@@ -194,8 +194,8 @@ GLOBAL bool Conf_Ident;
/** Enable "more privacy" mode and "censor" some user-related information */
GLOBAL bool Conf_MorePrivacy;
/** Enable NOTICE AUTH messages on connect */
GLOBAL bool Conf_NoticeAuth;
/** Enable "NOTICE *" messages on connect */
GLOBAL bool Conf_NoticeBeforeRegistration;
/** Enable all usage of PAM, even when compiled with support for it */
GLOBAL bool Conf_PAM;

View File

@@ -138,7 +138,7 @@ GLOBAL CONN_ID
Conn_First( void )
{
CONN_ID i;
for( i = 0; i < Pool_Size; i++ )
{
if( My_Connections[i].sock != NONE ) return i;
@@ -152,7 +152,7 @@ Conn_Next( CONN_ID Idx )
CONN_ID i = NONE;
assert( Idx > NONE );
for( i = Idx + 1; i < Pool_Size; i++ )
{
if( My_Connections[i].sock != NONE ) return i;

View File

@@ -317,6 +317,7 @@ ConnSSL_InitLibrary( void )
goto out;
}
SSL_CTX_set_session_id_context(newctx, (unsigned char *)"ngircd", 6);
SSL_CTX_set_options(newctx, SSL_OP_SINGLE_DH_USE|SSL_OP_NO_SSLv2);
SSL_CTX_set_mode(newctx, SSL_MODE_ENABLE_PARTIAL_WRITE);
SSL_CTX_set_verify(newctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE,
@@ -744,7 +745,7 @@ ConnSSL_InitCertFp( CONNECTION *c )
gnutls_x509_crt_deinit(cert);
return 0;
}
if (gnutls_x509_crt_import(cert, &cert_list[0],
GNUTLS_X509_FMT_DER) != GNUTLS_E_SUCCESS) {
gnutls_x509_crt_deinit(cert);
@@ -911,5 +912,3 @@ ConnSSL_InitLibrary(void)
#endif /* SSL_SUPPORT */
/* -eof- */

View File

@@ -175,7 +175,7 @@ Zip_Flush( CONN_ID Idx )
}
My_Connections[Idx].bytes_out += zipbuf_used;
My_Connections[Idx].zip.bytes_out += array_bytes(&My_Connections[Idx].zip.wbuf);
My_Connections[Idx].zip.bytes_out += array_bytes(&My_Connections[Idx].zip.wbuf);
array_trunc(&My_Connections[Idx].zip.wbuf);
return true;
@@ -198,7 +198,7 @@ Unzip_Buffer( CONN_ID Idx )
int unzipbuf_used = 0;
unsigned int z_rdatalen;
unsigned int in_len;
z_stream *in;
assert( Idx > NONE );

View File

@@ -328,7 +328,7 @@ Conn_Init( void )
array_bytes(&My_ConnArray));
assert(array_length(&My_ConnArray, sizeof(CONNECTION)) >= (size_t)Pool_Size);
array_free( &My_Listeners );
for (i = 0; i < Pool_Size; i++)
@@ -796,7 +796,7 @@ Conn_Handler(void)
GLOBAL bool
Conn_WriteStr(CONN_ID Idx, const char *Format, ...)
#else
GLOBAL bool
GLOBAL bool
Conn_WriteStr(Idx, Format, va_alist)
CONN_ID Idx;
const char *Format;
@@ -829,7 +829,7 @@ va_dcl
* IRC_WriteXXX() functions when the prefix of this server had
* to be added to an already "quite long" command line which
* has been received from a regular IRC client, for example.
*
*
* We are not allowed to send such "oversized" messages to
* other servers and clients, see RFC 2812 2.3 and 2813 3.3
* ("these messages SHALL NOT exceed 512 characters in length,
@@ -1487,16 +1487,16 @@ Conn_StartLogin(CONN_ID Idx)
ident_sock = My_Connections[Idx].sock;
#endif
if (Conf_NoticeAuth) {
/* Send "NOTICE AUTH" messages to the client */
if (Conf_NoticeBeforeRegistration) {
/* Send "NOTICE *" messages to the client */
#ifdef IDENTAUTH
if (Conf_Ident)
(void)Conn_WriteStr(Idx,
"NOTICE AUTH :*** Looking up your hostname and checking ident");
"NOTICE * :*** Looking up your hostname and checking ident");
else
#endif
(void)Conn_WriteStr(Idx,
"NOTICE AUTH :*** Looking up your hostname");
"NOTICE * :*** Looking up your hostname");
/* Send buffered data to the client, but break on errors
* because Handle_Write() would have closed the connection
* again in this case! */
@@ -1583,7 +1583,7 @@ Read_Request( CONN_ID Idx )
if (len == 0) {
LogDebug("Client \"%s:%u\" is closing connection %d ...",
My_Connections[Idx].host,
ng_ipaddr_tostr(&My_Connections[Idx].addr), Idx);
ng_ipaddr_getport(&My_Connections[Idx].addr), Idx);
Conn_Close(Idx, NULL, "Client closed connection", false);
return;
}
@@ -2265,9 +2265,9 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
strlcpy(My_Connections[i].host, readbuf,
sizeof(My_Connections[i].host));
Client_SetHostname(c, readbuf);
if (Conf_NoticeAuth)
if (Conf_NoticeBeforeRegistration)
(void)Conn_WriteStr(i,
"NOTICE AUTH :*** Found your hostname: %s",
"NOTICE * :*** Found your hostname: %s",
My_Connections[i].host);
#ifdef IDENTAUTH
++identptr;
@@ -2291,22 +2291,22 @@ cb_Read_Resolver_Result( int r_fd, UNUSED short events )
i, identptr);
Client_SetUser(c, identptr, true);
}
if (Conf_NoticeAuth) {
if (Conf_NoticeBeforeRegistration) {
(void)Conn_WriteStr(i,
"NOTICE AUTH :*** Got %sident response%s%s",
"NOTICE * :*** Got %sident response%s%s",
*ptr ? "invalid " : "",
*ptr ? "" : ": ",
*ptr ? "" : identptr);
}
} else if(Conf_Ident) {
Log(LOG_INFO, "IDENT lookup for connection %d: no result.", i);
if (Conf_NoticeAuth)
if (Conf_NoticeBeforeRegistration)
(void)Conn_WriteStr(i,
"NOTICE AUTH :*** No ident response");
"NOTICE * :*** No ident response");
}
#endif
if (Conf_NoticeAuth) {
if (Conf_NoticeBeforeRegistration) {
/* Send buffered data to the client, but break on
* errors because Handle_Write() would have closed
* the connection again in this case! */
@@ -2364,7 +2364,7 @@ Simple_Message(int Sock, const char *Msg)
* @returns Pointer to CLIENT structure.
*/
GLOBAL CLIENT *
Conn_GetClient( CONN_ID Idx )
Conn_GetClient( CONN_ID Idx )
{
CONNECTION *c;

View File

@@ -177,7 +177,7 @@
#endif
/** Supported user modes. */
#define USERMODES "abBcCFioqrRswx"
#define USERMODES "abBcCFiIoqrRswx"
/** Supported channel modes. */
#define CHANMODES "abehiIklmMnoOPqQrRstvVz"

View File

@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
* Copyright (c)2001-2015 Alexander Barton (alex@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
@@ -448,7 +448,7 @@ IRC_PART(CLIENT * Client, REQUEST * Req)
while (chan) {
Channel_Part(target, Client, chan,
Req->argc > 1 ? Req->argv[1] : Client_ID(target));
Req->argc > 1 ? Req->argv[1] : "");
chan = strtok(NULL, ",");
}
@@ -597,6 +597,10 @@ IRC_LIST( CLIENT *Client, REQUEST *Req )
}
}
/* Send list head */
if (!IRC_WriteStrClient(from, RPL_LISTSTART_MSG, Client_ID(from)))
return DISCONNECTED;
while (pattern) {
/* Loop through all the channels */
if (Req->argc > 0)
@@ -608,9 +612,7 @@ IRC_LIST( CLIENT *Client, REQUEST *Req )
/* Gotcha! */
if (!Channel_HasMode(chan, 's')
|| Channel_IsMemberOf(chan, from)
|| (!Conf_MorePrivacy
&& Client_HasMode(Client, 'o')
&& Client_Conn(Client) > NONE))
|| Client_HasMode(from, 'o'))
{
if ((Conf_MaxListSize > 0)
&& IRC_CheckListTooBig(from, count,

View File

@@ -162,7 +162,7 @@ IRC_WHO_Channel(CLIENT *Client, CHANNEL *Chan, bool OnlyOps)
if (OnlyOps && !is_ircop)
continue;
is_visible = Client_HasMode(c, 'i');
is_visible = !Client_HasMode(c, 'i');
if (is_member || is_visible) {
memset(flags, 0, sizeof(flags));
@@ -313,48 +313,50 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c)
Client_Info(Client_Introducer(c))))
return DISCONNECTED;
/* Channels */
snprintf(str, sizeof(str), RPL_WHOISCHANNELS_MSG,
Client_ID(from), Client_ID(c));
cl2chan = Channel_FirstChannelOf(c);
while (cl2chan) {
chan = Channel_GetChannel(cl2chan);
assert(chan != NULL);
/* Channels, show only if client has no +I or if from is oper */
if(!(Client_HasMode(c, 'I')) || Client_HasMode(from, 'o')) {
snprintf(str, sizeof(str), RPL_WHOISCHANNELS_MSG,
Client_ID(from), Client_ID(c));
cl2chan = Channel_FirstChannelOf(c);
while (cl2chan) {
chan = Channel_GetChannel(cl2chan);
assert(chan != NULL);
/* next */
cl2chan = Channel_NextChannelOf(c, cl2chan);
/* next */
cl2chan = Channel_NextChannelOf(c, cl2chan);
/* Secret channel? */
if (Channel_HasMode(chan, 's')
&& !Channel_IsMemberOf(chan, Client))
continue;
/* Secret channel? */
if (Channel_HasMode(chan, 's')
&& !Channel_IsMemberOf(chan, Client))
continue;
/* Local channel and request is not from a user? */
if (Client_Type(Client) == CLIENT_SERVER
&& Channel_IsLocal(chan))
continue;
/* Local channel and request is not from a user? */
if (Client_Type(Client) == CLIENT_SERVER
&& Channel_IsLocal(chan))
continue;
/* Concatenate channel names */
if (str[strlen(str) - 1] != ':')
strlcat(str, " ", sizeof(str));
/* Concatenate channel names */
if (str[strlen(str) - 1] != ':')
strlcat(str, " ", sizeof(str));
who_flags_qualifier(Client, Channel_UserModes(chan, c),
str, sizeof(str));
strlcat(str, Channel_Name(chan), sizeof(str));
who_flags_qualifier(Client, Channel_UserModes(chan, c),
str, sizeof(str));
strlcat(str, Channel_Name(chan), sizeof(str));
if (strlen(str) > (COMMAND_LEN - CHANNEL_NAME_LEN - 4)) {
/* Line becomes too long: send it! */
if (strlen(str) > (COMMAND_LEN - CHANNEL_NAME_LEN - 4)) {
/* Line becomes too long: send it! */
if (!IRC_WriteStrClient(Client, "%s", str))
return DISCONNECTED;
snprintf(str, sizeof(str), RPL_WHOISCHANNELS_MSG,
Client_ID(from), Client_ID(c));
}
}
if(str[strlen(str) - 1] != ':') {
/* There is data left to send: */
if (!IRC_WriteStrClient(Client, "%s", str))
return DISCONNECTED;
snprintf(str, sizeof(str), RPL_WHOISCHANNELS_MSG,
Client_ID(from), Client_ID(c));
}
}
if(str[strlen(str) - 1] != ':') {
/* There is data left to send: */
if (!IRC_WriteStrClient(Client, "%s", str))
return DISCONNECTED;
}
/* IRC-Services? */
if (Client_Type(c) == CLIENT_SERVICE &&
@@ -405,7 +407,7 @@ IRC_WHOIS_SendReply(CLIENT *Client, CLIENT *from, CLIENT *c)
/* Local client and requester is the user itself or an IRC Op? */
if (Client_Conn(c) > NONE &&
(from == c || (!Conf_MorePrivacy && Client_HasMode(from, 'o')))) {
(from == c || Client_HasMode(from, 'o'))) {
/* Client hostname */
if (!IRC_WriteStrClient(from, RPL_WHOISHOST_MSG,
Client_ID(from), Client_ID(c),
@@ -556,7 +558,15 @@ IRC_INFO(CLIENT * Client, REQUEST * Req)
NGIRCd_Version))
return DISCONNECTED;
#if defined(__DATE__) && defined(__TIME__)
#if defined(BIRTHDATE)
char t_str[60];
time_t t = BIRTHDATE;
(void)strftime(t_str, sizeof(t_str), "%a %b %d %Y at %H:%M:%S (%Z)",
localtime(&t));
snprintf(msg, sizeof(msg), "Birth Date: %s", t_str);
if (!IRC_WriteStrClient(Client, RPL_INFO_MSG, Client_ID(prefix), msg))
return DISCONNECTED;
#elif defined(__DATE__) && defined(__TIME__)
snprintf(msg, sizeof(msg), "Birth Date: %s at %s", __DATE__, __TIME__);
if (!IRC_WriteStrClient(Client, RPL_INFO_MSG, Client_ID(prefix), msg))
return DISCONNECTED;

View File

@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
* Copyright (c)2001-2015 Alexander Barton (alex@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
@@ -172,6 +172,7 @@ GLOBAL bool
IRC_NICK( CLIENT *Client, REQUEST *Req )
{
CLIENT *intr_c, *target, *c;
CHANNEL *chan;
char *nick, *user, *hostname, *modes, *info;
int token, hops;
@@ -195,6 +196,7 @@ IRC_NICK( CLIENT *Client, REQUEST *Req )
/* Search "target" client */
if (Client_Type(Client) == CLIENT_SERVER) {
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
target = Client_Search(Req->prefix);
if (!target)
return IRC_WriteErrClient(Client,
@@ -243,7 +245,7 @@ IRC_NICK( CLIENT *Client, REQUEST *Req )
#else
Conn_SetAuthPing(Client_Conn(Client), rand());
#endif
IRC_WriteStrClient(Client, "PING :%ld",
Conn_WriteStr(Client_Conn(Client), "PING :%ld",
Conn_GetAuthPing(Client_Conn(Client)));
LogDebug("Connection %d: sent AUTH PING %ld ...",
Client_Conn(Client),
@@ -259,6 +261,22 @@ IRC_NICK( CLIENT *Client, REQUEST *Req )
Client_SetType( Client, CLIENT_GOTNICK );
} else {
/* Nickname change */
/* Check that the user isn't on any channels set +N */
if(Client_Type(Client) == CLIENT_USER &&
!Client_HasMode(Client, 'o')) {
chan = Channel_First();
while (chan) {
if(Channel_HasMode(chan, 'N') &&
Channel_IsMemberOf(chan, Client))
return IRC_WriteErrClient(Client,
ERR_NONICKCHANGE_MSG,
Client_ID(Client),
Channel_Name(chan));
chan = Channel_Next(chan);
}
}
Change_Nick(Client, target, Req->argv[0],
Client_Type(Client) == CLIENT_USER ? true : false);
IRC_SetPenalty(target, 2);
@@ -362,6 +380,8 @@ IRC_SVSNICK(CLIENT *Client, REQUEST *Req)
assert(Client != NULL);
assert(Req != NULL);
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
/* Search the originator */
from = Client_Search(Req->prefix);
if (!from)
@@ -464,6 +484,7 @@ IRC_USER(CLIENT * Client, REQUEST * Req)
Client_Type(Client) == CLIENT_SERVICE) {
/* Server/service updating an user */
_IRC_ARGC_EQ_OR_RETURN_(Client, Req, 4)
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
c = Client_Search(Req->prefix);
if (!c)
@@ -636,6 +657,8 @@ IRC_QUIT( CLIENT *Client, REQUEST *Req )
if (Client_Type(Client) == CLIENT_SERVER) {
/* Server */
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
target = Client_Search(Req->prefix);
if (!target) {
Log(LOG_WARNING,
@@ -724,9 +747,10 @@ IRC_PING(CLIENT *Client, REQUEST *Req)
if (target != Client_ThisServer()) {
/* Ok, we have to forward the PING */
if (Client_Type(Client) == CLIENT_SERVER)
if (Client_Type(Client) == CLIENT_SERVER) {
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
from = Client_Search(Req->prefix);
else
} else
from = Client;
if (!from)
return IRC_WriteErrClient(Client,
@@ -798,6 +822,8 @@ IRC_PONG(CLIENT *Client, REQUEST *Req)
/* Forward? */
if (Req->argc == 2 && Client_Type(Client) == CLIENT_SERVER) {
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
target = Client_Search(Req->argv[0]);
if (!target)
return IRC_WriteErrClient(Client, ERR_NOSUCHSERVER_MSG,
@@ -832,14 +858,14 @@ IRC_PONG(CLIENT *Client, REQUEST *Req)
if (auth_ping) {
LogDebug("AUTH PONG: waiting for token \"%ld\", got \"%s\" ...",
auth_ping, Req->argv[0]);
if (auth_ping == atoi(Req->argv[0])) {
if (auth_ping == atol(Req->argv[0])) {
Conn_SetAuthPing(conn, 0);
if (Client_Type(Client) == CLIENT_WAITAUTHPING)
Login_User(Client);
} else
if (!IRC_WriteStrClient(Client,
"To connect, type /QUOTE PONG %ld",
auth_ping))
"NOTICE %s :To connect, type /QUOTE PONG %ld",
Client_ID(Client), auth_ping))
return DISCONNECTED;
}
#endif
@@ -847,13 +873,14 @@ IRC_PONG(CLIENT *Client, REQUEST *Req)
if (Client_Type(Client) == CLIENT_SERVER && Conn_LastPing(conn) == 0) {
Log(LOG_INFO,
"Synchronization with \"%s\" done (connection %d): %ld second%s [%ld users, %ld channels].",
Client_ID(Client), conn, time(NULL) - Conn_GetSignon(conn),
Client_ID(Client), conn,
(long)(time(NULL) - Conn_GetSignon(conn)),
time(NULL) - Conn_GetSignon(conn) == 1 ? "" : "s",
Client_UserCount(), Channel_CountVisible(NULL));
Conn_UpdatePing(conn);
} else
LogDebug("Connection %d: received PONG. Lag: %ld seconds.",
conn, time(NULL) - Conn_LastPing(conn));
conn, (long)(time(NULL) - Conn_LastPing(conn)));
return CONNECTED;
} /* IRC_PONG */

View File

@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
* Copyright (c)2001-2015 Alexander Barton (alex@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
@@ -65,6 +65,18 @@ if (Req->argc < Min || Req->argc > Max) { \
Client_ID(Client), Req->command); \
}
/**
* Make sure that the command has a prefix.
*
* If there is no prefix, send an error to the client and return from
* the function.
*/
#define _IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req) \
if (!Req->prefix) { \
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG, \
Client_ID(Client), Req->command); \
}
/**
* Get sender of an IRC command.
*
@@ -73,13 +85,17 @@ if (Req->argc < Min || Req->argc > Max) { \
* send an error to the client and return from the function.
*/
#define _IRC_GET_SENDER_OR_RETURN_(Sender, Req, Client) \
if (Client_Type(Client) == CLIENT_SERVER) \
if (Client_Type(Client) == CLIENT_SERVER) { \
if (!Req->prefix) \
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG, \
Client_ID(Client), Req->command); \
Sender = Client_Search(Req->prefix); \
else \
} else \
Sender = Client; \
if (!Sender) \
return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG, \
Client_ID(Client), Req->prefix);
Client_ID(Client), \
Req->prefix ? Req->prefix : "(none)");
/**
* Get target of an IRC command and make sure that it is a server.

View File

@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
* Copyright (c)2001-2015 Alexander Barton (alex@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
@@ -24,6 +24,7 @@
#include "conn-func.h"
#include "channel.h"
#include "irc-macros.h"
#include "irc-write.h"
#include "log.h"
#include "messages.h"
@@ -47,6 +48,8 @@ IRC_METADATA(CLIENT *Client, REQUEST *Req)
assert(Client != NULL);
assert(Req != NULL);
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
prefix = Client_Search(Req->prefix);
if (!prefix)
return IRC_WriteErrClient(Client, ERR_NOSUCHNICK_MSG,

View File

@@ -206,6 +206,7 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
case 'b': /* Block private msgs */
case 'C': /* Only messages from clients sharing a channel */
case 'i': /* Invisible */
case 'I': /* Hide channel list from WHOIS */
case 's': /* Server messages */
case 'w': /* Wallops messages */
x[0] = *mode_ptr;
@@ -378,37 +379,44 @@ Channel_Mode_Answer_Request(CLIENT *Origin, CHANNEL *Channel)
char the_modes[COMMAND_LEN], the_args[COMMAND_LEN], argadd[CLIENT_PASS_LEN];
const char *mode_ptr;
/* Member or not? -- That's the question! */
if (!Channel_IsMemberOf(Channel, Origin))
return IRC_WriteStrClient(Origin, RPL_CHANNELMODEIS_MSG,
Client_ID(Origin), Channel_Name(Channel), Channel_Modes(Channel));
if (!Channel_IsMemberOf(Channel, Origin)) {
/* Not a member: "simple" mode reply */
if (!IRC_WriteStrClient(Origin, RPL_CHANNELMODEIS_MSG,
Client_ID(Origin), Channel_Name(Channel),
Channel_Modes(Channel)))
return DISCONNECTED;
} else {
/* The sender is a member: generate extended reply */
strlcpy(the_modes, Channel_Modes(Channel), sizeof(the_modes));
mode_ptr = the_modes;
the_args[0] = '\0';
/* The sender is a member: generate extended reply */
strlcpy(the_modes, Channel_Modes(Channel), sizeof(the_modes));
mode_ptr = the_modes;
the_args[0] = '\0';
while(*mode_ptr) {
switch(*mode_ptr) {
case 'l':
snprintf(argadd, sizeof(argadd), " %lu", Channel_MaxUsers(Channel));
strlcat(the_args, argadd, sizeof(the_args));
break;
case 'k':
strlcat(the_args, " ", sizeof(the_args));
strlcat(the_args, Channel_Key(Channel), sizeof(the_args));
break;
while(*mode_ptr) {
switch(*mode_ptr) {
case 'l':
snprintf(argadd, sizeof(argadd), " %lu",
Channel_MaxUsers(Channel));
strlcat(the_args, argadd, sizeof(the_args));
break;
case 'k':
strlcat(the_args, " ", sizeof(the_args));
strlcat(the_args, Channel_Key(Channel),
sizeof(the_args));
break;
}
mode_ptr++;
}
mode_ptr++;
}
if (the_args[0])
strlcat(the_modes, the_args, sizeof(the_modes));
if (the_args[0])
strlcat(the_modes, the_args, sizeof(the_modes));
if (!IRC_WriteStrClient(Origin, RPL_CHANNELMODEIS_MSG,
Client_ID(Origin), Channel_Name(Channel),
the_modes))
return DISCONNECTED;
}
if (!IRC_WriteStrClient(Origin, RPL_CHANNELMODEIS_MSG,
Client_ID(Origin), Channel_Name(Channel),
the_modes))
return DISCONNECTED;
#ifndef STRICT_RFC
/* Channel creation time */
if (!IRC_WriteStrClient(Origin, RPL_CREATIONTIME_MSG,
Client_ID(Origin), Channel_Name(Channel),
Channel_CreationTime(Channel)))
@@ -572,6 +580,7 @@ Channel_Mode(CLIENT *Client, REQUEST *Req, CLIENT *Origin, CHANNEL *Channel)
case 'M': /* Only identified nicks can write */
case 'm': /* Moderated */
case 'n': /* Only members can write */
case 'N': /* Can't change nick while on this channel */
case 'Q': /* No kicks */
case 't': /* Topic locked */
if(is_oper || is_machine || is_owner ||
@@ -1009,15 +1018,15 @@ Add_To_List(char what, CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel,
switch (what) {
case 'I':
if (!Channel_AddInvite(Channel, mask, false))
if (!Channel_AddInvite(Channel, mask, false, Client_ID(Client)))
return CONNECTED;
break;
case 'b':
if (!Channel_AddBan(Channel, mask))
if (!Channel_AddBan(Channel, mask, Client_ID(Client)))
return CONNECTED;
break;
case 'e':
if (!Channel_AddExcept(Channel, mask))
if (!Channel_AddExcept(Channel, mask, Client_ID(Client)))
return CONNECTED;
break;
}

View File

@@ -150,6 +150,14 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req)
return IRC_WriteErrClient(from, ERR_NOSUCHNICK_MSG,
Client_ID(Client), Req->argv[0]);
if (Req->argv[1][0] == '&') {
/* Local channel. Make sure the target user is on this server! */
if (Client_Conn(target) == NONE)
return IRC_WriteErrClient(from, ERR_USERNOTONSERV_MSG,
Client_ID(Client),
Req->argv[0]);
}
chan = Channel_Search(Req->argv[1]);
if (chan) {
/* Channel exists. Is the user a valid member of the channel? */
@@ -192,7 +200,7 @@ IRC_INVITE(CLIENT *Client, REQUEST *Req)
if (remember) {
/* We must remember this invite */
if (!Channel_AddInvite(chan, Client_MaskCloaked(target),
true))
true, Client_ID(from)))
return CONNECTED;
}
}

View File

@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
* Copyright (c)2001-2015 Alexander Barton (alex@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
@@ -30,6 +30,7 @@
#include "class.h"
#include "parse.h"
#include "irc.h"
#include "irc-macros.h"
#include "irc-write.h"
#include "lists.h"
#include "log.h"
@@ -358,6 +359,7 @@ IRC_WALLOPS( CLIENT *Client, REQUEST *Req )
from = Client;
break;
case CLIENT_SERVER:
_IRC_REQUIRE_PREFIX_OR_RETURN_(Client, Req)
from = Client_Search(Req->prefix);
break;
default:

View File

@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
* Copyright (c)2001-2015 Alexander Barton (alex@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
@@ -240,7 +240,7 @@ IRC_TRACE(CLIENT *Client, REQUEST *Req)
PACKAGE_VERSION, Client_ID(target),
Client_ID(Client_NextHop(target)),
Option_String(idx2),
time(NULL) - Conn_StartTime(idx2),
(long)(time(NULL) - Conn_StartTime(idx2)),
Conn_SendQ(idx), Conn_SendQ(idx2)))
return DISCONNECTED;
@@ -526,7 +526,7 @@ Send_Message(CLIENT * Client, REQUEST * Req, int ForceType, bool SendErrors)
Client_ID(Client), Req->command);
}
if (Client_Type(Client) == CLIENT_SERVER)
if (Client_Type(Client) == CLIENT_SERVER && Req->prefix)
from = Client_Search(Req->prefix);
else
from = Client;

View File

@@ -32,7 +32,8 @@ struct list_elem {
struct list_elem *next; /** pointer to next list element */
char mask[MASK_LEN]; /** IRC mask */
char *reason; /** Optional "reason" text */
time_t valid_until; /** 0: unlimited; 1: once; t(>1): until t */
time_t valid_until; /** 0: unlimited; t(>0): until t */
bool onlyonce;
};
/**
@@ -65,7 +66,7 @@ Lists_GetReason(const struct list_elem *e)
* Get "validity" value stored in list element.
*
* @param list_elem List element.
* @return Validity: 0=unlimited, 1=once, >1 until this time stamp.
* @return Validity: 0=unlimited, >0 until this time stamp.
*/
GLOBAL time_t
Lists_GetValidity(const struct list_elem *e)
@@ -74,6 +75,19 @@ Lists_GetValidity(const struct list_elem *e)
return e->valid_until;
}
/**
* Get "onlyonce" value stored in list element.
*
* @param list_elem List element.
* @return True if the element was stored for single use, false otherwise.
*/
GLOBAL bool
Lists_GetOnlyOnce(const struct list_elem *e)
{
assert(e != NULL);
return e->onlyonce;
}
/**
* Get first list element of a list.
*
@@ -111,7 +125,7 @@ Lists_GetNext(const struct list_elem *e)
*/
bool
Lists_Add(struct list_head *h, const char *Mask, time_t ValidUntil,
const char *Reason)
const char *Reason, bool OnlyOnce)
{
struct list_elem *e, *newelem;
@@ -148,6 +162,7 @@ Lists_Add(struct list_head *h, const char *Mask, time_t ValidUntil,
else
newelem->reason = NULL;
newelem->valid_until = ValidUntil;
newelem->onlyonce = OnlyOnce;
newelem->next = e;
h->first = newelem;
@@ -326,10 +341,10 @@ Lists_CheckReason(struct list_head *h, CLIENT *Client, char *reason, size_t len)
while (e) {
next = e->next;
if (Match(e->mask, Client_MaskCloaked(Client))) {
if (MatchCaseInsensitive(e->mask, Client_MaskCloaked(Client))) {
if (len && e->reason)
strlcpy(reason, e->reason, len);
if (e->valid_until == 1) {
if (e->onlyonce) {
/* Entry is valid only once, delete it */
LogDebug("Deleted \"%s\" from list (used).",
e->mask);
@@ -363,7 +378,7 @@ Lists_Expire(struct list_head *h, const char *ListName)
while (e) {
next = e->next;
if (e->valid_until > 1 && e->valid_until < now) {
if (e->valid_until > 0 && e->valid_until < now) {
/* Entry is expired, delete it */
if (e->reason)
Log(LOG_INFO,

View File

@@ -36,7 +36,8 @@ GLOBAL struct list_elem *Lists_CheckDupeMask PARAMS((const struct list_head *hea
const char *mask));
GLOBAL bool Lists_Add PARAMS((struct list_head *h, const char *Mask,
time_t ValidUntil, const char *Reason));
time_t ValidUntil, const char *Reason,
bool OnlyOnce));
GLOBAL void Lists_Del PARAMS((struct list_head *head, const char *Mask));
GLOBAL unsigned long Lists_Count PARAMS((struct list_head *h));
@@ -46,6 +47,7 @@ GLOBAL void Lists_MakeMask PARAMS((const char *Pattern, char *mask, size_t len))
GLOBAL const char *Lists_GetMask PARAMS((const struct list_elem *e));
GLOBAL const char *Lists_GetReason PARAMS((const struct list_elem *e));
GLOBAL time_t Lists_GetValidity PARAMS((const struct list_elem *e));
GLOBAL bool Lists_GetOnlyOnce PARAMS((const struct list_elem *e));
GLOBAL void Lists_Expire PARAMS((struct list_head *h, const char *ListName));

View File

@@ -92,7 +92,7 @@ Login_User(CLIENT * Client)
/* Don't do any PAM authentication at all if PAM is not
* enabled, instead emulate the behavior of the daemon
* compiled without PAM support. */
if (strcmp(Conn_Password(conn), Conf_ServerPwd) == 0)
if (strcmp(Conn_Password(conn), Conf_ServerPwd) == 0)
return Login_User_PostAuth(Client);
Client_Reject(Client, "Bad server password", false);
return DISCONNECTED;

View File

@@ -50,8 +50,10 @@ static int Matche_After_Star PARAMS(( const char *p, const char *t ));
GLOBAL bool
Match( const char *Pattern, const char *String )
{
if( Matche( Pattern, String ) == MATCH_VALID ) return true;
else return false;
if (Matche(Pattern, String) == MATCH_VALID)
return true;
else
return false;
} /* Match */
/**
@@ -64,10 +66,12 @@ Match( const char *Pattern, const char *String )
GLOBAL bool
MatchCaseInsensitive(const char *Pattern, const char *String)
{
char haystack[COMMAND_LEN];
char needle[COMMAND_LEN], haystack[COMMAND_LEN];
strlcpy(needle, Pattern, sizeof(needle));
strlcpy(haystack, String, sizeof(haystack));
return Match(Pattern, ngt_LowerStr(haystack));
return Match(ngt_LowerStr(needle), ngt_LowerStr(haystack));
} /* MatchCaseInsensitive */
/**
@@ -82,16 +86,14 @@ GLOBAL bool
MatchCaseInsensitiveList(const char *Pattern, const char *String,
const char *Separator)
{
char tmp_pattern[COMMAND_LEN], haystack[COMMAND_LEN], *ptr;
char tmp_pattern[COMMAND_LEN], *ptr;
strlcpy(tmp_pattern, Pattern, sizeof(tmp_pattern));
strlcpy(haystack, String, sizeof(haystack));
ngt_LowerStr(haystack);
ptr = strtok(tmp_pattern, Separator);
while (ptr) {
ngt_TrimStr(ptr);
if (Match(ptr, haystack))
if (MatchCaseInsensitive(ptr, String))
return true;
ptr = strtok(NULL, Separator);
}

View File

@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
* Copyright (c)2001-2014 Alexander Barton (alex@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
@@ -67,6 +67,7 @@
#define RPL_WHOISIDLE_MSG "317 %s %s %lu %lu :seconds idle, signon time"
#define RPL_ENDOFWHOIS_MSG "318 %s %s :End of WHOIS list"
#define RPL_WHOISCHANNELS_MSG "319 %s %s :"
#define RPL_LISTSTART_MSG "321 %s Channel :Users Name"
#define RPL_LIST_MSG "322 %s %s %ld :%s"
#define RPL_LISTEND_MSG "323 %s :End of LIST"
#define RPL_CHANNELMODEIS_MSG "324 %s %s +%s"
@@ -75,11 +76,11 @@
#define RPL_NOTOPIC_MSG "331 %s %s :No topic is set"
#define RPL_TOPIC_MSG "332 %s %s :%s"
#define RPL_TOPICSETBY_MSG "333 %s %s %s %u"
#define RPL_WHOISBOT_MSG "335 %s %s :is a IRC Bot"
#define RPL_WHOISBOT_MSG "335 %s %s :is an IRC Bot"
#define RPL_INVITING_MSG "341 %s %s %s%s"
#define RPL_INVITELIST_MSG "346 %s %s %s"
#define RPL_INVITELIST_MSG "346 %s %s %s %s %d"
#define RPL_ENDOFINVITELIST_MSG "347 %s %s :End of channel invite list"
#define RPL_EXCEPTLIST_MSG "348 %s %s %s"
#define RPL_EXCEPTLIST_MSG "348 %s %s %s %s %d"
#define RPL_ENDOFEXCEPTLIST_MSG "349 %s %s :End of channel exception list"
#define RPL_VERSION_MSG "351 %s %s-%s.%s %s :%s"
#define RPL_WHOREPLY_MSG "352 %s %s %s %s %s %s %s :%d %s"
@@ -87,7 +88,7 @@
#define RPL_LINKS_MSG "364 %s %s %s :%d %s"
#define RPL_ENDOFLINKS_MSG "365 %s %s :End of LINKS list"
#define RPL_ENDOFNAMES_MSG "366 %s %s :End of NAMES list"
#define RPL_BANLIST_MSG "367 %s %s %s"
#define RPL_BANLIST_MSG "367 %s %s %s %s %d"
#define RPL_ENDOFBANLIST_MSG "368 %s %s :End of channel ban list"
#define RPL_ENDOFWHOWAS_MSG "369 %s %s :End of WHOWAS list"
#define RPL_INFO_MSG "371 %s :%s"
@@ -126,6 +127,7 @@
#define ERR_USERONCHANNEL_MSG "443 %s %s %s :is already on channel"
#define ERR_SUMMONDISABLED_MSG "445 %s :SUMMON has been disabled"
#define ERR_USERSDISABLED_MSG "446 %s :USERS has been disabled"
#define ERR_NONICKCHANGE_MSG "447 %s :Cannot change nickname while on %s(+N)"
#define ERR_NOTREGISTERED_MSG "451 %s :Connection not registered"
#define ERR_NOTREGISTEREDSERVER_MSG "451 %s :Connection not registered as server link"
#define ERR_NEEDMOREPARAMS_MSG "461 %s %s :Syntax error"
@@ -141,7 +143,7 @@
#define ERR_BADCHANNELKEY_MSG "475 %s %s :Cannot join channel (+k) -- Wrong channel key"
#define ERR_NOCHANMODES_MSG "477 %s %s :Channel doesn't support modes"
#define ERR_NEEDREGGEDNICK_MSG "477 %s %s :Cannot send to channel (+M) -- You need to be identified to a registered account to message this channel"
#define ERR_LISTFULL_MSG "478 %s %s %s: Channel list is full (%d)"
#define ERR_LISTFULL_MSG "478 %s %s %s :Channel list is full (%d)"
#define ERR_NOPRIVILEGES_MSG "481 %s :Permission denied"
#define ERR_CHANOPRIVSNEEDED_MSG "482 %s %s :You are not channel operator"
#define ERR_CHANOPPRIVTOOLOW_MSG "482 %s %s :Your privileges are too low"
@@ -156,6 +158,7 @@
#define ERR_UMODEUNKNOWNFLAG_MSG "501 %s :Unknown mode"
#define ERR_UMODEUNKNOWNFLAG2_MSG "501 %s :Unknown mode \"%c%c\""
#define ERR_USERSDONTMATCH_MSG "502 %s :Can't set/get mode for other users"
#define ERR_USERNOTONSERV_MSG "504 %s %s :User is not on this server"
#define ERR_NOINVITE_MSG "518 %s :Cannot invite to %s (+V)"
#ifdef ZLIB

View File

@@ -530,7 +530,7 @@ Pidfile_Create(pid_t pid)
close(pidfd);
return;
}
if (write(pidfd, pidbuf, (size_t)len) != (ssize_t)len)
Log(LOG_ERR, "Can't write PID file (%s): %s!", Conf_PidFile,
strerror(errno));
@@ -721,9 +721,10 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
Log(LOG_ERR, "Can't change group ID to %s(%u): %s!",
grp ? grp->gr_name : "?", Conf_GID,
strerror(real_errno));
if (real_errno != EPERM)
if (real_errno != EPERM)
goto out;
}
#ifdef HAVE_SETGROUPS
if (setgroups(0, NULL) != 0) {
real_errno = errno;
Log(LOG_ERR, "Can't drop supplementary group IDs: %s!",
@@ -731,6 +732,10 @@ NGIRCd_Init(bool NGIRCd_NoDaemon)
if (real_errno != EPERM)
goto out;
}
#else
Log(LOG_WARNING,
"Can't drop supplementary group IDs: setgroups(3) missing!");
#endif
}
#endif

View File

@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
* Copyright (c)2001-2015 Alexander Barton (alex@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
@@ -185,7 +185,7 @@ Synchronize_Lists(CLIENT * Client)
while (elem) {
if (!IRC_WriteStrClient(Client, "GLINE %s %ld :%s",
Lists_GetMask(elem),
Lists_GetValidity(elem) - time(NULL),
(long)(Lists_GetValidity(elem) - time(NULL)),
Lists_GetReason(elem)))
return DISCONNECTED;
elem = Lists_GetNext(elem);
@@ -216,7 +216,8 @@ Send_CHANINFO(CLIENT * Client, CHANNEL * Chan)
bool has_k, has_l;
#ifdef DEBUG
Log(LOG_DEBUG, "Sending CHANINFO commands ...");
Log(LOG_DEBUG, "Sending CHANINFO commands for \"%s\" ...",
Channel_Name(Chan));
#endif
modes = Channel_Modes(Chan);

View File

@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
* Copyright (c)2001-2015 Alexander Barton (alex@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
@@ -70,7 +70,7 @@ static COMMAND My_Commands[] =
_CMD("GLINE", IRC_xLINE, CLIENT_USER|CLIENT_SERVER, 0, -1, 0),
_CMD("HELP", IRC_HELP, CLIENT_USER, 0, 1, 2),
_CMD("INFO", IRC_INFO, CLIENT_USER|CLIENT_SERVER, 0, 1, 2),
_CMD("INVITE", IRC_INVITE, CLIENT_USER|CLIENT_SERVER, 2, 2, 0),
_CMD("INVITE", IRC_INVITE, CLIENT_USER|CLIENT_SERVER, 2, 2, 1),
_CMD("ISON", IRC_ISON, CLIENT_USER, 1, -1, 0),
_CMD("JOIN", IRC_JOIN, CLIENT_USER|CLIENT_SERVER, 1, 2, 0),
_CMD("KICK", IRC_KICK, CLIENT_USER|CLIENT_SERVER, 2, 3, 0),
@@ -156,7 +156,7 @@ Parse_GetCommandStruct( void )
/**
* Parse a command ("request") received from a client.
*
*
* This function is called after the connection layer received a valid CR+LF
* terminated line of text: we assume that this is a valid IRC command and
* try to do something useful with it :-)
@@ -461,10 +461,10 @@ Handle_Numeric(CLIENT *client, REQUEST *Req)
}
/* Determine source */
if (! Req->prefix[0]) {
/* Oops, no prefix!? */
Log(LOG_WARNING, "Got status code %s from \"%s\" without prefix!?",
Req->command, Client_ID(client));
if (!Req->prefix) {
Log(LOG_WARNING,
"Got status code %s from \"%s\" without prefix!?",
Req->command, Client_ID(client));
return true;
}

View File

@@ -217,8 +217,8 @@ ReverseLookup(const ng_ipaddr_t *IpAddr, char *resbuf, size_t reslen)
assert(reslen >= NG_INET_ADDRSTRLEN);
ng_ipaddr_tostr_r(IpAddr, tmp_ip_str);
Log_Subprocess(LOG_WARNING, "%s: Can't resolve address \"%s\": %s",
funcname, tmp_ip_str, errmsg);
Log_Subprocess(LOG_WARNING, "Can't resolve address \"%s\": %s [%s].",
tmp_ip_str, errmsg, funcname);
strlcpy(resbuf, tmp_ip_str, reslen);
return false;
}
@@ -334,14 +334,16 @@ static void
Log_Forgery_NoIP(const char *ip, const char *host)
{
Log_Subprocess(LOG_WARNING,
"Possible forgery: %s resolved to %s (which has no ip address)", ip, host);
"Possible forgery: %s resolved to \"%s\", which has no IP address!",
ip, host);
}
static void
Log_Forgery_WrongIP(const char *ip, const char *host)
{
Log_Subprocess(LOG_WARNING,
"Possible forgery: %s resolved to %s (which points to different address)", ip, host);
"Possible forgery: %s resolved to \"%s\", which points to a different address!",
ip, host);
}

View File

@@ -1,6 +1,6 @@
/*
* ngIRCd -- The Next Generation IRC Daemon
* Copyright (c)2001-2014 Alexander Barton (alex@barton.de) and Contributors.
* Copyright (c)2001-2015 Alexander Barton (alex@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
@@ -48,7 +48,11 @@ Dump_State(void)
{
Log(LOG_DEBUG, "--- Internal server state: %s ---",
Client_ID(Client_ThisServer()));
Log(LOG_DEBUG, "time()=%ld", time(NULL));
#ifdef HAVE_LONG_LONG
Log(LOG_DEBUG, "time()=%llu", (unsigned long long)time(NULL));
#else
Log(LOG_DEBUG, "time()=%lu", (unsigned long)time(NULL));
#endif
Conf_DebugDump();
Conn_DebugDump();
Client_DebugDump();

View File

@@ -1,3 +0,0 @@
Makefile.am
portabtest
portabtest.exe

View File

@@ -196,7 +196,7 @@ main(void)
Check_strlcat();
Check_strtok_r();
Check_vsnprintf(2+10, "%s%s", "ab", "1234567890");
return 0;
}

View File

@@ -50,9 +50,9 @@
* original. Also, there is now a builtin-test, just compile with:
* gcc -DTEST_SNPRINTF -o snprintf snprintf.c -lm
* and run snprintf for results.
*
*
* Thomas Roessler <roessler@guug.de> 01/27/98 for mutt 0.89i
* The PGP code was using unsigned hexadecimal formats.
* The PGP code was using unsigned hexadecimal formats.
* Unfortunately, unsigned formats simply didn't work.
*
* Michael Elkins <me@cs.hmc.edu> 03/05/98 for mutt 0.90.8
@@ -165,21 +165,21 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args)
int flags;
int cflags;
size_t currlen;
state = DP_S_DEFAULT;
currlen = flags = cflags = min = 0;
max = -1;
ch = *format++;
while (state != DP_S_DONE) {
if (ch == '\0')
if (ch == '\0')
state = DP_S_DONE;
switch(state) {
case DP_S_DEFAULT:
if (ch == '%')
if (ch == '%')
state = DP_S_FLAGS;
else
else
dopr_outch (buffer, &currlen, maxlen, ch);
ch = *format++;
break;
@@ -226,7 +226,7 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args)
if (ch == '.') {
state = DP_S_MAX;
ch = *format++;
} else {
} else {
state = DP_S_MOD;
}
break;
@@ -271,7 +271,7 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args)
switch (ch) {
case 'd':
case 'i':
if (cflags == DP_C_SHORT)
if (cflags == DP_C_SHORT)
value = va_arg (args, int);
else if (cflags == DP_C_LONG)
value = va_arg (args, long int);
@@ -401,12 +401,12 @@ dopr(char *buffer, size_t maxlen, const char *format, va_list args)
}
}
if (maxlen != 0) {
if (currlen < maxlen - 1)
if (currlen < maxlen - 1)
buffer[currlen] = '\0';
else if (maxlen > 0)
else if (maxlen > 0)
buffer[maxlen - 1] = '\0';
}
return currlen;
}
@@ -426,11 +426,11 @@ fmtstr(char *buffer, size_t *currlen, size_t maxlen, char *value, int flags,
for (strln = 0; value[strln]; ++strln); /* strlen */
padlen = min - strln;
if (padlen < 0)
if (padlen < 0)
padlen = 0;
if (flags & DP_F_MINUS)
if (flags & DP_F_MINUS)
padlen = -padlen; /* Left Justify */
while ((padlen > 0) && (cnt < max)) {
dopr_outch (buffer, currlen, maxlen, ' ');
--padlen;
@@ -460,12 +460,12 @@ fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base,
int spadlen = 0; /* amount to space pad */
int zpadlen = 0; /* amount to zero pad */
int caps = 0;
if (max < 0)
max = 0;
uvalue = value;
if(!(flags & DP_F_UNSIGNED)) {
if( value < 0 ) {
signvalue = '-';
@@ -477,7 +477,7 @@ fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base,
signvalue = ' ';
}
}
if (flags & DP_F_UP) caps = 1; /* Should characters be upper case? */
do {
@@ -497,7 +497,7 @@ fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base,
zpadlen = MAX(zpadlen, spadlen);
spadlen = 0;
}
if (flags & DP_F_MINUS)
if (flags & DP_F_MINUS)
spadlen = -spadlen; /* Left Justifty */
#ifdef DEBUG_SNPRINTF
@@ -512,7 +512,7 @@ fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base,
}
/* Sign */
if (signvalue)
if (signvalue)
dopr_outch (buffer, currlen, maxlen, signvalue);
/* Zeros */
@@ -524,9 +524,9 @@ fmtint(char *buffer, size_t *currlen, size_t maxlen, long value, int base,
}
/* Digits */
while (place > 0)
while (place > 0)
dopr_outch (buffer, currlen, maxlen, convert[--place]);
/* Left Justified spaces */
while (spadlen < 0) {
dopr_outch (buffer, currlen, maxlen, ' ');
@@ -541,7 +541,7 @@ abs_val(LDOUBLE value)
if (value < 0)
result = -value;
return result;
}
@@ -549,12 +549,12 @@ static LDOUBLE
POW10(int exp)
{
LDOUBLE result = 1;
while (exp) {
result *= 10;
exp--;
}
return result;
}
@@ -566,7 +566,7 @@ ROUND(LDOUBLE value)
intpart = (LLONG)value;
value = value - intpart;
if (value >= 0.5) intpart++;
return intpart;
}
@@ -600,7 +600,7 @@ my_modf(double x0, double *iptr)
ret = my_modf(x0-l*f, &i2);
(*iptr) = l*f + i2;
return ret;
}
}
(*iptr) = l;
return x - (*iptr);
@@ -618,14 +618,14 @@ fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue,
int iplace = 0;
int fplace = 0;
int padlen = 0; /* amount to pad */
int zpadlen = 0;
int zpadlen = 0;
int caps = 0;
int index;
double intpart;
double fracpart;
double temp;
/*
/*
* AIX manpage says the default is 0, but Solaris says the default
* is 6, and sprintf on AIX defaults to 6
*/
@@ -645,8 +645,8 @@ fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue,
}
}
/*
* Sorry, we only support 16 digits past the decimal because of our
/*
* Sorry, we only support 16 digits past the decimal because of our
* conversion method
*/
if (max > 16)
@@ -660,7 +660,7 @@ fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue,
my_modf(temp, &intpart);
fracpart = ROUND((POW10(max)) * (ufvalue - intpart));
if (fracpart >= POW10(max)) {
intpart++;
fracpart -= POW10(max);
@@ -697,16 +697,16 @@ fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue,
if (fplace == 311) fplace--;
}
fconvert[fplace] = 0;
/* -1 for decimal point, another -1 if we are printing a sign */
padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
padlen = min - iplace - max - 1 - ((signvalue) ? 1 : 0);
zpadlen = max - fplace;
if (zpadlen < 0) zpadlen = 0;
if (padlen < 0)
if (padlen < 0)
padlen = 0;
if (flags & DP_F_MINUS)
if (flags & DP_F_MINUS)
padlen = -padlen; /* Left Justifty */
if ((flags & DP_F_ZERO) && (padlen > 0)) {
if (signvalue) {
dopr_outch (buffer, currlen, maxlen, signvalue);
@@ -722,10 +722,10 @@ fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue,
dopr_outch (buffer, currlen, maxlen, ' ');
--padlen;
}
if (signvalue)
if (signvalue)
dopr_outch (buffer, currlen, maxlen, signvalue);
while (iplace > 0)
while (iplace > 0)
dopr_outch (buffer, currlen, maxlen, iconvert[--iplace]);
#ifdef DEBUG_SNPRINTF
@@ -738,11 +738,11 @@ fmtfp (char *buffer, size_t *currlen, size_t maxlen, LDOUBLE fvalue,
*/
if (max > 0) {
dopr_outch (buffer, currlen, maxlen, '.');
while (fplace > 0)
while (fplace > 0)
dopr_outch (buffer, currlen, maxlen, fconvert[--fplace]);
}
while (zpadlen > 0) {
dopr_outch (buffer, currlen, maxlen, '0');
--zpadlen;
@@ -786,7 +786,7 @@ va_dcl
{
size_t ret;
va_list ap;
va_start(ap, fmt);
ret = vsnprintf(str, count, fmt, ap);
va_end(ap);

View File

@@ -1,24 +0,0 @@
Makefile.am
T-ngircd1
T-ngircd1.exe
T-ngircd2
T-ngircd2.exe
channel-test
connect-test
invite-test
join-test
kick-test
message-test
misc-test
mode-test
opless-channel-test
server-link-test
who-test
whois-test
ngircd-test1.log
ngircd-test2.log
ngircd-test1.motd
ngircd-test2.motd
logs
tests
tests-skipped.lst

View File

@@ -50,7 +50,7 @@ start-server.sh [<id>]
and that no other instance of the test binary is already running.
The exit code is 0 if the test binary could be started.
stop-server.sha [<id>]
stop-server.sh [<id>]
This script uses getpid.sh to detect a running test binary
"T-ngircd<id>" and then shuts it down using the TERM signal.

View File

@@ -1,7 +1,7 @@
# ngIRCd test suite
# Channel test
spawn telnet localhost 6789
spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
@@ -64,10 +64,10 @@ expect {
"323 nick :End of LIST"
}
send "part #channel\r"
send "part #channel :bye bye\r"
expect {
timeout { exit 1 }
"@* PART #channel :nick"
"@* PART #channel :bye bye"
}
send "join #channel\r"
@@ -93,11 +93,11 @@ expect {
send "join 0\r"
expect {
timeout { exit 1 }
"@* PART #channel2 :nick"
"@* PART #channel2 :"
}
expect {
timeout { exit 1 }
"@* PART #channel :nick"
"@* PART #channel :"
}
send "quit\r"

View File

@@ -1,7 +1,7 @@
# ngIRCd test suite
# Idle test
spawn telnet localhost 6789
spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"

View File

@@ -1,7 +1,7 @@
# ngIRCd test suite
# Server connect test
spawn telnet localhost 6789
spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"

View File

@@ -1,7 +1,7 @@
# ngIRCd test suite
# INVITE test
spawn telnet localhost 6789
spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
@@ -82,7 +82,7 @@ expect {
send "part #channel\r"
expect {
timeout { exit 1}
-re "PART #channel :?nick"
"@* PART #channel :"
}
send "invite nick :parameter with spaces\r"

View File

@@ -1,7 +1,7 @@
# ngIRCd test suite
# JOIN test
spawn telnet localhost 6789
spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"

View File

@@ -1,7 +1,7 @@
# ngIRCd test suite
# KICK test
spawn telnet localhost 6789
spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"

View File

@@ -1,7 +1,7 @@
# ngIRCd test suite
# PRIVMSG and NOTICE test
spawn telnet localhost 6789
spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
@@ -72,24 +72,17 @@ expect {
"MODE nick :-b"
}
# The following two tests using "localhost" as host name
# had to be disabled, because there are operating systems
# out there, that use "localhost.<domain>" as host name
# for 127.0.0.1 instead of just "localhost".
# (for example OpenBSD 4, OpenSolaris, ...)
#
#send "privmsg ~user\%localhost :test\r"
#expect {
# timeout { exit 1 }
# "@* PRIVMSG nick :test"
#}
#
#send "privmsg Nick!~User@LocalHost :test\r"
#expect {
# timeout { exit 1 }
# "@* PRIVMSG nick :test"
# "401"
#}
send "privmsg ~user\%127.0.0.1 :test\r"
expect {
timeout { exit 1 }
"@* PRIVMSG nick :test"
}
send "privmsg Nick!~User@127.0.0.1 :test\r"
expect {
timeout { exit 1 }
"@* PRIVMSG nick :test"
}
send "away :away\r"
expect {

View File

@@ -1,7 +1,7 @@
# ngIRCd test suite
# Misc test
spawn telnet localhost 6789
spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
@@ -130,7 +130,7 @@ expect {
send "userhost nick\r"
expect {
timeout { exit 1 }
-re ":ngircd.test.server 302 nick :?nick=+.*@(localhos.*|127.0.0.1)"
-re ":ngircd.test.server 302 nick :?nick=+.*@127.0.0.1"
}
send "userhost doesnotexist\r"
@@ -142,7 +142,7 @@ expect {
send "userhost nick doesnotexist nick doesnotexist\r"
expect {
timeout { exit 1 }
-re ":ngircd.test.server 302 nick :nick=+.*@(localhos.*|127.0.0.1) nick=+.*@(localhos.*|127.0.0.1)"
-re ":ngircd.test.server 302 nick :nick=+.*@127.0.0.1 nick=+.*@127.0.0.1"
}
send "away :testing\r"
@@ -154,7 +154,7 @@ expect {
send "userhost nick nick nick nick nick nick\r"
expect {
timeout { exit 1 }
-re ":ngircd.test.server 302 nick :nick=-.*@(localhos.*|127.0.0.1) nick=-.*@(localhos.*|127.0.0.1) nick=-.*@(localhos.*|127.0.0.1) nick=-.*@(localhos.*|127.0.0.1) nick=-.*@(localhos.*|127.0.0.1)\r"
-re ":ngircd.test.server 302 nick :nick=-.*@127.0.0.1 nick=-.*@127.0.0.1 nick=-.*@127.0.0.1 nick=-.*@127.0.0.1 nick=-.*@127.0.0.1\r"
}
send "quit\r"

View File

@@ -1,7 +1,7 @@
# ngIRCd test suite
# MODE test
spawn telnet localhost 6789
spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"

View File

@@ -17,6 +17,7 @@
OperCanUseMode = yes
Ident = no
IncludeDir = /var/empty
DNS = no
PAM = no
[Operator]

View File

@@ -17,6 +17,7 @@
OperCanUseMode = yes
Ident = no
IncludeDir = /var/empty
DNS = no
PAM = no
[Operator]

View File

@@ -1,7 +1,7 @@
# ngIRCd test suite
# Op-less channel test
spawn telnet localhost 6789
spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"

View File

@@ -1,7 +1,7 @@
# ngIRCd test suite
# server-server link test
spawn telnet localhost 6790
spawn telnet 127.0.0.1 6790
expect {
timeout { exit 1 }
"Connected"

View File

@@ -3,7 +3,7 @@
set timeout 30
spawn telnet localhost 6789
spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"

View File

@@ -1,7 +1,7 @@
# ngIRCd test suite
# WHO test
spawn telnet localhost 6789
spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
@@ -62,7 +62,7 @@ expect {
":ngircd.test.server 352 nick #channel * * ngircd.test.server nick G@ :0 Real Name"
}
send "who localhos*\r"
send "who 127.0.0.*\r"
expect {
timeout { exit 1 }
":ngircd.test.server 352 nick \* * * ngircd.test.server nick G :0 Real Name"
@@ -89,7 +89,7 @@ expect {
send "part #channel\r"
expect {
timeout { exit 1 }
"@* PART #channel :nick"
"@* PART #channel :"
}
send "who Real?Name\r"
@@ -120,7 +120,7 @@ expect {
"305 nick"
}
send "who ??cal*ho*\r"
send "who ??7.*0*\r"
expect {
timeout { exit 1 }
":ngircd.test.server 352 nick \* * * ngircd.test.server nick H* :0 Real Name"

View File

@@ -1,7 +1,7 @@
# ngIRCd test suite
# WHOIS test
spawn telnet localhost 6789
spawn telnet 127.0.0.1 6789
expect {
timeout { exit 1 }
"Connected"
@@ -17,7 +17,7 @@ expect {
send "whois nick\r"
expect {
timeout { exit 1 }
"311 nick nick ~user localhost* \* :Real Name\r"
"311 nick nick ~user 127.0.0.1 \* :Real Name\r"
}
expect {
timeout { exit 1 }
@@ -27,25 +27,25 @@ expect {
send "whois *\r"
expect {
timeout { exit 1 }
"311 nick nick ~user localhost* \* :Real Name\r"
"311 nick nick ~user 127.0.0.1* \* :Real Name\r"
}
send "whois n*\r"
expect {
timeout { exit 1 }
"311 nick nick ~user localhost* \* :Real Name\r"
"311 nick nick ~user 127.0.0.1* \* :Real Name\r"
}
send "whois ?ick\r"
expect {
timeout { exit 1 }
"311 nick nick ~user localhost* \* :Real Name\r"
"311 nick nick ~user 127.0.0.1* \* :Real Name\r"
}
send "whois ????,n?*k\r"
expect {
timeout { exit 1 }
"311 nick nick ~user localhost* \* :Real Name\r"
"311 nick nick ~user 127.0.0.1* \* :Real Name\r"
}
send "whois unknown\r"
@@ -61,7 +61,7 @@ expect {
send "whois ngircd.test.server2 nick\r"
expect {
timeout { exit 1 }
":ngircd.test.server2 311 nick nick ~user localhost* \* :Real Name\r"
":ngircd.test.server2 311 nick nick ~user 127.0.0.1* \* :Real Name\r"
}
send "whois nosuchserver unknown\r"

1
src/tool/.gitignore vendored
View File

@@ -1 +0,0 @@
Makefile.am