ngircd-alex.git
4 years agoStreamline ".gitignore" files
Alexander Barton [Sun, 19 Jul 2015 01:03:06 +0000 (03:03 +0200)]
Streamline ".gitignore" files

4 years agoUpdate NEWS and ChangeLog files
Alexander Barton [Sun, 19 Jul 2015 00:41:03 +0000 (02:41 +0200)]
Update NEWS and ChangeLog files

4 years agoMerge pull request #215 from tejr/master
Alexander Barton [Fri, 26 Jun 2015 05:41:19 +0000 (07:41 +0200)]
Merge pull request #215 from tejr/master

Specify session context for OpenSSL clients.

Closes #182.

4 years agoSpecify session context for OpenSSL clients
Tom Ryder [Fri, 26 Jun 2015 04:21:54 +0000 (16:21 +1200)]
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>

4 years agoFix several broken URLs.
Unit 193 [Wed, 24 Jun 2015 04:24:22 +0000 (00:24 -0400)]
Fix several broken URLs.

4 years agoMerge remote-tracking branch 'LucentW/master'
Alexander Barton [Sun, 7 Jun 2015 19:13:45 +0000 (21:13 +0200)]
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.

4 years agoMake setgroups(3) function optional
Alexander Barton [Sat, 6 Jun 2015 20:19:47 +0000 (22:19 +0200)]
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.

4 years agoIRC operators w/OperCanMode can kick anyone
LucentW [Mon, 11 May 2015 20:05:08 +0000 (22:05 +0200)]
IRC operators w/OperCanMode can kick anyone

Closes #202.

(cherry picked from commit 10c7ba99e73b42ec8c4c191ccdae60bdd35bba7d)

4 years agoImplement numeric RPL_LISTSTART(321)
LucentW [Wed, 13 May 2015 20:26:14 +0000 (20:26 +0000)]
Implement numeric RPL_LISTSTART(321)

lightIRC and other clients expecting RPL_LISTSTART should now behave correctly.

Closes #207.

(cherry picked from commit 0680ce5fd99bc643651d1433bcdaf271aeb73c46)

4 years agoUpdate ngircd.conf.5: "CloadUserToNick" hides user and real name
Alexander Barton [Fri, 15 May 2015 21:15:09 +0000 (23:15 +0200)]
Update ngircd.conf.5: "CloadUserToNick" hides user and real name

Closes #208.

4 years agoFix with oneshot invites
LucentW [Fri, 15 May 2015 12:02:21 +0000 (14:02 +0200)]
Fix with oneshot invites

This should finally implement correctly oneshot invites sent via /INVITE

4 years agoFix MatchCaseInsensitive[List]](): lowercase string _and_ pattern
Alexander Barton [Wed, 13 May 2015 21:47:53 +0000 (23:47 +0200)]
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 ...

4 years agoStreamline effect of "MorePrivacy" option (WHOIS, LIST)
Alexander Barton [Wed, 13 May 2015 20:42:51 +0000 (22:42 +0200)]
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

4 years agoFixed building issues\
LucentW [Wed, 13 May 2015 20:08:26 +0000 (20:08 +0000)]
Fixed building issues\

Now builds cleanly. Pass all tests from make check.

4 years agoImplement timestamp tracking of invites
LucentW [Mon, 11 May 2015 19:50:48 +0000 (21:50 +0200)]
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.

4 years agoKeep track of who placed bans/invites/excepts
LucentW [Fri, 8 May 2015 14:02:57 +0000 (16:02 +0200)]
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!

4 years agoIRC operators w/OperCanMode can kick anyone
LucentW [Mon, 11 May 2015 20:05:08 +0000 (22:05 +0200)]
IRC operators w/OperCanMode can kick anyone

4 years agodoc/Modes.txt: Fix indentation
Alexander Barton [Thu, 30 Apr 2015 07:29:41 +0000 (09:29 +0200)]
doc/Modes.txt: Fix indentation

4 years agoMerge pull request #197 from LucentW/master
Alexander Barton [Thu, 30 Apr 2015 07:28:15 +0000 (09:28 +0200)]
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.

4 years agoFixed indents 2
LucentW [Wed, 29 Apr 2015 18:27:11 +0000 (20:27 +0200)]
Fixed indents 2

4 years agoFixed indents and documentation
LucentW [Wed, 29 Apr 2015 18:25:18 +0000 (20:25 +0200)]
Fixed indents and documentation

(also updated the copyright date on the txt I edited)

4 years agoImplement +I (private channel list on whois)
LucentW [Mon, 27 Apr 2015 21:20:32 +0000 (23:20 +0200)]
Implement +I (private channel list on whois)

Implements enhancement requested in issue #179

4 years agoMake sure that the target user is able to join a local channel
Alexander Barton [Sun, 12 Apr 2015 18:59:43 +0000 (20:59 +0200)]
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.

4 years agoINVITE command: Enforce 1 second penalty time
Alexander Barton [Sun, 12 Apr 2015 18:14:24 +0000 (20:14 +0200)]
INVITE command: Enforce 1 second penalty time

This prevents flooding of the target client.

This closes #186. Reported by Cahata, thanks!

4 years agoMODE command: Always report channel creation time
Alexander Barton [Sun, 12 Apr 2015 17:35:39 +0000 (19:35 +0200)]
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!

4 years agoUpdate Xcode project for latest Xcode version (6.3)
Alexander Barton [Fri, 10 Apr 2015 20:30:17 +0000 (22:30 +0200)]
Update Xcode project for latest Xcode version (6.3)

4 years agongIRCd Release 22.1 rel-22.1
Alexander Barton [Mon, 6 Apr 2015 12:36:14 +0000 (14:36 +0200)]
ngIRCd Release 22.1

4 years agoUpdate NEWS and ChangeLog for ngIRCd 22.1
Alexander Barton [Mon, 6 Apr 2015 12:33:23 +0000 (14:33 +0200)]
Update NEWS and ChangeLog for ngIRCd 22.1

4 years agoUpdate some copyright notices for 2015
Alexander Barton [Mon, 6 Apr 2015 12:32:59 +0000 (14:32 +0200)]
Update some copyright notices for 2015

4 years agoPlatforms.txt: Add and update systems
Alexander Barton [Mon, 6 Apr 2015 12:07:16 +0000 (14:07 +0200)]
Platforms.txt: Add and update systems

- Update powerpc/apple/darwin7.9.0

Thanks to Götz Hoffart <goetz@hoffart.de>!

4 years agoFix spelling of RPL_WHOISBOT message text
Alexander Barton [Fri, 27 Mar 2015 21:51:21 +0000 (22:51 +0100)]
Fix spelling of RPL_WHOISBOT message text

4 years agoDon't send nick name as default PART reason
Alexander Barton [Sat, 14 Mar 2015 10:13:50 +0000 (11:13 +0100)]
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!

4 years agoFix "WHO #<chan>" showing invisible users and hiding all visible
Alexander Barton [Wed, 11 Mar 2015 23:28:31 +0000 (00:28 +0100)]
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!

4 years agoFix typo in src/testsuite/README
Alexander Barton [Wed, 11 Mar 2015 21:14:24 +0000 (22:14 +0100)]
Fix typo in src/testsuite/README

4 years agoAuth PING: Fix our information text for manual sending of "PONG"
Alexander Barton [Tue, 20 Jan 2015 21:50:13 +0000 (22:50 +0100)]
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!

4 years agoAuth PING: The numeric ID is a "long", use atol()
Alexander Barton [Tue, 20 Jan 2015 21:49:23 +0000 (22:49 +0100)]
Auth PING: The numeric ID is a "long", use atol()

4 years agoAuth PING: Don't send a prefix in our PING command
Alexander Barton [Tue, 20 Jan 2015 21:44:36 +0000 (22:44 +0100)]
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!

4 years agoFAQ: How can I "auto-op" users in channels?
Alexander Barton [Tue, 13 Jan 2015 11:44:29 +0000 (12:44 +0100)]
FAQ: How can I "auto-op" users in channels?

4 years agoFix syntax of ERR_LISTFULL_MSG(478) numeric
Alexander Barton [Sat, 27 Dec 2014 00:39:07 +0000 (01:39 +0100)]
Fix syntax of ERR_LISTFULL_MSG(478) numeric

Pointed out by "wowaname" in #ngircd, thanks!

4 years agoEnhance debug messages while sending CHANINFO commands
Alexander Barton [Sat, 20 Dec 2014 14:35:47 +0000 (15:35 +0100)]
Enhance debug messages while sending CHANINFO commands

4 years agoReset "last try" timer when enabling a passive server
Alexander Barton [Sat, 20 Dec 2014 14:31:30 +0000 (15:31 +0100)]
Reset "last try" timer when enabling a passive server

This results in a new connection attempt as soon as possible.

5 years agoChange log message for "Can't resolve address"
Alexander Barton [Wed, 10 Dec 2014 10:11:42 +0000 (11:11 +0100)]
Change log message for "Can't resolve address"

5 years agoChange log messages issued for IP address forgeries
Alexander Barton [Wed, 10 Dec 2014 10:01:51 +0000 (11:01 +0100)]
Change log messages issued for IP address forgeries

5 years agoMerge remote-tracking branch 'alex/TestsuiteNoDNS'
Alexander Barton [Sat, 1 Nov 2014 19:14:09 +0000 (20:14 +0100)]
Merge remote-tracking branch 'alex/TestsuiteNoDNS'

* alex/TestsuiteNoDNS:
  Test suite: Don't use DNS lookups

5 years agoMerge branch 'CipherListNoSSL3'
Alexander Barton [Sun, 26 Oct 2014 10:58:22 +0000 (11:58 +0100)]
Merge branch 'CipherListNoSSL3'

* CipherListNoSSL3:
  INSTALL: List the changed SSL CipherList default value.
  Update "CipherList" to not enable SSLv3 by default

5 years agoINSTALL: List the changed SSL CipherList default value. CipherListNoSSL3
Alexander Barton [Sun, 26 Oct 2014 10:55:28 +0000 (11:55 +0100)]
INSTALL: List the changed SSL CipherList default value.

5 years agoHowToRelease.txt: Add note about the bug tracker
Alexander Barton [Wed, 22 Oct 2014 21:12:10 +0000 (23:12 +0200)]
HowToRelease.txt: Add note about the bug tracker

5 years agoUpdate "CipherList" to not enable SSLv3 by default
Alexander Barton [Thu, 16 Oct 2014 11:42:24 +0000 (13:42 +0200)]
Update "CipherList" to not enable SSLv3 by default

Idea, initial patch, and testing by Christoph Biedl
<ngircd.anoy@manchmal.in-ulm.de>

5 years agongIRCd Release 22 rel-22
Alexander Barton [Sat, 11 Oct 2014 18:30:04 +0000 (20:30 +0200)]
ngIRCd Release 22

5 years agoPlatforms.txt: Add and update systems
Alexander Barton [Sat, 11 Oct 2014 18:24:44 +0000 (20:24 +0200)]
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".

5 years agoUser mode "F": Fix description in NEWS and ChangeLog
Alexander Barton [Tue, 7 Oct 2014 01:27:38 +0000 (03:27 +0200)]
User mode "F": Fix description in NEWS and ChangeLog

5 years agoUpdate NEWS and ChangeLog for ngIRCd 22 once more ...
Alexander Barton [Mon, 6 Oct 2014 19:51:59 +0000 (21:51 +0200)]
Update NEWS and ChangeLog for ngIRCd 22 once more ...

5 years agoMatch list patterns case-insensitive
Alexander Barton [Mon, 6 Oct 2014 19:40:39 +0000 (21:40 +0200)]
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!

5 years agongIRCd Release 22~rc1 rel-22-rc1
Alexander Barton [Mon, 29 Sep 2014 15:09:51 +0000 (17:09 +0200)]
ngIRCd Release 22~rc1

5 years agoUpdate NEWS and ChangeLog for ngIRCd 22 once more ...
Alexander Barton [Mon, 22 Sep 2014 00:37:37 +0000 (02:37 +0200)]
Update NEWS and ChangeLog for ngIRCd 22 once more ...

5 years agoSync "except lists" between servers SyncExceptLists
Alexander Barton [Wed, 17 Sep 2014 23:08:55 +0000 (01:08 +0200)]
Sync "except lists" between servers

Up to now, ban, invite, and G-Line lists have been synced between servers
while linking -- but obviously nobody noticed that except list have been
missing ever since. Until now.

Thanks to "j4jackj", who reported this issue in #ngircd.

5 years agoAllow longer usernames for authentication AuthUsername
Alexander Barton [Wed, 3 Sep 2014 14:03:28 +0000 (16:03 +0200)]
Allow longer usernames for authentication

5 years agoCorrectly check that a server has a valid hostname and port
Alexander Barton [Wed, 10 Sep 2014 11:03:30 +0000 (13:03 +0200)]
Correctly check that a server has a valid hostname and port

David Binderman <dcb314@hotmail.com> reported the following compiler warning,
which is a real bug in ngIRCd, thanks!

conn.c:2077:55: warning: logical not is only applied to the left hand
                         side of comparison [-Wlogical-not-parentheses]

5 years agoFix spelling and whitespaces in INSTALL
Alexander Barton [Thu, 4 Sep 2014 16:28:33 +0000 (18:28 +0200)]
Fix spelling and whitespaces in INSTALL

5 years agoUpdate NEWS and ChangeLog for ngIRCd 22
Alexander Barton [Thu, 4 Sep 2014 16:28:17 +0000 (18:28 +0200)]
Update NEWS and ChangeLog for ngIRCd 22

5 years agoLists_MakeMask: Don't destroy source buffer
Alexander Barton [Fri, 8 Aug 2014 11:50:48 +0000 (13:50 +0200)]
Lists_MakeMask: Don't destroy source buffer

5 years agoInitialize Conf_ScrubCTCP even when SYSLOG isn't #define'd
Alexander Barton [Tue, 29 Jul 2014 21:05:17 +0000 (23:05 +0200)]
Initialize Conf_ScrubCTCP even when SYSLOG isn't #define'd

The "SYSLOG" #define isn't related to "Conf_ScrubCTCP" at all, so
initialize the latter even when "SYSLOG" isn't #define'd.

Pointed out by wowaname on #ngircd, thanks!

5 years agoPlatforms.txt: Add and update systems
Alexander Barton [Sat, 26 Jul 2014 13:22:35 +0000 (15:22 +0200)]
Platforms.txt: Add and update systems

- Add armv7l/unk./linux-gnueabihf
- Add x86_64/apple/darwin14.0.0

Thanks to Götz Hoffart <goetz@hoffart.de>!

5 years agoIncrease MAX_SERVERS from 16 to 64
Alexander Barton [Sun, 20 Jul 2014 11:19:36 +0000 (13:19 +0200)]
Increase MAX_SERVERS from 16 to 64

There are installations out there that would like to configure more
than 16 links per server, so increase this limit. Best would be to
get rid of MAX_SERVERS altogether and make if fully dynamic, but
start with this quick and dirty hack ...

5 years agoNew "Debian release" 21.1-0ab2
Alexander Barton [Mon, 14 Jul 2014 10:01:46 +0000 (12:01 +0200)]
New "Debian release" 21.1-0ab2

(cherry picked from commit 48fcb97fa4a2762a873d9d693c7a126588a1811d)

5 years agoDebian: Don't adjust path names that are correct by default
Alexander Barton [Mon, 14 Jul 2014 09:40:38 +0000 (11:40 +0200)]
Debian: Don't adjust path names that are correct by default

5 years agoDebian: Correctly set and use "docdir"
Alexander Barton [Mon, 14 Jul 2014 08:55:57 +0000 (10:55 +0200)]
Debian: Correctly set and use "docdir"

5 years agoUpdate config.guess and config.sub to recent versions
Alexander Barton [Mon, 14 Jul 2014 08:53:37 +0000 (10:53 +0200)]
Update config.guess and config.sub to recent versions

- config.guess: 2014-03-23
- config.sub: 2014-05-01

5 years agoTest suite: Don't use DNS lookups TestsuiteNoDNS
Alexander Barton [Thu, 17 Apr 2014 21:57:38 +0000 (23:57 +0200)]
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.

5 years agoAdd "tests-skipped.lst" to src/testsuite/.gitignore
Alexander Barton [Wed, 4 Jun 2014 10:20:31 +0000 (12:20 +0200)]
Add "tests-skipped.lst" to src/testsuite/.gitignore

5 years agoTest suite/platformtest.sh: Detect when tests have been skipped
Alexander Barton [Wed, 4 Jun 2014 10:15:23 +0000 (12:15 +0200)]
Test suite/platformtest.sh: Detect when tests have been skipped

Detect if some tests have been skipped, for example when telnet(1) or expect(1)
is missing: ./contrib/platformtest.sh will echo a warning message now.

5 years agoPlatforms.txt: Add and update systems
Alexander Barton [Mon, 5 May 2014 20:44:04 +0000 (22:44 +0200)]
Platforms.txt: Add and update systems

- Add sparc/unknown/openbsd5.5
- Update powerpc/apple/darwin7.9.0
- Update x86_64/unknown/linux-gnu, Open64
- Update x86_64/unknown/linux-gnu, Sun C 5.12/Solaris Studio 12.3
- Update x86_64/unknown/linux-gnu, tcc 0.9.25

Thanks to Götz Hoffart <goetz@hoffart.de>!

5 years agoAdd "cov-int" directory (Coverity test tool) to .gitignore file
Alexander Barton [Thu, 1 May 2014 13:07:47 +0000 (15:07 +0200)]
Add "cov-int" directory (Coverity test tool) to .gitignore file

5 years agoTest suite: Update file headers and comments
Alexander Barton [Thu, 17 Apr 2014 21:55:49 +0000 (23:55 +0200)]
Test suite: Update file headers and comments

5 years agoUpdate links to "Arthur" to use the HTTP protocol
Alexander Barton [Tue, 25 Mar 2014 19:27:17 +0000 (20:27 +0100)]
Update links to "Arthur" to use the HTTP protocol

5 years agongIRCd Release 21.1
Alexander Barton [Tue, 25 Mar 2014 13:46:28 +0000 (14:46 +0100)]
ngIRCd Release 21.1

(cherry picked from commit ee28e76df2a73f3bb4bcf69c644eae9a10298a58)

5 years agoPlatforms.txt: Update i686/unknown/gnu0.5
Alexander Barton [Sat, 22 Feb 2014 19:11:04 +0000 (20:11 +0100)]
Platforms.txt: Update i686/unknown/gnu0.5

5 years agoPlatforms.txt: Update powerpc/apple/darwin7.9.0
Alexander Barton [Mon, 13 Jan 2014 15:51:41 +0000 (16:51 +0100)]
Platforms.txt: Update powerpc/apple/darwin7.9.0

- Update powerpc/apple/darwin7.9.0, gcc 3.3

Thanks to Götz Hoffart <goetz@hoffart.de>!

5 years agoPlatforms.txt: Update x86_64/unkn./linux-gnu, clang 3.x
Alexander Barton [Tue, 7 Jan 2014 20:18:13 +0000 (21:18 +0100)]
Platforms.txt: Update x86_64/unkn./linux-gnu, clang 3.x

- Update x86_64/unknown/linux-gnu, clang 3.2 => clang 3.3

5 years agoPlatforms.txt: Add and update more systems
Alexander Barton [Tue, 7 Jan 2014 09:09:54 +0000 (10:09 +0100)]
Platforms.txt: Add and update more systems

- update i686/pc/linux-gnu, gcc 2.7.2
- update powerpc/apple/darwin6.8, gcc 3.1
- add powerpc/apple/darwin9.8.0, gcc 4.0.1

Thanks to Götz Hoffart <goetz@hoffart.de>!

5 years agodoc/Bopm.txt: Update file header
Alexander Barton [Tue, 18 Mar 2014 23:59:01 +0000 (00:59 +0100)]
doc/Bopm.txt: Update file header

5 years agodoc/Bopm.txt: Update "connregex" and "kline" for current ngIRCd
Alexander Barton [Tue, 18 Mar 2014 23:54:23 +0000 (00:54 +0100)]
doc/Bopm.txt: Update "connregex" and "kline" for current ngIRCd

Thanks to "kerin" on IRC for pointing this out!

5 years agoAllow "DefaultUserModes" to set all possible modes
Alexander Barton [Tue, 18 Mar 2014 15:43:21 +0000 (16:43 +0100)]
Allow "DefaultUserModes" to set all possible modes

Let IRC_MODE() detect that the "fake" MODE command originated on the local
sever, which enables all modes to be settable using "DefaultUserModes"
that can be set by regular MODE commands, including modes only settable by
IRC Operators.

5 years agoSpoofed prefixes: Really kill connection on non-server links
Alexander Barton [Tue, 18 Mar 2014 15:27:03 +0000 (16:27 +0100)]
Spoofed prefixes: Really kill connection on non-server links

This fixes commit 6cbe1308 which only killed the connection when the
spoofed prefix itself belonged to a non-server client.

5 years agoImplement user mode "F": "relaxed flood protection"
Alexander Barton [Tue, 18 Mar 2014 13:55:38 +0000 (14:55 +0100)]
Implement user mode "F": "relaxed flood protection"

ngIRCd relaxes its flood protection for users having the user mode "F" set
and allows them 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, see
<http://docs.dal.net/docs/modes.html#4.9>.

5 years agoHandle "throttling" in a single function
Alexander Barton [Tue, 18 Mar 2014 13:48:52 +0000 (14:48 +0100)]
Handle "throttling" in a single function

ngIRCd uses "command throttling" and "bps throttling" (bytes per second).
The states are detected in different functions, Conn_Handler() and
Read_Request(), but handle the actual "throttling" in a common function:
this enables us to guarantee consistent behavior and to disable throttling
for special connections in only one place, eventually.

5 years agoUpdated config.{guess|sub} to version 2014-03-13
Alexander Barton [Tue, 18 Mar 2014 13:42:11 +0000 (14:42 +0100)]
Updated config.{guess|sub} to version 2014-03-13

5 years agoStreamline DEBUG_ARRAY, DEBUG_BUFFER, DEBUG_IO, DEBUG_ZIP
Alexander Barton [Mon, 17 Mar 2014 22:52:08 +0000 (23:52 +0100)]
Streamline DEBUG_ARRAY, DEBUG_BUFFER, DEBUG_IO, DEBUG_ZIP

Change all #define's to follow the form
#define DEBUG_xxx {0|1}
to disable (0, default) or enable (1) additional debug messages.

And somewhat enhance some DEBUG_BUFFER messages.

5 years agoconn.c: Code cleanup
Alexander Barton [Mon, 17 Mar 2014 21:59:58 +0000 (22:59 +0100)]
conn.c: Code cleanup

Reformat and restructure some code, move all SSL related code into
one single #ifdef block, for example.

5 years agoXcode: remove imp.h and exp.h from project file
Alexander Barton [Mon, 17 Mar 2014 17:07:51 +0000 (18:07 +0100)]
Xcode: remove imp.h and exp.h from project file

These files have been removed from ngIRCd in commit 259c314d,
"Remove imp.h and exp.h header files".

5 years agoRe-add #include's for header files of the C file itself
Alexander Barton [Mon, 17 Mar 2014 17:02:57 +0000 (18:02 +0100)]
Re-add #include's for header files of the C file itself

This partially reverts commit b130b35f4, "Update #include's: remove
unused and add missing ones", but fixes the following compiler and
analyzer warnings of Apple Xcode 5:

 "Semantic issue: No previous prototype for function 'yyy'"

5 years agoUpdate copyright notices of recently changed files
Alexander Barton [Mon, 17 Mar 2014 01:13:15 +0000 (02:13 +0100)]
Update copyright notices of recently changed files

5 years agoUpdate #include's: remove unused and add missing ones
Alexander Barton [Mon, 17 Mar 2014 01:28:39 +0000 (02:28 +0100)]
Update #include's: remove unused and add missing ones

The "deheader" tool (<http://www.catb.org/~esr/deheader/>) has been
used to find unused #include directives as well as missing ones.

Tested on:

- A/UX 3.1.1
- ArchLinux (2014-03-17)
- Debian GNU/Hurd
- Debian GNU/Linux 6.0.9
- Debian GNU/Linux 7.4
- Fedora 20
- FreeBSD 9.2
- OpenBSD 4.8
- OpenBSD 5.1
- OS X 10.9
- Solaris 11

5 years agoportab.h: Restructure and clean up code
Alexander Barton [Mon, 17 Mar 2014 00:17:30 +0000 (01:17 +0100)]
portab.h: Restructure and clean up code

- Don't use HAVE_SYS_TYPES_H, <sys/types.h> is a required header now.
- Streamline check for boolean data types.
- Better indent #ifdef constructs.

5 years agoconfigure[.ng]: <sys/types.h> is a required header file
Alexander Barton [Sun, 16 Mar 2014 23:47:45 +0000 (00:47 +0100)]
configure[.ng]: <sys/types.h> is a required header file

ngIRCd already includes <sys/types.h> in a lot of places without
checking for its existence (for example in "ngircd.c", "io.c", ...),
therefore make it a required header file.

5 years agoio.c: <sys/time.h> is only needed when using select()
Alexander Barton [Sun, 16 Mar 2014 23:45:07 +0000 (00:45 +0100)]
io.c: <sys/time.h> is only needed when using select()

Only include the <sys/time.h> header when using the select() IO API,
it isn't required otherwise.

5 years agoRemove imp.h and exp.h header files
Alexander Barton [Sun, 16 Mar 2014 23:17:02 +0000 (00:17 +0100)]
Remove imp.h and exp.h header files

These include files don't have a function any more, remove them.

5 years agostrdup.c: Code cleanup
Alexander Barton [Sun, 16 Mar 2014 21:59:03 +0000 (22:59 +0100)]
strdup.c: Code cleanup

5 years agoDon't define SSL_Want{Read|Write}() when SSL is disabled
Alexander Barton [Sun, 16 Mar 2014 21:28:37 +0000 (22:28 +0100)]
Don't define SSL_Want{Read|Write}() when SSL is disabled

Not even call the "dummy" functions.

5 years agoCode cleanup, remove blank lines
Alexander Barton [Sun, 16 Mar 2014 21:11:26 +0000 (22:11 +0100)]
Code cleanup, remove blank lines