Commit Briefs

0a26079af2 Alexander Barton

ngIRCd 20~rc1 (tags/rel-20-rc1)


b6e49f3920 Alexander Barton

Update Xcode project files


4123118d5a Alexander Barton

conf.c: Use strlcpy() instead of strcpy()

This fixes the following warning of gcc on OpenBSD 5.0: conf.c:728: warning: strcpy() is almost always misused, please use strlcpy()


e29d198700 Alexander Barton

tool.h: Don't check for and #define PF_INET

This is correctly handled by ipaddr/ng_ipaddr.h today, and the check in tool.h isn't required any more -- and caused errors on OpenBSD 5.0: In file included from ./../tool/tool.h:23: /usr/include/arpa/inet.h:74: warning: "struct in_addr" declared inside parameter list


6f531a3c99 Alexander Barton

conf-ssl.h: Use "gnutls_session_t" instead of "gnutls_session"

This fixes the following warning with current versions of GnuTLS: conf-ssl.h:36: warning: "gnutls_session" is deprecated


53917fa4b8 Alexander Barton

Add new IRC+ server flag "X": "XOP modes supported"

This flag indicates, that the server supports the enhanced "xop channel user modes", like channel owner, admin, and halfop. This information is used to make sure that no unsupported CHANINFO commands are sent to servers not supporting such mode prefixes, for example.



4185c4a44a Alexander Barton

Update NEWS and ChangeLog files


45b0bb5aff Alexander Barton

Remove Anope "ngircd" protocol module patches

Starting with Anope 1.9.8, the ngIRCd protocol module is included in the Anope distribution, so there's no longer any need to support our own (but now heavily outdated!) patches. Therefore remove them.


c7db2f8429 Alexander Barton

doc/Services.txt: Update documentation for Anope 1.9.8

Starting with Anope 1.9.8, the ngIRCd protocol module is rewritten from scratch by "DukePyrolator" and included in the Anope distribution. So no patching is required any more, yeah! Drawback: Anope 1.9.8 is in development and not yet released ...


f0b86e6c26 Alexander Barton

Correctly add irc-metadata.{c|h} to Makefile.ng ...


7871a904d7 Alexander Barton

doc/Protocol.txt: Document METADATA command


40e3daf560 Alexander Barton

Generate "METADATA host" commands on "MODE +/-x"

Use "METADATA host" commands to let servers supporting this command know which (possibly cloaked) hostname is in effect for a specific client. This prevents "double cloaking" of hostnames and even cloaked hostnames are in sync on all servers supporting "METADATA" now.


44b7ff02fd Alexander Barton

Don't cloak already cloaked hostname when using METADATA

A client for which a METADATA command has been received from one of its peers got the client flag "M" set. So it's safe to assume that such a client gets "METADATA host" commands for its cloaked hostname and the server must not cloak the hostname on its own, even when the client mode "+x" is set.


35ed57e6c1 Alexander Barton

Implement METADATA command to update client metadata

The METADATA command can be used by other servers to update "metadata" of registered clients, like the client info text ("real name"), user name, and hostname: :<prefix> METADATA <target> <key> :<value> It is distributed in the network, unknown <key> names are silently ignored and passed on, too. This allows for further extensions.


79731a57f3 Alexander Barton

doc/Protocol.txt: add/fix CHARCONV description


a7f37cebdc Alexander Barton

PredefChannelsOnly: Fix message for non pre-defined channels

If PredefChannelsOnly is enabled, and if someone tries to create a channel which does not exist, then the error message is a 474. The 474 Error message changed recently and does not match anymore: 'Cannot join channel (+b) -- You are banned'. Changed the error message to numeric 403 'No such channel'. Bug introduced by commit 9a82304a. (cherry picked from commit 2c2e08f34187a33c1da745995c5f213e33a91410)


47b99c69cc Alexander Barton

Test suite: add some "remote checks" to whois-test.e


757f3497bc Alexander Barton

Send NICK commands with prefix of (target) user

Now NICK commands are always generated using the prefix of the target user, even when the nickname change has been initiated by some other (pseudo) server or using the SVSNICK command. In this case, the prefix of the initiator has been used, but this isn't compatible with clients (at least weechat and irssi don't handle such NICK commands correctly).


f2455cbe33 Alexander Barton

Update doc/Services.txt, sort services alphabetically


e3f300d323 Alexander Barton

Implement SVSNICK command to change remote nicknames

The SVSNICK command allows other servers (and services on "pseudo-servers") to forcefully change nicknames of remote users. Syntax: ":<from> SVSNICK <oldnick> <newnick>" The SVSNICK command itself doesn't change the nickname, but it becomes forwarded to the server to which the user is connected to. And then this server initiates the real nickname changing using regular NICK commands. This allows to still run networks with old servers not supporting the SVSNICK command, because SVSNICK commands for nicknames on such servers are silently ignored and don't cause a desync of the network.


497edbaf3e Alexander Barton

IRC_NICK(): Code cleanup, new function Change_Nick()


48326e061a Alexander Barton

Spelling fix: "nick name" -> "nickname"


84e9dcbab0 Alexander Barton

Xcode: correctly #define PACKAGE and PACKAGE_NAME


30b32e84fe Alexander Barton

Fix warning message introduced when cleaning up IRC_SERVER()

This reverts a not intentional code change and fixes the following compiler warning message (tested with gcc 4.4.5): irc-server.c: In function "IRC_SERVER": irc-server.c:142: warning: suggest parentheses around operand of "!" or change "&" to "&&" or "!" to "~"


fb92493376 Alexander Barton

Make server reconnect time a little bit more random

Add randomly up to 15 seconds to the reconnect delay for outgoing server links when the connection has been "short" and therefore the "ConnectRetry" delay is being enforced. This should make it even more unlikely that two servers deadlock each other when both are trying to connect to the other one at the same time, for example in test environments.


eb4f9eac0c Alexander Barton

Don't accept connections for servers already beeing linked

If two servers try to link each other, there was a time frame that could result in one connection overwriting the other, e. g. the incoming connection overwriting the status of the outgoing one. And this could lead to all kind of weirdness (even crashes!) later on. So now such incoming connections are dropped. But this most probably prevents the two servers from linking until timing changes somehow (network latency?) because each server drops the incoming connection of the other one, so no connection survives in the end. But this has to be addressed by an other patch ...


d7b5dd1bbf Alexander Barton

IRC_SERVER(): Code cleanup


b18e81b631 Alexander Barton

Use lowercase "package name" for syslog logging again

This is how ngIRCd up to release 19.2 behaved; "bug" introduced by commit 67e882, "configure.in: require autoconf 2.67 and automake 1.11", which changed the "PACKAGE_NAME" to "ngIRCd"; so use "PACKAGE" which still is the lowercase version for initializing syslog logging.


8ff153d7d4 Alexander Barton

Document new configuration option "MaxListSize"



23572af942 Alexander Barton

Update NEWS and ChangeLog files


8d9cfa157a Alexander Barton

Allow remote servers and IRC Ops to change channel topics

Remote servers are always allowed to change all channel topics, and IRC Operators are allowed to change all channel topics if the configuration option "OperCanUseMode" is enabled. Bug introduced by commit 7b01bb8 and reported by DNS777.


58abd0777b Alexander Barton

Increased maximum number of possible user and channel modes

Currntly ngIRCd supports 13 user and 15 channel modes, because there have been quite a few additions since our last release. But our data structures can only hold 15 user and -- even worse! -- only 9 channel modes! So enlarge the buffers to 20 bytes (actually 21 including NULL) to allow storing of all mode characters and to have some space left for more modes to come ... (cherry picked from commit 8996d777621d88d4bcc439ab4792b2814920687f)


3ee98d9f72 Alexander Barton

Update error messages for user mode +b and channel Mode +M.

Replaced error message for channel mode +M with ERR_NEEDREGGEDNICK_MSG (used by Bahamut, inspircd, ircu & Unreal too) and using numeric 477 and the msg simliar like inspircd. Replaced the error message ERR_CANNOTSENDTONICK_MSG for user mode +b with ERR_NONONREG_MSG and using numeric 486, similar like unrealircd. (cherry picked from commit 55a61ab17f63a9e757b7c7598c31b98ce5a132e8 and commit 3737d9ab7da1ea0485cefc07c65dc5308bf0db02)


b1a5ade88f Alexander Barton

Test suite: add more checks to whois-test.e


73229249d8 Alexander Barton

Add "i586/pc/haiku" to doc/Platforms.txt


e0da56fc7b Alexander Barton

Disable UID/GID checks on "single user OS"

Don't abort on "single user operating systems" that don't know more than one user account and therefore can't change user and group IDs. Currently, the only such system supported by ngIRCd is Haiku, a BeOS clone.


cdaaae0cb2 Alexander Barton

Search gethostbyname() in libbind and libnetwork

This is required for Haiku (BeOS clone) at least.


c319fb8eaa Alexander Barton

Update manual pages

Among other little things, bring project description in line with website.


538e612a47 Alexander Barton

Test suite: add test for user mode "b"


9d97004a28 Alexander Barton

Implement user mode "b": block messages

When a user has set mode "b", all private messages and notices to this user are blocked if they don't originate from a registered user, an IRC Op, server or service. The originator gets an error numeric sent back in this case, ERR_CANNOTSENDTONICK_MSG(976), which is/was(?) used by KineIRCd, too. This closes bug #144.


87deb43012 Alexander Barton

Fix ERR_CANNOTSENDTOCHAN_MSG message

This error message is not only used if one can not send to a channel because it is moderated, but for _all_ reasons when a message can not be delivered (moderated, banned, no external messages, ...), so strip the "(+m) -- Moderated" part of the error message again. Bug introduced by commit 9a82304a.


a9cbb375b7 Alexander Barton

Shorten filenames of Anope protocol module patchfiles

Filenames have been too long and couldn't be stored in all tar archive formats ...


161adbb1aa Alexander Barton

WHOIS: show RPL_WHOISHOST_MSG to all IRC Ops in the network

Not only show RPL_WHOISHOST_MSG to local IRC opreators, but show it to all IRC operators in the network. And don't show it to anybody if the "more privacy" configuration option is enabled. This closes bug #134.


de2fa78d92 Alexander Barton

Test suite: make expect scripts more verbose

Now tests.sh transforms each expect script it executes using sed(1) and inserts a 'puts -nonewline stderr "."' in front of each "expect" command.


8bede388af Alexander Barton

Test suite: remove indentation of messages


c9d166747d Alexander Barton

Merge branch 'bug141-ModesQq'

This closes bug #141. * bug141-ModesQq: KICK-protect IRC services Implement channel mode "Q" and user mode "q" Conflicts: src/ngircd/defines.h src/ngircd/messages.h


56cdc2175c Alexander Barton

Show active user modes in WHOIS reply

Implement numeric RPL_WHOISMODES_MSG(379) and show user modes in the reply of the WHOIS command for the user himself or, if MorePrivacy isn't set, for request initiated by an IRC operator. Numeric 379 is used by Unreal and InspIRCd for this purpose, too. Closes bug #129.


9ac94339dc Alexander Barton

KICK-protect IRC services


de453d71cb Alexander Barton

Implement channel mode 'V' (invite disallow)

If the new channel mode "V" is set, the INVITE command becomes invalid and all clients get the new ERR_NOINVITE_MSG(518) reply. Unreal and InspIRCd uses this mode, too. This closes bug #143.


d3ae351236 Alexander Barton

Implement channel mode "Q" and user mode "q"

Both modes protect users from channel kicks: only IRC operators and servers can kick users having mode "q" or in channels with mode "Q". Original patch by DNS777 <dns@rbose.org>, thanks! This closes bug #141.


23b07bdf50 Alexander Barton

Allow channel admins to "de-admin" channel members

This patch fixes unsetting of channel user mode "+a" (channel admin) and adds a better error message: without this patch, a channel admin is unable to unset this mode. This closes bug #142.


4790d78c98 Alexander Barton

Define HAVE_SETSID for Mac OS X Xcode builds


46b0eef721 Alexander Barton

Merge branch 'bug109-CHARCONV'

This closes bug #109. * bug109-CHARCONV: Debian: require "telnet" or "telnet-ssl" for building Debian ngircd-full[-dbg]: enable CHARCONV Add "CHARCONV" to "feature string" when enabled Implement new IRC+ "CHARCONV" command Added new configure option "--with-iconv" Conflicts: src/ngircd/messages.h


c66e20ce6e Alexander Barton

Fix spelling: ERR_CHANOPPRIVTOLOW_MSG -> ERR_CHANOPPRIVTOOLOW_MSG

Thanks to DNS for pointing this out, see bug #126!


343a90dc37 Alexander Barton

Debian: require "telnet" or "telnet-ssl" for building


114644cdb0 Alexander Barton

Makefile.am: don't use "make -C", it isn't portable


09ab0704f4 Alexander Barton

Debian ngircd-full[-dbg]: enable CHARCONV


cf9f9e1f30 Alexander Barton

Test suite: don't use "mkdir -p"

"mkdir -p" is not supported on all platforms. Tested with Apple A/UX 3.1.x.


19ce256a95 Alexander Barton

ERR_CHANNELISFULL_MSG: better wording

(cherry picked from commit 0fcfa7e00fa8e098dd3724c7188c88ac82a52881)


e9d0b2f039 Alexander Barton

Add "CHARCONV" to "feature string" when enabled


eba53f652c Alexander Barton

Fix getpid.sh to work on Apple A/UX again


222ecbffbb Alexander Barton

Implement new IRC+ "CHARCONV" command

See bug 109 and doc/Protocol.txt for details and documentation.


d8ee498a65 Alexander Barton

Send RPL_REHASHING if rehash was accepted

(cherry picked from commit f1b171a09cd076f743a7fff221fa7aa752abb374)


ce736fc15b Alexander Barton

Added new configure option "--with-iconv"

The iconv library should be used for implementing the new CHARCONV IRC command discussed in bug 109. And because CHARCONV will be an IRC+ feature, we only test for libiconv if IRC+ is enabled as well.


e3a1a61868 Alexander Barton

Change variable name "SSLDHFile" to "DHFile" in log messages

(cherry picked from commit d96db0a2e56d310177edb45d0a8b164a37992ab1)


1413a4886f Alexander Barton

Sort "feature string" alphabetically


1a2bdd9e4c Alexander Barton

Move ConnSSL_InitLibrary() "dummy" from header into C file

(cherry picked from commit 5fd88c81a70d0c9e627f08522e57d251586288eb)


cfec819f0d Alexander Barton

Include CAP command even when using "strict RFC mode"


384f965fba Alexander Barton

NJOIN: correctly reset channel level flags

This fixes commit 7b01bb83. Bug reported by DNS777 <dns@rbose.org>, thanks!


107bfdc821 Alexander Barton

Merge branch 'autoconf-update'

Update GNU autoconf and automake infrastructure. Tested on modern systems as well as Apple A/UX :-) * autoconf-update: AUTOMAKE_OPTIONS: fix ansi2knr option, include path Don't use AC_FUNC_MALLOC and AC_FUNC_REALLOC Make our own targets "silent", if enabled configure.in: use AC_CHECK_{FUNCS|HEADERS}_ONCE Updated config.{guess|sub} to version 2012-08-14 Make autogen.sh more verbose when VERBOSE=1 is set configure.in: use AC_SEARCH_LIBS (not AC_CHECK_LIB) configure.in: use AS_HELP_STRING macro configure.in: use AC_CANONICAL_HOST (not AC_CANONICAL_TARGET) configure.in: inttypes.h is an optional header file Use HAVE_SETSID #define when testing for setsid() Don't include <stdint.h>, it is included by "portab.h" Don't check type.h availability, it is required configure.in: Use AC_CONFIG_FILES macro configure.in: Don't use AC_C_PROTOTYPES configure.in: Update checks for required and optional features configure.in: require autoconf 2.67 and automake 1.11 configure.in: sort some lists (templates, output, ...)


005340c83f Alexander Barton

Simplify check for valid user names in IRC_USER().

Patches from Federico G. Schwindt, thanks! (cherry picked from commit a44b7126227ba1118ec02b399e31b08102af5e8c and 6fbe9583753b2620da275676cde46a89cb4d06c2)


5c160921ff Alexander Barton

AUTOMAKE_OPTIONS: fix ansi2knr option, include path

Set correct relative path to ansi2knr.c in AUTOMAKE_OPTIONS, so that ansi2knr.{1|c} is only included once in the distribution archive.



d21afce2b6 Alexander Barton

Allow user mode +x only when "CloakHostModeX" is set

Allow users to "cloak" their hostname only when the configuration variable "CloakHostModeX" (introduced in 19.2) is set. Otherwise, only IRC opertators, other servers, and services are allowed to 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 ;-) This fixes bug #133.


fe3bef55b7 Alexander Barton

Don't use AC_FUNC_MALLOC and AC_FUNC_REALLOC

We don't expect the GNU'ish behaviour of of malloc() and realloc() and never implemented the replacement functions rpl_malloc()/rpl_realloc() -- so these test result in linking failues on systems that don't have a GNU'ish malloc() and realloc() even though we don't require it! Introduced by commit 47ad9afc.


a072180c92 Alexander Barton

Merge pull request #2 from briancollins/master

Fix IRC_Send_NAMES not sending correct prefix for certain clients.


808c291c76 Alexander Barton

New configuration option "OperChanPAutoOp"

If disabled, IRC operators don't become channel operators in persistent channels when joining. Enabled by default, which has been the behavior of ngIRCd up to this patch. Closes bug #135. (Cosmetic fixes by Alex.)


5300f0082c Alexander Barton

Make our own targets "silent", if enabled


0fd9a8505a Alexander Barton

Correctly re-initialize signal handlers on RESTART

This fixes part 2 of bug #127 :-)


16f94546f5 Brian Collins

Fix NAMES response when client has multi-prefix

Two fixes here: IRC_Send_NAMES was checking the capability of the wrong client when responding, and it didn't return any prefix for clients that had either +v or +o but not both.


62a07596d6 Alexander Barton

Allow opers to see secret (+s) channels in LIST command

As long as 'MorePrivacy' isn't enabled in the configuration file, local IRC operators can see secret (+s) channels when using the LIST command. Closes bug #136.


005ffeaa8c Alexander Barton

configure.in: use AC_CHECK_{FUNCS|HEADERS}_ONCE


f5441d2170 Alexander Barton

New_Connection(): mark "IsSSL" parameter as UNUSED

This fixes the following warning message when building without SSL support: conn.c: In function "New_Connection": conn.c:1365: warning: unused parameter "IsSSL" Introduced by commit 01b62202.


55859c1bef Alexander Barton

Merge branch 'better-chan-errors'

By Alexander Barton (1) and DNS777 (1) * better-chan-errors: Remove unused ERR_CANNOTSENDTOCHAN2_MSG message Add some more information to channel error numerics


b730b64bbe Alexander Barton

configure: only use AM_PROG_AR when available

This fixes commit 78d189fb on systems with older automake ...


5c8c6d3c70 Alexander Barton

Updated config.{guess|sub} to version 2012-08-14


f38a9035e5 Alexander Barton

Show a warning on startup if config file is not a full path

ngIRCd is a long-running process and changes its working directory to "/" to not block mounted filesystems and the like when running as daemon ("not in the foreground"); therefore the path to the configuration file must be relative to "/" (or the chroot() directory), which basically is "not relative", to ensure that "kill -HUP" and the "REHASH" command work as expected later on. This fixes parts of bug #127.


bcefdef1ea Alexander Barton

Merge branch 'move-connection-password' of git://arthur.barton.de/ngircd-alex

This patch series converts the statically allocated password buffer in the CLIENT structure into a dynamically (and only when needed) allocated buffer which is referenced by the CONNECTION structure. This a) saves memory for clients not using passwords at all and b) allows for "arbitrarily" long passwords. By Brett Smith (5) and Alexander Barton (2). * 'move-connection-password' of git://arthur.barton.de/ngircd-alex: Login_User(): use "conn" insted of calling Client_Conn(Client) Free already saved password when storing a new one Indentation and style fixes. Connection password is not constant. Implementation clean-ups. Dynamically allocate memory for connection password. Move client password from the Client to the Connection struct.


a5984c702a Alexander Barton

Remove unused ERR_CANNOTSENDTOCHAN2_MSG message


3e22fc32f3 Alexander Barton

Remove all geneerated Makefile.am on "make maintainer-clean"


7eb3932d3a Alexander Barton

Make autogen.sh more verbose when VERBOSE=1 is set


a12d6ff257 Alexander Barton

Create &SERVER channel after predefined channels

This patch allows you to define &SERVER in a [Channel] block yourself and to overwrite the built-in topic and channel modes. Fixes bug #131.



9a82304ae9 Alexander Barton

Add some more information to channel error numerics


360a254be0 Alexander Barton

Enhance "ServiceMask" to handle a list of masks

The "ServiceMask" variable in "Server" blocks now can handle more than one mask using the new MatchCaseInsensitiveList() function. This makes marking "service clients" much more specific, which is a good thing per se, but which is the prerequisite for reasonably blocking these nick names, too (see commit a6dd2e3 for details).


e65a35e964 Alexander Barton

Rename configure.in to configure.ac

This fixes automake: warning: autoconf input should be named 'configure.ac', not 'configure.in' when running the autogen.sh script.


ebf2f991b5 Alexander Barton

configure.in: use AC_SEARCH_LIBS (not AC_CHECK_LIB)

Use the AC_SEARCH_LIBS macro to test for "sometimes but not always" required libraries, not AC_CHECK_LIB.


2205227c3b Alexander Barton

WHO #channel: don't limit list size

It makes no sense to limit the list size when doing WHO for a channel and not to return all the users in that channel, so I removed the check. But if there are more than MAX_RPL_WHO(25) replies, the client requesting the list will be "penalized" one second more (then 2 in total). This fixes bug #125.


1680ea02da Alexander Barton

Free already saved password when storing a new one

This shouldn't happen (clients aren't allowed to send more than one PASS command), but who knows ...



78d189fbf7 Alexander Barton

configure.ng: use AM_PROG_AR to check ar(1) command

This fixes automake-1.12/am/library.am: warning: 'libngipaddr.a': linking libraries using a non-POSIX .../automake-1.12/am/library.am: archiver requires 'AM_PROG_AR' in 'configure.in' src/ipaddr/Makefile.am:12: while processing library 'libngipaddr.a' and similar warnings of automake.


a451cb22f1 Alexander Barton

configure.in: use AS_HELP_STRING macro


d2d867ea36 Alexander Barton

Define EV_SET() for kqueue() on systems that don't have it

Some systems, notably FreeBSD 4.x, do have the kqueue() function but lack the definition of EV_SET() in their header files -- but don't worry, we can #define it on our own ;-) Definition taken from /usr/include/sys/event.h of FreeBSD 8.1. Patch tested on FreeBSD 4.1 by Götz Hoffart. Thanks!


a6dd2e33c2 Alexander Barton

Block nicknames that are reserved for services

This patch introduces the new function Conf_NickIsBlocked() which checks if a given nick name matches with the "service mask" of a configured server. And Client_CheckNick() uses this information to deny such names for regular IRC users. So nick names intended for IRC services are more protected and can't be used by regular users even when the "services pseudo-server" isn't connected to the network. But please note: Up to now, there can be only one "ServiceMask" pattern per server, which most probably blocks much more nick names than really required ... So "ServiceMask" should allow more than one pattern which can be more specific, and most probably it should be possible to block nick names in the global server configuration as well. Nick names introduced by other servers/services are never restricted.


be97fa8ab1 Brett Smith

Indentation and style fixes.


8cfb910441 Alexander Barton

Merge branch 'automake-am11-am12'

* automake-am11-am12: autogen.sh: detect automake version format a.b.c and a.b configure.ng: don't require GIT tree to detect version string Include .mailmap file in distribution archives Include all build-system files into distribution archives Change build system to support new and old GNU automake


82bf4eb059 Alexander Barton

configure.in: use AC_CANONICAL_HOST (not AC_CANONICAL_TARGET)

See the autoconf manual for details: http://www.gnu.org/software/autoconf/manual/autoconf.html#Specifying-Target-Triplets


b232ae2f17 Alexander Barton

Fix contrib/Makefile.am to list all files in EXTRA_DIST


9d8974d509 Alexander Barton

Rename Conf_IsService() to Conf_NickIsService()


164954a788 Brett Smith

Connection password is not constant.

Saying otherwise makes a warning when we assign this to conv.appdata_ptr in pam.c.


039a939cb8 Alexander Barton

autogen.sh: detect automake version format a.b.c and a.b


a3f3a1097b Alexander Barton

INSTALL: update GNU automake/autoconf requirements


d53d58fff2 Alexander Barton

configure.in: inttypes.h is an optional header file


53b2acc00b Alexander Barton

Update project description


037b4b76df Alexander Barton

Check_Connections(): code cleanup


c1d7f6216f Brett Smith

Implementation clean-ups.

* Have Conn_Password return an empty string when no password has been set, to play better with pam.c. * Use strdup in Conn_SetPassword.


d7d5f4330b Alexander Barton

configure.ng: don't require GIT tree to detect version string


d4df626d88 Alexander Barton

automake: don't use INCLUDES, it's AM_CPPFLAGS nowadays


b2482b39e4 Alexander Barton

Use HAVE_SETSID #define when testing for setsid()


01b62202b2 Alexander Barton

New function Conn_StartLogin() to finish connection initialization

Conn_StartLogin() is called after the connection has been established and fully innitialized, including the SSL handshake, for example. Up to this patch, the "NoticeAuth" option broke the SSL handshake ...


7df4c12da9 Brett Smith

Dynamically allocate memory for connection password.


4b0f526006 Alexander Barton

Xcode: use certificate of Alex for code signing

When doing non-debug Xcode builds, use the "Developer ID Application: Alexander Barton" certificate for code signing by default.


79c1222896 Alexander Barton

Include .mailmap file in distribution archives


eed8a4ee6e Alexander Barton

automake: enable colored test output, if available

The "color-tests" option can't be checked for, but is available starting with automake 1.11 which introduced AM_SILENT_RULES -- so we check this ...


74c7d7131f Alexander Barton

Don't include <stdint.h>, it is included by "portab.h"


b68bb560e9 Alexander Barton

Convert CONN_ID and Conf_MaxConnections to "int" datatype

We can't handle more connections than accept(2) can supply, and accept(2) returns an "int" ...


0d5de60584 Brett Smith

Move client password from the Client to the Connection struct.

This is a relatively naive implementation, basically doing the bare minimum necessary to make the switchover go. Subsequent commits can focus on improving the implementation.


4cf65b973c Alexander Barton

"make uninstall": remove ngircd.conf if not modified

Now "make uninstall" removes the installed "ngircd.conf" file, if it is still equal to our "sample-ngircd.conf" file and therefore hasn't been modified by the user. If it has been modified, it isn't removed and a notice is displayed to the user. In addition, "make install" now displays a message when no ngircd.conf file exists and the "sample-ngircd.conf" file will be installed as a starting point.


b1b83831d1 Alexander Barton

Add doc/Contributing.txt to distribution archive


8e1beae4e7 Alexander Barton

Include all build-system files into distribution archives


4dd1c31dc7 Alexander Barton

Don't check type.h availability, it is required


21467c76f1 Alexander Barton

Introduce numeric RPL_HOSTHIDDEN_MSG(396)

This numeric is sent to the client each time it changes its displayed hostname using "MODE +/-x", and if "CloakHost" is set right after the MOTD has been sent.


160f728530 Alexander Barton

contrib/ngircd.service: systemd service file for ngircd

Thanks to Kyle Keen <keenerd@gmail.com>: Date: Sat, 18 Aug 2012 08:28:22 -0400 Message-ID: <CAAKTTKNNmrB=8XtxcV6w1Q-RQ6J_xTTDGD4MHQFaDy6V3=B19Q@mail.gmail.com> From: keenerd <keenerd@gmail.com> To: ngircd-ml@ngircd.barton.de Subject: [ngIRCd-ML] systemd service Hello all. Linked is a service file for ngircd. Please add this to your source tree so other people don't have to learn to write service files ;-) https://projects.archlinux.org/svntogit/community.git/plain/trunk/ngircd.service?h=packages/ngircd -Kyle Keen Arch Linux TU http://kmkeen.com


baed0618ed Alexander Barton

Loose GNU autoconf / automake requirements a bit

Now ngIRCd requires at least GNU autoconf 2.61 and automake 1.10, the requirements of commit 67e882d4 have been too restrictive: 19.2 67e882d4 now ---------- --------- --------- --------- autoconf >=2.50 >=2.67 >=2.61 automake >=1.6 >=1.11 >=1.10 The tools required now are supported by Debian GNU/Linux 4.0 "Etch", RedHat Enterprise Linux 5, and Mac OS X 10.6.x for example. I read the changelogs of autoconf and automake, and I think ther's nothing that prevents it from working with these older versions; and we don't want to force users to upgrade without real benefits. Please note: the recommended versions are still autoconf 1.11.x and the most recent autoconf release that works with automake 1.11.x!


192e304b94 Alexander Barton

Change build system to support new and old GNU automake

Starting with GNU automake 1.12, the "de-ANSI-fication support" has been removed, which ngIRCd used to enable building itself on very old systems. Now the problem is, that using automake >= 1.12 isn't working because of the now unsupported M4 macros. Therefore the solution that this patch implements is to dynamically generate the automake input files with our own ./autogen.sh script: configure.ng => configure.in Makefile.ng => Makefile.am This is quite an ugly approach, but it works and enables us to: 1. use current automake >= 1.12 for development and "private builds", 2. still build distribution archives using automake 1.11.x that have "de-ANSI-fication support" enabled in the generated Makefile's. And if you are using Makefile's generated with a automake version newer than 1.11.x (without "de-ANSI-fication support"), the ./configure script warns you not to use this generated build system to generate distribution archives. Drawback of this patch: you MUST use our autogen.sh script, you can't call the autoconf/automake commands directly any more; but autoreconf should still work ...


2e13e821f8 Alexander Barton

configure.in: Use AC_CONFIG_FILES macro


33fae67579 Alexander Barton

Always cloak client hostname, if needed

Not only cloak the hostname in Client_MaskCloaked(), but also in Client_HostnameCloaked() -- so move the actual cloaking to this function and call it in Client_MaskCloaked() to get the (cloaked) hostname. This fixes USERHOST not displaying the correctly cloaked hostname, for example.


922540306e Alexander Barton

ngt_RandomStr(): Add implicit cast to "unsigned".

This fixes the following warning of Xcode 4.5: src/tool/tool.c:150:19: Implicit conversion loses integer precision: 'long' to 'unsigned int'


e3e181f4b3 Alexander Barton

Merge branch 'bug92-xop'

By Alexander Barton (5) and Sebastian Köhler (2) * bug92-xop: Fix NAMES/WHO response when client has multi-prefix Fix prefix of "halfop" when "multi-prefix" is active Clean up doc/.gitignore doc/Modes.txt: add version number to new channel modes Fix some "whitespace glitches" Tests and documentation for xop Implemented xop support Conflicts (because of "multi-prefix fix"): src/ngircd/irc-info.c This fixes bug #92 "ngircd does not support XOP usermodes".


2478c5816b Alexander Barton

configure.in: Don't use AC_C_PROTOTYPES

Don't use AC_C_PROTOTYPES, AM_C_PROTOTYPES is already used.


864015fa3f Alexander Barton

NoticeAuth: make sure messages are flushed immediately


d48e440a72 Alexander Barton

Fix a buffer overflow when initializing the random salt for "+x"

This "off by one" buffer overflow has been introduced in commit 49385a98, "Implemented hashed cloaked hostnames for +x".


1f2aa4da6f Alexander Barton

Fix NAMES/WHO response when client has multi-prefix

This has been fixed by commit 16f94546 "Fix NAMES response when client has multi-prefix" in the master branch, fix it in this patch series, too.


ef82ef4ddb Alexander Barton

Free all listen ports on initialization

Now you can reconfigure listen ports and reload the server configuration on runtime. Without this patch, no ports could be removed.


47ad9afcf3 Alexander Barton

configure.in: Update checks for required and optional features

Update checks for required and optional header files, data types, and functions.


1d3def0cc6 Alexander Barton

Merge branch 'umode-B'

This patch series allows ngIRCd to support the user mode "B" ("Bot flasg"): it is settable and unsettable by every (non-restricted) client. According to DNS777, this is how Unreal and InspIRCd do behave, so do we :-) By Alexander Barton (1) and DNS777 (1) * umode-B: Add new user mode "B" to doc/Modes.txt Implement an Unreal-like user mode "B" ("Bot mode")


0709a0f050 Alexander Barton

configure.in: Use AC_CONFIG_HEADER instead of AM_CONFIG_HEADER

AM_CONFIG_HEADER is marked obsolete and will be removed in Automake 1.13.


fc39146f48 Alexander Barton

Fix prefix of "halfop" when "multi-prefix" is active


bb20aeb9bc Alexander Barton

Initialize SSL when needed only, and disable SSL on errors

With this patch, the SSL subsystem will only be initialized if at least one SSL ports is configured; so you won't get "SSL initialization failed" messages if you didn't configured it at all. And if SSL initialization fails, no SSL listen ports will be enabled later which never could establish a working SSL connection at all ...


67e882d4bb Alexander Barton

configure.in: require autoconf 2.67 and automake 1.11

And use newer features such as bug reporting address and project URL.


e01e8f1cb6 Alexander Barton

Merge branch 'recognize-umode-R'

By Alexander Barton (1) and DNS777 (1) * recognize-umode-R: Only allow IRC services to modify user mode "R" Recognize user mode "R"


a26e37b746 Alexander Barton

Add new user mode "B" to doc/Modes.txt


cfd0bddc30 Alexander Barton

Fix compiler warning when not building with ZLIB support

This fixes: irc.c: In function ‘Option_String’: irc.c:333:9: error: variable ‘options’ set but not used


1744a8d145 Alexander Barton

Clean up doc/.gitignore


25c216cbdf Alexander Barton

configure.in: sort some lists (templates, output, ...)


186ab51137 Alexander Barton

Only allow IRC services to modify user mode "R"



c2b39fdede Alexander Barton

Implement an Unreal-like user mode "B" ("Bot mode")


b53b12aa5f Alexander Barton

Update NEWS and ChangeLog files for hashed cloaked hostnames


b12acddf4f Alexander Barton

doc/Modes.txt: add version number to new channel modes


298cd9a327 Alexander Barton

Get_CAP_String(): make it buildable with pre-ANSI C compilers


8349a1c0d9 Alexander Barton

Recognize user mode "R"

This allows users to unset the user mode "R".


d0bb185cf5 Sebastian Köhler

Hashed hostnames for CloakHost

Implemented support for hashed hostnames for CloakHost. The admin can use '%x' in both the CloakHost and CloakHostModeX setting. The config option CloakHostModeX was renamed to CloakHostSalt. This salt is used for both cloaking options.


0d67be3f30 Alexander Barton

Fix some "whitespace glitches"

Some have been introduced by commit 7b01bb83, some are older.


414bfe65eb Alexander Barton

Enhance "NOTICE AUTH": show hostname and IDENT reply


49385a98b2 Sebastian Köhler

Implemented hashed cloaked hostnames for +x

CloakHostModeX can now contain '%x'. It will be replace by the hash of the original client hostname. The new config option CloakHostModeXSalt defines the salt for the hash function. When CloakHostModeXSalt is not set a random salt will be generated after each server restart. Spelling fix in defines.h


f37600ee01 Alexander Barton

Merge branch 'xop' of https://github.com/kart0ffelsack/ngircd into bug92-xop

* 'xop' of https://github.com/kart0ffelsack/ngircd: Tests and documentation for xop Implemented xop support Conflicts (because of merge of the 'cmode-M' branch): src/ngircd/channel.c src/ngircd/defines.h src/ngircd/messages.h


c519ba9920 Alexander Barton

Merge branch 'cmode-M'

By Alexander Barton (2) and DNS777 (1) * cmode-M: Add new channel mode "M" to doc/Modes.txt Remove Can_Send_To_Channel_Identified() Implement channel mode "M"


b9e6cb3e55 Alexander Barton

ngIRCd release 19.2 (tags/rel-19.2)


fee8ff37b3 Alexander Barton

Add new channel mode "M" to doc/Modes.txt


097c72aa65 Sebastian Köhler

Tests and documentation for xop


dffe5a9d60 Alexander Barton

doc/Capabilities.txt: document "multi-prefix" capability


fee591b759 Alexander Barton

Remove Can_Send_To_Channel_Identified()

Move the functionality directly into Can_Send_To_Channel() function. There should be no functional change ...


7b01bb833f Sebastian Köhler

Implemented xop support

3 new channel user modes have been added. Half Op: +h(Prefix: %) can set the channel modes +imntvIbek and kick all +v and normal users. Admin: +a(Prefix: &) can set channel modes +imntvIbekoRsz and kick all +o, +h, +v and normal users. Owner: +q(Prefix: ~) can set channel modes +imntvIbekoRsz and kick all +a, +o, +h, +v and normal users


d7eb343ea0 Alexander Barton

ngIRCd release 19.2~rc1 (tags/rel-19.2-rc1)


1aaf54ac24 Alexander Barton

Implement channel mode "M"

Only the server, identified users and IRC operators are able to talk.


bf5610a3b9 Alexander Barton

Merge branch 'bug124-CloakHostModeX'

* bug124-CloakHostModeX: Describe "CloakHostModeX" in sample-ngircd.conf an ngircd.conf(5) Rename "CloakModeHost" option to "CloakHostModeX" Introduce new configuration option "CloakModeHost" This closes bug #124.


7bce6780ca Alexander Barton

Update ChangeLog and NEWS files



7b6b492bdd Alexander Barton

Rename "CloakModeHost" option to "CloakHostModeX"


684e50f0a4 Alexander Barton

Correctly handle asynchronously re-established server links

Don't try to establish an outgoing server link after DNS lookup when this server re-connected on its own in the meantime. In addition, log a warning message if we try to update the connection index of an already connected server structure -- and ignore it. Up to now, both behaviour could lead to a race when the remote server connects to this daemon while it still prepares the outgoing connection: - The local server prepares the new outgoing connection ... - in the meantime the remote server becomes connected and registered. - Now the new outgoing connection overwrites the (correct) socket handle, - then the 2nd connection becomes disconnected: "already registered", - and the 1st connection becomes unhandled ("gets lost") because the configuration structure is reset because of the wrong socket handle. This patch hopefully fixes all these problems.


aa7db2c0e9 Alexander Barton

Introduce new configuration option "CloakModeHost"

This closes bug #124.


4a90959cb5 Alexander Barton

Log a debug message when SIGUSR2 is handled


9b1cf420f1 Alexander Barton

doc/Platforms.txt: more updates

Added: - armv6l/unkn./linux-gnueabi, gcc 4.4.5 - i686/pc/linux-gnu, gcc 2.7.2 Updated: - i386/pc/solaris2.11, gcc 4.2.3 Thanks to Götz Hoffart!


e7e47e77a3 Alexander Barton

NoticeAuth: Fix test if IDENT reply has been invalid

This fixes conn.c: In function ‘cb_Read_Resolver_Result’: conn.c:2252: warning: comparison between pointer and integer


695df6532e Alexander Barton

IDENT reply: only allow alphanumeric characters in user name

Only alphanumeric characters are allowed in the user name, so ignore all IDENT replies that would violate this rule and use the one supplied by the USER command.


6680b536c4 Alexander Barton

USER command: only allow alphanumeric characters in user name

Only alphanumeric characters are allowed in the user name, so terminate the connection if any "strage" characters have been supplied by the user. This is how other IRC daemons (like ircd2.11 and ircd-seven) behave ...


a21a7d8b66 Alexander Barton

doc/Platforms.txt: add powerpc/apple/darwin7.9.0


c0d059cd0e Alexander Barton

Change wording of "TLS initialized" message

Don't use the word "socket" to identify the connection number, but use the word "connection" like on all the other messages logged.


7faa3ed7d6 Alexander Barton

Pidfile_Create(): Don't leak file descriptor on error path

Detected by cppcheck: [src/ngircd/ngircd.c:502]: (error) Resource leak: pidfd


c9b152fa41 Alexander Barton

INSTALL: Add "satisfy prerequisites" section

Include information for RedHat/Fedora and Debian/Ubuntu based Linux distributions.


ae27571414 Alexander Barton

NEWS, ChangeLog: fixed some misspellings


5e5377a063 Alexander Barton

Numeric 005 (ISUPPORT), CHANMODES: add missing mode "r"


884c5bcff1 Alexander Barton

doc/Platforms.txt: add "armv7l/unknown/linux-gnueabi"


3a2fcc32cd Alexander Barton

Add instructions for setting up Atheme.


a8aa8c6cbc Alexander Barton

irc-cap.c: mark arguments of Handle_CAP_ACK() as "unused"

This fixes irc-cap.c: In function ‘Handle_CAP_ACK’: irc-cap.c:163: warning: unused parameter ‘Client’ irc-cap.c:163: warning: unused parameter ‘Arg’


f01b09ce84 Alexander Barton

irc-login.c, login.c: add missing include of "string.h"

This fixes the following warnings with GCC 4.4.5 on Linux: irc-login.c: In function ‘IRC_PASS’: irc-login.c:92: warning: implicit declaration of function ‘strlen’ irc-login.c:92: warning: incompatible implicit declaration of built-in function ‘strlen’ irc-login.c:113: warning: incompatible implicit declaration of built-in function ‘strlen’ irc-login.c:129: warning: implicit declaration of function ‘strchr’ irc-login.c:129: warning: incompatible implicit declaration of built-in function ‘strchr’ irc-login.c:133: warning: implicit declaration of function ‘strcmp’ irc-login.c: In function ‘IRC_SERVICE’: irc-login.c:556: warning: incompatible implicit declaration of built-in function ‘strchr’ login.c: In function ‘Login_User’: login.c:131: warning: implicit declaration of function ‘strcmp’


2419a701d8 Alexander Barton

doc/Modes.txt: Document missing channel mode "e"


110be707c3 Alexander Barton

Merge branch 'master' of /srv/git/ngircd

* 'master' of /srv/git/ngircd: "multi-prefix" capability 2/2: adjust NAME and WHO handlers "multi-prefix" capability 1/2: implement complete CAP infrastructure IRC_Send_NAMES(): Code cleanup New function Client_CapSet() in addition to Client_Cap{Add|Del} "CAP REQ" starts capability negotiation and delays user registration Xcode: update project file for Xcode 4.3 Correctly handle "CAP END", new client type CLIENT_WAITCAPEND Implement core IRC capability handling and "CAP" command New "login" source file Introduce_Client() => Client_Introduce(), and move it to client.c


b2743af0ed Alexander Barton

contrib/platformtest.sh: support "CC=xxx MAKE=yyy ./platformtest.sh"

Now you can use contrib/platformtest.sh on platforms that require a "special" make (not "make") or compiler (not cc/gcc) binary.


76565022fb Alexander Barton

Merge branch 'capabilities'

* capabilities: "multi-prefix" capability 2/2: adjust NAME and WHO handlers "multi-prefix" capability 1/2: implement complete CAP infrastructure IRC_Send_NAMES(): Code cleanup New function Client_CapSet() in addition to Client_Cap{Add|Del} "CAP REQ" starts capability negotiation and delays user registration Correctly handle "CAP END", new client type CLIENT_WAITCAPEND Implement core IRC capability handling and "CAP" command New "login" source file Introduce_Client() => Client_Introduce(), and move it to client.c


4602cb9891 Alexander Barton

"multi-prefix" capability 2/2: adjust NAME and WHO handlers

The NAME and WHO commands now return multiple usermode prfixes when the "multi-prefix" capability is in effect for the requesting client. See <http://ircv3.atheme.org/extensions/multi-prefix-3.1>


359732af85 Alexander Barton

Xcode: update project file for Xcode 4.3

(No changes needed)


1dea0d91a0 Alexander Barton

platformtest.sh: Detect Open64 C compiler


1d7e99531a Alexander Barton

"multi-prefix" capability 1/2: implement complete CAP infrastructure

Now ngIRCd is able to handle "CAP LS", "CAP REQ", "CAP LIST", and "CAP CLEAR" commands. "multi-prefix" can be set/unset, but has no functionality - yet!


d67d077a71 Alexander Barton

Fix 8ec17063: "Lists_Add(): use size of destination when copying data"

Thanks to Florian Westphal for spotting my silliness ...


f0a9dbe3ad Alexander Barton

IRC_Send_NAMES(): Code cleanup


69be7a85a2 Alexander Barton

Xcode: correctly sort conn-ssl.{c|h} files in file list



8ec17063a6 Alexander Barton

Lists_Add(): use size of destination when copying data

This fixes the following warning of clang: /src/ngircd/lists.c:152:44: warning: size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination [-Wstrlcpy-strlcat-size] But it isn't a real problem, because the size of the source always is the same than the size of the destination ...


2327b17656 Alexander Barton

"CAP REQ" starts capability negotiation and delays user registration

New helper function Set_CAP_Negotiation().


67bd1bf34f Alexander Barton

Makefiles: list each source files on a separate line

Patches that add/remove source files become much nicer this way :-)


da4c1ebe81 Alexander Barton

Correctly handle "CAP END", new client type CLIENT_WAITCAPEND


9f3af061cf Alexander Barton

Add missing documentation files to Xcode project


bd3a7ccb15 Alexander Barton

Implement core IRC capability handling and "CAP" command

This patch implements the core functions to support "IRC Capabilities" and the IRC "CAP" command as used by other servers and specified here: <http://www.leeh.co.uk/draft-mitchell-irc-capabilities-02.html>. It enables ngIRCd to support the defined handshake, but it doesn't implement any capabilities, so "CAP LS" and "CAP LIST" always return the empty set and "CAP REQ ..." always fails with "CAP NAK".


88c3d4896a Alexander Barton

Don't ignore "permission denied" errors when enabling chroot

Up to now, ngIRCd silently ignored permission denied errors when trying to enable a chroot setup: only the "not running chrooted" message became logged later on. This patch lets ngIRCd exit with a fatal error when the chroot can't be enabled on startup -- this is the much safer bevahiour!


edfcc2f9d5 Alexander Barton

New "login" source file

Rename Hello_User[_PostAuth] to Login_User[_PostAuth] and move it to the new login.c; and move cb_Read_Auth_Result(), too. This will enable further code to easily call Login_User() when required.


7b6ef3bc8e Alexander Barton

FAQ: enhance description of chroot setup



fbaa751da8 Alexander Barton

ngIRCd Release 19.1 (tags/rel-19.1)


06b6327875 Alexander Barton

Update ChangeLog for upcoming ngIRCd 19.1 release


0d9740b9fa Alexander Barton

Fix gcc warning, initialize "list" variable to NULL

This fixes the following warning with gcc 4.6.3.: irc-mode.c: In function "Channel_Mode": irc-mode.c:947:26: error: "list" may be used uninitialized in this function irc-mode.c:884:25: error: "list" may be used uninitialized in this function (The variable has never been used uninitialized, so don't worry)


e9be3334d1 Alexander Barton

Fix manual page "hyphen-used-as-minus-sign" error (lintian)

Thanks to Christoph Biedl for reporting this!


0ae74ceaed Alexander Barton

Fix typo: Please not -> Please note

Thanks to Götz Hoffart!


17ffda1c8a Alexander Barton

Fix typo: recieved -> received

Thanks to Christoph Biedl.


0de11ead36 Alexander Barton

Update NEWS and ChangeLog files


9d486db460 Alexander Barton

Really include _all_ patches to build the Anope module


257fe922d2 Alexander Barton

getpid.sh: Fix testcase error for Debian using sbuild

When * building the ngircd Debian package (on Linux at least) and * using the sbuild build system, the command "ps -af" does not include the commands running inside the sbuild system. Therefore, start-server.sh will report a fail as getpid.sh cannot not find the ./T-ngircd1 just started although it's actually running. This results in a funny build log ... starting server 1 ... failure! FAIL: start-server1 running connect-test ... ok. PASS: connect-test The self-test of getpid.sh however will likely succeed as it's happy if it sees any process with "sh" somewhere in the name. Things go downhill from there. The confusing things are: * The alternative cowbuilder/pbuilder does not have this problem. * The alternative usage "ps ax" does fine. So, as a quick hack, the patch attached adds another switch to getpid.sh.


1068f88377 Alexander Barton

Don't log "ngIRCd hello message" two times

Start "regular" logging not until the configuration file has been read in and "SyslolgFacility" is set, and log all configuration errors using the generic "daemon" facility. So if there are no configuration errors, logging starts right after parsing the configuration and we log the configuration file used _after_ reading it. But this is no problem because every configuration error message includes the configuration file name as well. (The "double hello" has been introduced by commit 3641e5110952)


9e7360e5fa Alexander Barton

ngIRCd release 19 (tags/rel-19)


273d4bdd32 Alexander Barton

Merge branch 'master' of /srv/git/ngircd

* 'master' of /srv/git/ngircd: Update doc/Platforms.txt for ngIRCd 19 doc/README-Interix.txt: note that GNU make should be used


27d244dfae Alexander Barton

Update doc/Platforms.txt for ngIRCd 19


ef392e7d37 Alexander Barton

Update config.guess and config.sub to recent versions


a39a1a5273 Alexander Barton

doc/README-Interix.txt: note that GNU make should be used



5cbdcf4f0d Alexander Barton

Fix C syntax: duplicate ";;" should be ";"

Using gcc 2.7.2, this fixes: irc-channel.c: In function `join_allowed': irc-channel.c:86: parse error before `const'


3641e51109 Alexander Barton

Correctly re-open syslog logging after reading of configuration

Syslog logging has been initialized before reading the configuraton file, so ngIRCd always used the default facility and ignored the "SyslogFacility" configuration option. Thanks to Patrik Schindler for reporting this issue!


3f46e93ccc Alexander Barton

Logging: remove "Activating ..." info message


8e3c56e5b2 Alexander Barton

ngIRCd release 19~rc1 (tags/rel-19-rc1)



f7bdee5f13 Alexander Barton

Update NEWS and ChangeLog files


391aa8d1f7 Alexander Barton

Fix forwarding of LIST commands

Bug reported by Cahata, thanks!


89d99e2ff9 Alexander Barton

Update preliminary ngIRCd protocol module for Anope 1.9.6


c16133c5ee Alexander Barton

New_Connection(): don't set the client hostname twice

Setting the hostname twice doesn't do much harm a lot, but isn't elegant. And for IPv6 addresses, it isn't correct the first time (missing []) ...


4888984429 Alexander Barton

Client_SetHostname(): Code cleanup, more debug logging


44bb22d23e Florian Westphal

io: use define for number of possible events


c7dd5ea0ba Florian Westphal

io: remove outer do {} while loops for epoll/kqueue/devpoll backends

simplifies things a bit. io_dispatch() is called repeatedly from the main loop.


871760583c Alexander Barton

Enhance server command limits

This patch updates the limits for handling commands from a remote server: - "<user count> / 5 + <min>" using "<min>=10" during normal operation, - the above count multiplied with 5 while servers are syncing. The intention is to a) make the limit dependent of the number of users in the network (the more users, the more commands required to sync) and b) to significantly rise this limit while servers are joining the network to make the login and synchronization faster.


bc20f9ec10 Alexander Barton

Send a PING at the end of the server sync to detect it

At the end of sending all "state" to the remote server, a PING command is sent to request a PONG reply. Until then, no "regual" PING was sent, so Conn_LastPing(<connection>) is null and now becomes non-null in the PONG command handler. So the servers are still synchronizing when Conn_LastPing(<connection>) is 0, which could easily be tested.


5a200e1543 Alexander Barton

New function Conn_UpdatePing() to update the "ping timestamp"


d2df7396a8 Alexander Barton

Conn_UpdateIdle(): Code cleanup


3d27073d61 Alexander Barton

RPL_ISUPPORT_MSG(005): add "EXCEPTS=e INVEX=I"

Thanks to Cahata for the idea!


b6f19ea8fe Alexander Barton

Fix "MAXLIST=beI:50": the limit is the sum of all lists

"Modes which are specified in the same pair share the same maximum size", so "beI:50" means a total of 50 entries, regardless of the list. See <http://www.irc.org/tech_docs/draft-brocklesby-irc-isupport-03.txt>, thanks to Cahata for reporting this!


8c46067b34 Alexander Barton

Update NEWS and ChangeLog files


594fdd02aa Alexander Barton

New RPL_WHOISHOST_MSG(378): show hostname and IP address

The numeric RPL_WHOISHOST_MSG(378) returns the DNS hostname (if available) and the IP address of a client in the WHOIS reply. Only the user itself and local IRC operators get this numeric.



1537c79132 Alexander Barton

G/K-Lines: only add and delete valid IRC masks


e0c9931ad8 Alexander Barton

Check G/K-Lines before the client has been registered, too

This allows to use "*!<user>@<host>" or "*!*@<host>" masks to reject clients even before receiving PASS, NICK and USER commands and before forking authentication child processes which reduces resource usage.


eba95bb0d2 Alexander Barton

Streamline handling of connection rejects (bad password, G/K-line)

- Use Client_Reject(), get rid of Reject_Client(). - Refactor Class_IsMember() to Class_GetMemberReason(), - New function Class_HandleServerBans().


51a6a33056 Alexander Barton

New function Client_Reject() to reject clients on connect



9882e578e9 Alexander Barton

Update NEWS and ChangeLog files



f2fa1045e2 Alexander Barton

Implement channel exception list (mode 'e')

This allows a channel operator to define exception masks that allow users to join the channel even when a "ban" would match and prevent them from joining: the exception list (e) overrides the ban list (b).


33a165721b Alexander Barton

{Add|Del}_Ban_Invite > {Add_To|Del_From}_List(): more generic



39412d6486 Alexander Barton

PRIVMSG/NOTICE: handle nick!user@host masks case-insensitive

And enhance our test suite to check this a little bit better :-)


c1656256df Alexander Barton

PRIVMSG/NOTICE: don't stop list processing on invalid target

Process further targets, even if one has been a server ID: just skip this one with an error message and continue.


1f4711a547 Alexander Barton

Implement user mode 'C': require "same channel" to send message

If the target user of a PRIVMSG or NOTICE command has the user mode 'C' set, it is required that both sender and receiver are on the same channel. This prevents private flooding by completely unknown clients.



12c60a670e Alexander Barton

IRC_WHOIS_SendReply(): Code cleanup


2f7d0c0839 Alexander Barton

Limit channel invite and ban lists to 50 entries

- New function Lists_Count(). - New limit #define MAX_HNDL_CHANNEL_LISTS = 50. - New numeric #define ERR_LISTFULL_MSG(478). - Adjust numeric RPL_ISUPPORT2_MSG(005) accordingly ("MAXLIST")


1afbf71236 Alexander Barton

Make Send_ListChange() a little bit more generic


7ed08f01ef Alexander Barton

Remove unused prototype of Lists_AlreadyRegistered()

This prototype has been introduced by commit fa7bb279 in 2006, but as far as I can see, this function never existed ...


81cc5f82b5 Alexander Barton

Channel lists: Fix duplicate check and error messages

- Check correct list for duplicates when adding items. - Don't generate any messages when adding duplicates or removing non-existing items (this is how ircd-seven and ircu behave). - Code cleanup: Add_Ban_Invite(), Del_Ban_Invite().


78a3b4c7d6 Alexander Barton

Don't enforce MAX_HNDL_MODES_ARG on server and service links


39d630c00d Alexander Barton

Update documentation (fix some URL, update some info)


4fe6b42c53 Alexander Barton

Update NEWS and ChangeLog for next ngIRCd release once more


d4d8102fc9 Alexander Barton

Don't stop join handling on faulty channel, skip it (part #2)

Commit 565523cb allowed processing of further channel names given to the JOIN command when a single name was invalid. After this patch, the JOIN command handler continues to process channel name lists even after errors like "channel is full", "too many channels", and the like and generates appropriate error messages for all the channels given by the client.


77f68b4fd1 Alexander Barton

JOIN command: don't check channel limit if already member

Don't check the channel limit and don't report "too many channels" when trying to join a channel that the client is already a member of.


2f8877ded4 Alexander Barton

Return ERR_UNKNOWNMODE(472) for unknown channel modes

The daemon reported ERR_UMODEUNKNOWNFLAG(501), which is wrong.


4bff3daf92 Alexander Barton

Numberic 005 (ISUPPORT), CHANMODES: add "O", "R", "z" modes


c5beca8aab Alexander Barton

Limit list replies of LIST, WHO, WHOIS, and MAX_RPL_WHOWAS

Introduce new #define's MAX_RPL_LIST(100), MAX_RPL_WHO(25), MAX_RPL_WHOIS(10), and MAX_RPL_WHOWAS(25).


f8405b1a4f Alexander Barton

New function IRC_CheckListTooBig() to check size of list replies

It the limit is reached, a NOTICE is sent to the client and list processing should stop.


fdfc27265e Alexander Barton

LIST command: compare pattern case insensitive


a4d1e6007f Alexander Barton

IRC_LIST(): Code cleanup


9260759cec Alexander Barton

DEFAULT_WHOWAS->DEF_RPL_WHOWAS; MAX_CMODES_ARG->MAX_HNDL_MODES_ARG

To streamline naming, in preparation for MAX_RPL_WHO and MAX_RPL_WHOWAS :-)


c2ac1ad3ba Alexander Barton

defines.h: Code cleanup and (a little bit) more documentation


470d2e2362 Alexander Barton

RPL_ISUPPORT (numeric 005): Report MODES=<MAX_CMODES_ARG>

"Maximum number of channel modes with parameter allowed per MODE command." See <http://www.irc.org/tech_docs/005.html> for details.


888664435a Alexander Barton

Channel modes: really break handling when MAX_CMODES_ARG is hit

This fixes 98493077.


98493077a2 Alexander Barton

channel modes: only handle MAX_CMODES_ARG modes with arguments

Limit the MODE command to handle a maximum of MAX_CMODES_ARG (5) channel modes that require an argument (+Ibkl) per call. Please note: Further modes that require arguments are silently ignored and end the handling of any further modes. This is similar to the behavior of ircd2.11 (silently ignores but seems to handle other modes) as well as ircd-seven (silently ignores but handles some(!) other modes) ...


1fa2af5b3a Alexander Barton

Fix handling of channel mode sequence with/without arguments

For example, don't generate wrong error messages when handling "MODE #chan +IIIIItn *!aa@b *!bb@c *!cc@d *!dd@e *!ee@f".


05cc9bf9b0 Alexander Barton

Conn_Write(): Make sure there is a client when detecting its type

The assert(client != NULL) got triggered during our tests, so there is an error path that resulted in the connection being still established (sock >= 0) but the client structure already freed. So Conn_Write() should handle it!


cc06e1ff89 Alexander Barton

Proc_Close(): Only close socket if it is still valid

It could be invalid when calling Proc_Close() a 2nd time, for exmaple, which could happen when we hit a timeout doing IDENT requests :-(


9fbf592924 Alexander Barton

WHOIS command: make sure matching is case-insensitive

And make sure that RPL_ENDOFWHOIS replies with the unmodified mask like it has been received from the client.


adf92302bf Alexander Barton

WHOIS command: don't anser queries for IRC servers

Thanks to Cahata for spotting this!


566a451299 Alexander Barton

WHOIS command: make sure the reply ends with RPL_ENDOFWHOIS

Up to now, each reply for itself ended in RPL_ENDOFWHOIS and queries for unknown nick names lacked the RPL_ENDOFWHOIS -- both is wrong.


e0f8ce093a Alexander Barton

README: update features list, borrow from list on our website


5e3449a241 Alexander Barton

LINKS command: support <mask> parameter

The <mask> can be used to limit the servers shown in the listing.


762b0325df Alexander Barton

IRC_LINKS(): Code cleanup; more documentation


6b62a5ec4f Alexander Barton

Add 1 second penalty for every further target on PRIVMSG/NOTICE

This reduces the possibility of flooding channels with commands like "PRIVMSG/NOTICE #a,#n,#c,... :message" a little bit. Problem noticed by Cahata -- thanks!


b24d645ca1 Alexander Barton

Conn_SetPenalty(): Add new "penalty time" on each function call

Until now, the penalty time has only been set when longer as the already set one, so it didn't accumulate. And add documentation for and clean up code in Conn_SetPenalty() and Conn_ResetPenalty() functions.


1bb2fbedcc Alexander Barton

Enhance log messages when setting user and group


3193d5477c Alexander Barton

NGIRCd_getNobodyID(): Code cleanup


edab86e0f8 Alexander Barton

Display correct error message when "Server{UID|GID}" is invalid

This partly closes bug #118. ngIRCd still starts up even when Server{UID|GID} is invalid: then the daemon falls back to "nobody" when running with root(0) privileges (as before).


e4006a93e3 Alexander Barton

NGIRCd_Init(): Code cleanup


9069380ddf Alexander Barton

main(): Code cleanup


ab188c1486 Alexander Barton

README: point to included COPYING file, not gnu.org


5eb9f2e717 Alexander Barton

Update Copyright notices for 2012


abfc5c6e27 Florian Westphal

lists: don't crash if reason ptr is NULL

commit 15fec92ed75c3de0b32c40d005e93e3f61aef77e (Update list item, if it already exists) can make ngircd crash because 'Reason' can be NULL, as reported by Cahata on the ngircd mailing list. Doesn't affect any released ngircd versions. Also, make sure that we do not pass NULL as arguments to a '%s' printf-like function.


565523cbb4 Alexander Barton

Don't stop join handling on faulty channel, skip it

When JOIN is received with more than one channel name, don't stop processing on the first error (e.g. bad name, wrong channel key, ...) but report an error and continue with the other given channel names. Reported by Cahata -- thanks!


013298d4c6 Alexander Barton

IRC_JOIN(): Code cleanup


af13732ec7 Alexander Barton

ISON command: reply with correct upper-/lowercase nick names

Reported by Cahata -- thanks!


408a74b865 Alexander Barton

IRC_ISON(): Code cleanup


f47904bf95 Alexander Barton

Remove unused "bool have_arg" from IRC_WHO()

This fixes: irc-info.c: In function ‘IRC_WHO’: irc-info:936:18: warning: variable ‘have_arg’ set but not used


70eb8219f5 Alexander Barton

Update NEWS and ChangeLog for next ngIRCd release


9e5b9ddad0 Alexander Barton

ngircd.conf.5: reword description of "Ports" variable


56b7e67307 Alexander Barton

New configuration option "PAMIsOptional"

When "PAMIsOptional" is set, clients not sending a password are still allowed to connect: they won't become "identified" and keep the "~" character prepended to their supplied user name.


b681aa5b9f Alexander Barton

PAM: don't use global password buffer for conv struct

Use the pointer of the password of the client directly. Eventually we can get rid of the global password again ...


b32f3b76e9 Alexander Barton

doc/Modes.txt: document channel mode "r"

And make clear, that user mode "r" and channel mode "r" are not set by ngIRCd itself but by IRC services.


1a5ed654b4 Alexander Barton

Fixed handling of WHO commands

This fixes two bugs: - "WHO <nick>" returned nothing at all if the user was "+i" (reported by Cahata, thanks). - "WHO <nick|nickmask>" returned channel names instead of "*" when the user was member of a (visible) channel. Clean up code and add documentation as well.


9cbb8f3bb8 Alexander Barton

Remove unused "time_t now" from Lists_Check()

This fixes: lists.c: In function ‘Lists_Check’: lists.c:330:9: warning: variable ‘now’ set but not used


e19ce437ca Alexander Barton

Fixed some spelling errors in documentation and code comments

Thanks to Christoph Biedl!


4e550bf9ef Alexander Barton

contrib/Debian/control: Update and complete "Build-Depends"


1d29a59f7e Alexander Barton

Update our Debian package descriptions with "official" ones

See Debian Bug #648241 for details.


765c2f26ea Alexander Barton

Fixed typo in two error messages

Thanks to Christoph Biedl!


69fa6f268a Alexander Barton

LUSERS reply: only count "visible" channels

Rename Channel_Count() to Channel_CountVisible() and only count channels that are visible to the requesting client, so the existence of secret channels is no longer revealed by using LUSERS. Reported by Cahata -- thanks!


43509fd22c Alexander Barton

IRC_Send_LUSERS(): Code cleanup


a71abfef4b Alexander Barton

Don't stop mode handling on unknown modes; skip it

Unknown user and channel modes no longer stop the mode parser, but are simply ignored. Therefore modes after the unknown one are now handled. This is how ircd2.10/ircd2.11/ircd-seven behave, at least. Reported by Cahata -- thanks!


8a8e8a3a23 Alexander Barton

IRC_xLINE(): output an error message for unexpected "lines"

This fixes: irc-oper.c: In function ‘IRC_xLINE’: irc-oper.c:429: warning: ‘class’ may be used uninitialized in this function irc-oper.c:430: warning: ‘class_c’ may be used uninitialized in this function


65befdafaa Alexander Barton

README: Update list of implemented commands


15fec92ed7 Alexander Barton

Update list item, if it already exists

This updates the "validity" (timeout) as well as the "reason" text, if given.


1e4a00f94f Alexander Barton

Lists_CheckDupeMask(): return pointer to already existing item

The old behavior of returning true/false is compatible to this change, so there are no other code changes required.


338758799d Alexander Barton

Log better error messages when rejecting clients


164e15b8c6 Alexander Barton

Synchronize G-Lines on server login



6ef20e0f9a Alexander Barton

Class_GetList() now retuns a pointer to list_head structure


e86e193e01 Alexander Barton

Check G-Line and K-Line lists after authenticating clients


ae5ebfb9f0 Alexander Barton

New functions Lists_Expire() and Class_Expire()

GLINE and KLINE lists are cleared automatically now, not when they are checked. So "STATS g" and "STATS k" no longer show expired entries :-)



e23f025dd6 Alexander Barton

Op_Check(): return client that initiated the request or NULL

The old behavior of returning true/false is compatible to this change, so there are no other code changes required.


3ca8703309 Alexander Barton

irc-oper.c: code cleanup; more documentation


fc82efc3e8 Alexander Barton

Implement IRC "STATS g" and "STATS k" command


dc9fcb0fb2 Alexander Barton

New function Class_GetList()


2b95c69ea1 Alexander Barton

lists.{c|h}: code cleanup; more documentation


af70c3dbc9 Alexander Barton

List and class handling: add optional "reason" text

Adjust Lists_Add() and Class_AddMask() accordingly, implement Lists_GetReason() and Lists_GetValidity().


1e054e0b82 Alexander Barton

Add new class.{c|h} module to Xcode project


06a20b87c4 Alexander Barton

Add new class.{c|h} to project

Implement Class_{AddMask|DeleteMask|IsMember}() functions.


fea2194fc0 Alexander Barton

Lists: change "only once" property into "valid until"

The old "only once" true/false behavior is still supported, so there are no other code changes required.


872dc5042d Alexander Barton

Xcode: update project file for Xcode 4.2


e1315f30fd Alexander Barton

define HAVE_GAI_STRERROR for Mac OS X Xcode builds

On Mac OS X 10.7 Lion, this fixes In file included from .../contrib/MacOSX/../../src/ngircd/client.c:28: /Developer/SDKs/MacOSX10.7.sdk/usr/include/netdb.h:272:13: error: expected identifier or '('


0a85c58878 Alexander Barton

Configuration: get rid of Conf_Oper_Count and Conf_Channel_Count

Count elements dynamically when needed.


ee21490887 Alexander Barton

./configure: Fix logic and quoting of poll() detection code

This fixes commit 8e193df ...


8fa92f0a24 Alexander Barton

Suppress 'Can't create pre-defined channel: invalid name: ""' messages

Skip predefined channel structures that have configured no name, like the "--configtest" does.


8e193df973 Alexander Barton

Only use poll() when poll.h exists as well


9d348d00d9 Alexander Barton

Not only check for poll(), make sure poll.h exists as well

This fixes building ngIRCd on Debian GNU/Linux 1.3 "Bo" :-)


9e48f3f8f8 Alexander Barton

whois-test: handle local hostname = "localhost.localdomain"

Use the pattern "localhost*" for valid local hostnames.


e4a06844a3 Alexander Barton

sample-ngircd.conf: show correct default for "PAM" variable

The default of "PAM" is "yes" when ngIRCd has been configured to use it, so show the correct default value in the sample configuration file. Closes #119.


20ccc1bba7 Alexander Barton

Update GPL 2 license text to current version

See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.


13d9e0c5a7 Alexander Barton

Test for gai_strerror()

If gai_strerror() isn't available, use a macro that simply returns a static error message (regardless of the real error code). For example, GNU libc 2.0.7 doesn't implement gai_strerror().


a7911e35af Alexander Barton

Only use AI_NUMERICHOST if it is #define'd

It isn't using GNU libc 2.0.7, for example ...


60812b6fdf Alexander Barton

defines.h: fix comment: "lenth" -> "length"

Reported by Christoph Biedl in #ngircd. Thanks!


1ea6811616 Alexander Barton

Init_Server_Struct(): correctly zero Server->bind_addr

Don't use the size of the pointer, use the size of the variable!


d2f54abbed Alexander Barton

Clean up and fix comments of Check_ArgIsTrue()

Thanks to kaFux for pointing this out! And fix code formatting as well ...


07dbb73c92 Alexander Barton

Update doc/GIT.txt


30796698a9 Alexander Barton

Only close "unrelated" sockets in forked child processes

This fixes the problem that ngIRCd can't do any IDENT lookups because of the socket has already been closed in the child process. The bug has been introduced starting with ngIRCd 17 ... :-( (commit ID 6ebb31ab35e)


f173a974be Alexander Barton

Added doc/Modes.txt: document modes supported by ngIRCd


8aac366802 Alexander Barton

Implemented user mode "R" and channel mode "R"

- User mode "R": indicates that the nick name of this user is "registered". This mode isn't handled by ngIRCd itself, but must be set and unset by IRC services like Anope. - Channel mode "R": only registered users (having the user mode "R" set) are allowed to join this channel.


69803d6ff1 Alexander Barton

Use Proc_Close() to remove no longer unused pipes to child processes

This removes spurious (but harmless) debug messages.



1361b3742d Alexander Barton

Introduce DEBUG_BUFFER, rework some debug messages

DEBUG_BUFFER is off by default and therefore disables these messages: - "Handle_Write() called for connection XX, YY bytes pending ..." - "Connection XX: ZZ bytes left in read buffer."


d3036c74e9 Alexander Barton

Testsuite: bind to loopback (127.0.0.1) interface only


553e8b6aa3 Alexander Barton

doc/Platforms.txt: ngIRCd 18 on Nexenta works

Thanks to Götz Hoffart for testing!


51d7674ee7 Alexander Barton

New 2nd message "Nickname too long" for error code 432


1189200d4a Alexander Barton

Client_CheckNick(), Client_IsValidNick(): code cleanup


7795b07c53 Alexander Barton

Merge branch 'ServerMode'

* ServerMode: Handle channel user modes 'a', 'h', and 'q' from remote servers Handle unknown channel modes on server links Handle unknown user modes on server links IRC_MODE(), Client_Mode(): code cleanup [2/2] Enlarge client user mode buffer, reduce client flags buffer Infom clients when other servers change their user modes IRC_MODE(), Client_Mode(): code cleanup [1/2]


d9325e8030 Alexander Barton

Merge branch 'bug113-SrvPrefix'

* bug113-SrvPrefix: Slightly change (and document!) IRC_KILL() calling convention Spoofed prefixes: close connection on non-server links only


989c9fa531 Alexander Barton

Handle channel user modes 'a', 'h', and 'q' from remote servers

These channel user modes aren't used for anything at the moment, but ngIRCd knows that these three modes are "channel user modes" and not "channel modes", that is that these modes take an "nick name" argument. Like unknown user and channel modes, these modes are saved and forwarded, but ignored otherwise.


641045249c Alexander Barton

Xcode: update project file to Xcode 3.2 or newer

Xcode requires Mac OS X 10.6 or newer; Xcode 4 supports this project format as well, so effectively you can use Mac OS X 10.6.x or 10.7.x for building ngIRCd with the Apple Xcode IDE.


2fd42667c2 Alexander Barton

Handle unknown channel modes on server links


456e55921d Alexander Barton

Slightly change (and document!) IRC_KILL() calling convention



2dfa24d2fa Alexander Barton

Handle unknown user modes on server links


6cbe13085d Alexander Barton

Spoofed prefixes: close connection on non-server links only

On server-links, spoofed prefixes can happen because of the asynchronous nature of the IRC protocol. So don't break server-links, only log a message and ignore the command. This fixes bug 113, see: <https://arthur.barton.de/bugzilla/show_bug.cgi?id=113>



1ed602eb47 Alexander Barton

IRC_MODE(), Client_Mode(): code cleanup [2/2]



160c52400f Alexander Barton

Cast getpid() and time() results for srand() input

This fixes: src/ngircd/ngircd.c:596: warning: implicit conversion shortens 64-bit value into a 32-bit value (i686-apple-darwin11-llvm-gcc-4.2)


ea725b99b7 Alexander Barton

Enlarge client user mode buffer, reduce client flags buffer

We have to enlage our user mode buffer, so we can handle even unknown user modes in the future; and reduce the client flags buffer, because I can't imagine why we ever would need ~100 flags!? Now we support up to 15 user modes (was: 8) and up to 15 flags (was: 99). So in the end, we even save 99-15+8-15=77 bytes for each client structure!


04744e9d89 Alexander Barton

ngIRCd release 18 (tags/rel-18)


0b8acf1205 Alexander Barton

Xcode: update and add missing files to project


3dc3a03538 Alexander Barton

Infom clients when other servers change their user modes


54f04f81e9 Alexander Barton

Update ChangeLog and NEWS for ngIRCd release 18


88f6fc5fd8 Alexander Barton

IRC_QUIT(): disconnect directly linked servers sending QUIT

Without this patch, the server becomes removed from the network and the client structures, but the connection isn't shut down at all ...


d692286d7a Alexander Barton

IRC_MODE(), Client_Mode(): code cleanup [1/2]


95e156b519 Alexander Barton

Updated doc/Platforms.txt for ngIRCd release 18


da897a2a14 Alexander Barton

contrib/ngindent: detect "gindent" as GNU indent


9f3690c39c Alexander Barton

Testsuite: make getpid.sh work even when run as root

Use ps(1) flag "-a" (as well as "-f"): "Select all processes except both session leaders (see getsid(2)) and processes not associated with a terminal." Thanks to Götz Hoffart for reporting this problem!


e160121698 Alexander Barton

MorePrivacy: Don't register WHOWAS information

Citing an email from Florian to the ngIRCd mailing list: "I wonder what the expected behaviour is when Conf_MorePrivacy is changed from 'yes' to 'no' and the config is reloaded. At the moment, WHOWAS will start giving out information on Users that were connected during Conf_MorePrivacy=yes period. If this is not wanted, Client_RegisterWhowas() should be changed to not store a record when Conf_MorePrivacy is enabled." And I think it is "not wanted" :-)



54566b6b32 Alexander Barton

Add preliminary ngIRCd protocol module for Anope 1.9

See contrib/Anope/README and doc/Services.txt for more details and installation instructions!


409b2c86c8 Alexander Barton

Updated doc/Platforms.txt: mipsel/unknown/linux-gnu


c041bb340c Alexander Barton

Update timestamp of ngircd(8) manual page


af60f04fef Alexander Barton

ngIRCd release 18~rc2 (tags/rel-18-rc2)


2d35731399 Alexander Barton

GnuTLS: use 1024 (DH_BITS_MIN) as minimum size of the DH prime

For outgoing connections, we use 2048 (DH_BITS) since commit 49b2d0e. This patch enables ngIRCd to accept incoming connections from other servers and clients that use at least 1024 bits (and no longer requires 2048 for incoming connections, too). Patch proposed by Florian Westphal.


7ae7ace579 Alexander Barton

ngircd.8: document debugging options



bd118c65fd Alexander Barton

Fix some wording, use spellchecker ;-)


29c49f643f Alexander Barton

doc/SSL.txt: adopt to new configuration file layout


b6185b1ac8 Alexander Barton

ngIRCd release 18~rc1 (tags/rel-18-rc1)


14afdaee08 Alexander Barton

hash: Use UINT32 instead of uint32_t


949c8ea7c7 Alexander Barton

Update NEWS and ChangeLog file for our upcoming next release


1765f0ae0b Florian Westphal

hash: use more recent lookup3 algorithm instead of lookup2

Bob Jenkins published a newer hash function in May 2006, it has better distribution. See http://burtleburtle.net/bob/hash/doobs.html for lengthy comparisions.



d99edb7728 Alexander Barton

Merge branch 'MorePrivacy'

* MorePrivacy: New configuration opion "MorePrivacy" to "censor" some user information



b80e115f39 Alexander Barton

New configuration opion "MorePrivacy" to "censor" some user information

this patch contains: * Fix for Conf_CloakUserToNick to make it conceal user details * Adds MorePrivacy-feature MorePrivacy censors some user information from being reported by the server. Signon time and idle time is censored. Part and quit messages are made to look the same. WHOWAS requests are silently dropped. All of this is useful if one wish to conceal users that access the ngircd servers from TOR or I2P.


269310f04b Alexander Barton

Merge branch 'ScrubCTCP'

* ScrubCTCP: Add documentation for "ScrubCTCP" configuration option New option to scrub incoming CTCP commands


6aad5a6706 Alexander Barton

INSTALL: document changed location of configuration variables


3282c1325e Alexander Barton

Merge branch 'newconfig'

* newconfig: sample-ngircd.conf: "SyslogFacility" should be commented out Move SSL-related configuration variables to new [SSL] section CheckFileReadable(): only check when a filename is given ... PAM: make clear which "Password" config option is ignored Really remove [Features] in our manual pages INSTALL: document changed location of configuration variables Update sample config file and manual page for new config structure Testsuite: update configuration files for new config file format Display configuration errors more prominent on "--configtest" conf.c: code cleanup Check for redability of SSL-related files like for MOTD file Restructure ngIRCd configuration, introduce [Limits] and [Options]


5410d96748 Alexander Barton

Add documentation for "ScrubCTCP" configuration option



3d0ce77f12 Alexander Barton

sample-ngircd.conf: "SyslogFacility" should be commented out


f087c68a99 Alexander Barton

New option to scrub incoming CTCP commands

This patch makes it possible to scrub incomming CTCP commands from other servers and clients alike. The ngircd oper can enable it from the config file, by adding "ScrubCTCP = yes" under [OPTIONS]. It is default off. CTCP can be used to profile IRC users (get user clients name and version, and also their IP addresses). This is not something we like to happen when user pseudonymity/secrecy is important. The server silently drops incomming CTCP requests from both other servers and from users. The server that scrubs CTCP will not forward the CTCP requests to other servers in the network either, which can spell trouble if not every oper knows about the CTCP-scrubbing. Scrubbing CTCP commands also means that it is not possible to send files between users. There is one exception to the CTCP scrubbing performed: ACTION ("/me commands") requests are not scrubbed. ACTION is not dangerous to users (unless they use OTR, which does not encrypt CTCP requests) and most users would be confused if they were just dropped. A CTCP request looks like this: ctcp_char, COMMAND, arg0, arg1, arg2, .. argN, ctcp_char ctcp_char is 0x01. (just like bold is 0x02 and color is 0x03.) They are sent as part of a message and can be delivered to channels and users alike.



b1786f309e Alexander Barton

New documentation: "how to contribute"


946d838de4 Alexander Barton

Move SSL-related configuration variables to new [SSL] section


d41f4d6d20 Alexander Barton

Display configuration errors more prominent on "--configtest"


42b32f8a2a Florian Westphal

conn: fix error handling when connecting to server

The io_event_create error handling seems to miss a 'return' statement. Fix this by moving io_event_create() call around so we do not need the Conn_Close/Init calls in the error case.


a085444035 Alexander Barton

CheckFileReadable(): only check when a filename is given ...


391cf4e2a1 Alexander Barton

conf.c: code cleanup


49b2d0ec98 Florian Westphal

ssl: gnutls: bump dh bitsize to 2048

problem is that some clients refuse to connect to severs that only offer 1024. For interoperability it would be best to just use 4096, but that takes minutes, even on current hardware.


449ad1eeea Alexander Barton

PAM: make clear which "Password" config option is ignored


7ef6cb4584 Alexander Barton

Check for redability of SSL-related files like for MOTD file

Remove functions ssl_print_configvar() and ConfSSL_Puts(), introduce new function CheckFileReadable().


dd7d64f577 Alexander Barton

Mac OS X: split up make targets

New targets are: "have-packagemaker", "osxpkg-dest"


9dfde13f0c Alexander Barton

Really remove [Features] in our manual pages


e7256bb8ac Alexander Barton

Restructure ngIRCd configuration, introduce [Limits] and [Options]

The intention of this restructuring is to make the [Global] section much cleaner, so that it only contains variables that most installations must adjust to the local requirements. All the optional variables are moved to [Limits], for configurable limits and timers of ngIRCd, and [Options], for optional features. The old variables in the [Global] section are deprecated now, but still recognized.


605b6a67bc Florian Westphal

fix clang warning about dead stores

clang 'scan-build': Value stored to 'r' is never read Value stored to 'fd' is never read


10c7a15687 Alexander Barton

contrib/platformtest.sh: fix gcc version detection

Now the version of GNU C is detected correctly on SuSE Linux, too ...


05748aa5ee Florian Westphal

parse: fix logical expression testing for non RFC1459 links

parse.c:284: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~' The expression looks dubious, this should probably be an if-not-set, then... test.


0bb892bb5f Florian Westphal

conn: avoid needlesly scary 'buffer overflow' messages

When the write buffer space grows too large, ngircd has to disconnect the client to avoid wasting too much memory. ngircd logs this with a scary 'write buffer overflow' message. Change this to a more descriptive wording.


c26ca7773b Alexander Barton

Only require server prefixes on non RFC1459 links

Not all servers (and services!) using the RFC1459 protocol style send prefixes on all commands; so don't require them to do so. This relaxes the requirements introduced by commit 15775e679.


1cb2f5739d Alexander Barton

Merge branch 'master' of git://arthur.barton.de/ngircd-alex

* 'master' of git://arthur.barton.de/ngircd-alex: Do reverse lookups using the AF of the incoming connection resolve: fix reverse lookups of client connections with ConnectIPv6=no


160f5725a6 Alexander Barton

Do reverse lookups using the AF of the incoming connection

This fixes errors like this one: Address mismatch: 2001:1234:abcd:1::1 != 192.168.1.1


66315cab9a Alexander Barton

Mac OS X: install on root volume only, and set correct permissions

Update Mac OS X Installer.app description bundle, so that the ngIRCd package can only be installed on the root volume ("/"); and make sure that all installed files and directories have correct ownership and permissions.


e4e1595bff Florian Westphal

resolve: fix reverse lookups of client connections with ConnectIPv6=no

We re-use the same helper function for both forward lookups (when we want to connect to a peer server) and for validation of reverse loopups (where we make a lookup on the hostname returned by a reverse lookup on the IP address that connected). Problem: When ConnectIPv6=no, the forward lookup helper sets the adderss family to AF_INET, and, if out client connected via ipv6, we fail to validate the result. Thus move the ConnectIPvX check out of the helper.


67a9d994e3 Alexander Barton

Mac OS X: update installer texts and add logo.


1cd8d7f386 Alexander Barton

Doxygen'ify conf.c


9a102ca96b Alexander Barton

New function Config_Error_Section(); and code cleanup


e70e81460b Alexander Barton

Add some type casts to random() and srandom() functions

This fixes two gcc warnings (on Mac OS X): "warning: implicit conversion shortens 64-bit value into a 32-bit value"


5acb90fafc Florian Westphal

ngircd: improve rng initialisation

we do not need this for cryptographic purposes, but we can do better than plain srandom(getpid()). Also, keep in mind that rng state is inherited across fork(), so re-init it in the child.


d61fbfc6e3 Alexander Barton

Merge branch 'AuthPing'

* AuthPing: Add documentation for "RequireAuthPing" configuration option New configuration option "RequireAuthPing": PING-PONG on login


cf7e3b1c02 Alexander Barton

Merge branch 'NoticeAuth'

* NoticeAuth: Add documentation for "NoticeAuth" configuration option Configuration: move "NoticeAuth" to GLOBAL section New configuration option "NoticeAuth": send NOTICE AUTH on connect


fc0b026149 Alexander Barton

Add documentation for "RequireAuthPing" configuration option



680db6755b Alexander Barton

Add documentation for "NoticeAuth" configuration option


162433398e Alexander Barton

New configuration option "RequireAuthPing": PING-PONG on login

When enabled, this configuration option lets ngIRCd send a PING with an numeric "token" to clients logging in; and it will not become registered in the network until the client responds with the correct PONG. This is used by QuakeNet for example (ircu/snircd), and looks like this: NICK nick :irc.example.net PING :1858979527 USER user . . :real name PONG 1858979527 :irc.example.net 001 nick :Welcome to the Internet Relay Network ...



f99d33ddd9 Alexander Barton

Configuration: move "NoticeAuth" to GLOBAL section


f1a4a4dc88 Alexander Barton

Warn when unknown variables are found in [Features] section


d29e389779 Alexander Barton

New configuration option "NoticeAuth": send NOTICE AUTH on connect

When enabling "NoticeAuth" in the [Features] section, ngircd will send "NOTICE AUTH" messages on client connect like e.g. snircd (QuakeNet) does.


6cb90f399d Alexander Barton

Update doc/GIT.txt


d587926eb0 Alexander Barton

Update INSTALL text


770a58ac6d Alexander Barton

Generate WALLOPS message on SQUIT from IRC operator

So SQUIT now behaves like CONNECT and DISCONNECT commands, when called by an IRC operator (and not received from an other server).


15775e6790 Alexander Barton

Commands received from other servers must have prefixes

Make sure that all commands received from other servers do have valid prefixes. Only exceptions are PING and ERROR commands that can occure without prefixes when generated by the remote peer itself.


62f705f97e Alexander Barton

Allow servers to send more commands in the first 10 secods

This helps to speed up server login and network synchronisation.


a39e2f22c9 Alexander Barton

IRC_CHANINFO(): Code cleanup


dcb1951efd Alexander Barton

Handle_GLOBAL(): don't use multi-line strings

They aren't supported by elder C compilers ...


fa8b83e69b Alexander Barton

Merge branches 'CloakUserHost', 'QuitOnHTTP' and 'bug72-WHOIS-List'

* CloakUserHost: Add a note not to use a percent sign ("%") in CloakHost variable Rename ClientHost to CloakHost, and ClientUserNick to CloakUserToNick Don't use "the.net" in sample-ngircd.conf, use "example.net" ngircd.conf.5: document "ClientHost" and "ClientUserNick" Move "ClientHost" and "ClientUserNick" to end of [Global] section ClientUserNick setting ClientHost setting * QuitOnHTTP: Only "handle" HTTP commands on unregistered connections Don't use IRC_QUIT_HTTP() if STRICT_RFC is #define'd IRC_QUIT_HTTP(): enhance error message Move IRC_QUIT_HTTP() below IRC_QUIT() quit on HTTP commands: GET & POST * bug72-WHOIS-List: Add "whois-test" to testsuite and distribution archive Add support for up to 3 targets in WHOIS queries.


acd7a5d6d4 Alexander Barton

Add a note not to use a percent sign ("%") in CloakHost variable

The percent sign is reserved for future extensions, for example to expand some variables like %H to a hash value of the real host name ... Idea by kaFux in #ngircd.


d1f604ab89 Alexander Barton

Add "whois-test" to testsuite and distribution archive

Test script proposed by Dana Dahlstrom, 2008-02-17. See <https://arthur.barton.de/bugzilla/show_bug.cgi?id=72> ...


b19f7d73cb Alexander Barton

Only "handle" HTTP commands on unregistered connections



ff2a425ab8 Alexander Barton

Add support for up to 3 targets in WHOIS queries.

also allow up to one wildcard query from local hosts. Follows ircd 2.10 implementation rather than RFC 2812. At most 10 entries are returned per wildcard expansion. WHOIS test cases by Dana Dahlstrom.


38747b40dc Alexander Barton

Don't use IRC_QUIT_HTTP() if STRICT_RFC is #define'd



fc55c945db Alexander Barton

Don't use "the.net" in sample-ngircd.conf, use "example.net"

"the.net" is an existing domain of the Texas Higher Education Network ... See RFC 2606.


dbb66695c9 Alexander Barton

IRC_QUIT_HTTP(): enhance error message


152b529abf Alexander Barton

ngircd.conf.5: describe types of variables

Describe the possible types of variables in ngircd.conf: booleans, text strings, integer numbers. And add type information to each variable description.


77cff9e47c Alexander Barton

Move IRC_QUIT_HTTP() below IRC_QUIT()


c0d13c4713 Alexander Barton

ngircd.conf.5: document "ClientHost" and "ClientUserNick"



33e8c24806 Alexander Barton

quit on HTTP commands: GET & POST


5417a72536 Florian Westphal

channel: always reject zero-length channel key

previously, any client could join in this configuration: [Channel] Name = #test Modes = tnk KeyFile = /tmp/foobar fix this by checking for zero-length key before comparing key to channel key.


71d8c37171 Alexander Barton

ClientUserNick setting


94e4562c1c Alexander Barton

PAM-Auth child: log if result can't be reported

This fixes the followin GCC warning on modern Linux systems as well: irc-login.c: In function ‘Hello_User’: irc-login.c:876: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result


52f59149ad Alexander Barton

ClientHost setting


6caa947f98 Alexander Barton

Protocol.txt: Update description of CHANINFO command


e49109e36d Alexander Barton

Add cscope.out to .gitignore file


adfa968f99 Alexander Barton

Correctly detect errors when handling "MODE x" commands


07f241ff6d Alexander Barton

Enhance documentation for the WEBIRC command


53fecf5a2b Alexander Barton

Doxygen'ify irc-login.c


8a674c3263 Alexander Barton

Doxygen'ify irc-channel.c


1f5fbd5992 Alexander Barton

Doxygen'ify conn.c


5858dc3886 Alexander Barton

Doxygen'ify proc.h


af6ac0fa41 Alexander Barton

Doxygen'ify parse.h


f3ec90f3f0 Alexander Barton

Doxygen'ify and update comments in ngircd.{c|h}


c6a7de869c Alexander Barton

Doxygen'ify and update comments in match.c


4ef23df813 Alexander Barton

Update and translate comments in hash.c


5555b6cc86 Alexander Barton

Doxygen'ify conf.h


72a982ae7e Alexander Barton

Add missong Doxygen @file tags to ngircd.h and irc-op.h


2a7dd06ebd Alexander Barton

Code cleanup: mostly removing empty lines


ebfcdb088b Alexander Barton

Doxygen: define ZLIB, PAM, and ZEROCONF



408cefd15d Alexander Barton

Updated Doxygen configuration file

Removed unnecessary variables DETAILS_AT_TOP, EXTRACT_PRIVATE, EXTRACT_LOCAL_CLASSES, added SHOW_DIRECTORIES=YES, STRIP_CODE_COMMENTS=NO, REFERENCED_BY_RELATION=YES, REFERENCES_RELATION=YES, HTML_DYNAMIC_SECTIONS=YES and GENERATE_DOCSET=NO; updated PREDEFINED.


f59f773cfe Alexander Barton

Doxygen: remove own header and CSS file

Use the ones of Doxygen instead, this has the advantage that we benefit of new functionality of Doxygen without having to make changes.


f732c7117e Alexander Barton

Make write buffers bigger, but flush early

This patch - makes the server write buffer bigger: 64k, - makes the regular write buffer bigger: 32k, - tries to flush the write buffer starting at 4K. Before this patch, a client got disconnected if the buffer flushing at 4k failed, now regular clients can store up to 32k and servers up 64k even if flushing is not possible at the moment (e.g. on slow links).


477224be5c Alexander Barton

Enhance logging on "write buffer overflow"



8700f4d93c Alexander Barton

Better check for invalid IRC+ PASS command

Don't do a NULL-pointer dereference when a remote server using the IRC+ protocol sends an invalid PASS command without the required <serverversion> parameter ...


765dc320f1 Alexander Barton

Read_Request(): don't access possibly free'd CLIENT structure

Handle_Buffer() can shut down connections and remove clients, so after calling it, we have to make sure that our CLIENT pointer is still valid.


9fff9f6a2b Alexander Barton

ngircd-test2.conf: really disable Ident and PAM ...


b856a58051 Alexander Barton

Log "Can't read MOTD file" as "configuration error"

Now this error message is displayed in the console without debug prefix when running the configuration test (--configtest).


8927700b22 Alexander Barton

Allow "Port = 0" in [Server] blocks

Port number 0 marks remote servers that try to connect to this daemon, but where this daemon never tries to establis a connection on its own: only incoming connections are allowed.


58a4dae56d Alexander Barton

conf: fix 'Value of "..." is not a number!' for negative values

Don't use isdigit() function any more, because it only checks the first character of the variable value and because it doesn't know about the minus sign which is required e.g. for "Group = -1".


914d6a26d8 Alexander Barton

Don't read MOTD file twice

The MOTD file is read in Read_Config(), so don't read it when handling the "MotdFile" configuration variable. Instead make sure that it is initialized properly when (re-)reading the configuration.


c98e794b38 Alexander Barton

Add [Features] section to ngircd-test{1|2}.conf

Fix commit 5a34bb203a: It is not enough to strip the "No" prefix from "Ident" and "PAM", but we have to introduce the new [Features] section to fix all warning messages of ngIRCd. Variables "Ident" and "PAM" in [Global] are completely wrong :-(


a990bd72ec Alexander Barton

Enable WHOIS command to return information about services


5a34bb203a Alexander Barton

Update testsuite configuration: strip No... prefixes


d3ef2239e1 Alexander Barton

Add connection/socket information to some log messages


a57748e1a1 Alexander Barton

Implement channel mode 'O': "IRC operators only"

This channel mode is used on DALnet (bahamut), for example.


6600ce3445 Alexander Barton

Remove ZeroConf variable from sample-ngircd.conf



5ed7a4ea57 Alexander Barton

TOPIC command: test for channel admin rights correctly

This enables other servers, services and IRC operators to change channel topics, even when the client is not joined to this channel. Now the handler for TOPIC behaves like the one for MODE.


ba32d594fd Alexander Barton

Channel_CheckAdminRights(): test if client can admin a channel

This generic function tests if a client is allowed to do administrative tasks to a specific channel: - servers and services are always truested ("allowed everything"), - channel operators are allowed, - IRC operarors are allowed if OperCanUseMode is set in the config.


3460c87c58 Florian Westphal

conf: fix 'unknown section' FEATURES parse error

pointed out by Alex: ngircd.conf, line 105: Unknown section "[Features]"!


02592f912e Alexander Barton

IRC_TOPIC(): code cleanup



23ce0393b2 Florian Westphal

array: remove check for allocated == 0

allocated can only be zero if ->mem is NULL.


994a003aba Florian Westphal

array: remove alignment of requested size

libc should know better than us. Also, this helps debugging with tools like valgrind: When you allocate an array of size x, and then erronoulsy use x+1 valgrind cannot detect the bug because due to ALIGN_() made by array.c we might have allocated more than size x...



9402bcaa73 Florian Westphal

conf: add missing static qualifier

internal helper, so it should be static. also, add UNUSED to 'Line'.


6d11fb1497 Alexander Barton

Update copyright notices for 2010 :)

And update the NEWS and ChangeLog file as well.


28bbd7e27a Alexander Barton

Make NoZeroConf option work with Howl


1dca082fc6 Florian Westphal

config: deprecate NoXX-Options

ngircd unfortunately uses several options using double-negation, e.g. NoIdent = No, NoPam = No, etc. This renames all options by dropping the "No" prefix, e.g. "NoIdent = no" becomes "Ident = yes". The old options will continue to work, but will cause a warning message. Also update man pages and default config. To prevent silly 'Ident = yes' from appearing in --configtest output in the 'ident support not compiled in and Ident Option not used' case, make default value depend on feature availability. If feature is available, enable by default, otherwise disable. We might consider moving these options to a new [Feature] section, or something like that, because none of these options are essential. Another possible improvement: 'Ident = yes' option in ngircd.conf causes a warning if ngircd was built without ident support. This does not happen with e.g. zeroconf....


4a5dfcc3ac Florian Westphal

channel: fix confusing "adding to invite list" debug output

adding entries to ban list produced 'invite list' debug output...


f37e495a2b Alexander Barton

Command throttling: introduce MAX_COMMANDS_SERVICE

New MAX_COMMANDS_SERVICE (currently set to MAX_COMMANDS_SERVER[10]), so that services are handled like servers (and not regular users).


21cbf37db5 Alexander Barton

Don't throttle services and servers beeing registered


4188a82e76 Alexander Barton

Xcode: correctly sort files


36d4f6c601 Alexander Barton

Don't assert() when serching a client for an invalid server token

This is only relevant when a trusted server on a server-server link sends invalid commands.


186b14f332 Alexander Barton

ngIRCd release 17.1 (tags/rel-17.1)


8ea1c5bb82 Alexander Barton

--configtest: remember if MOTD is configured by file or phrase

Configuration variables "MotdFile" and "MotdPhrase" are mutually exclusive; so don't display content in both of them when running "ngircd --configtest": instead remember which one is beeing used.



60bb40d67a Alexander Barton

Reset ID of outgoing server link on DNS error correctly

Not resetting the ID prevents the daemon from trying to re-establish outgoing server links when the DNS resolver failed to resole a hostname.


5da98ec389 Alexander Barton

Don't log critical (or worse) messages to stderr

stderr isn't redirected to the "error file" any more, so there is no point in trying to log to it ...


0305f75456 Alexander Barton

Manual page ngircd(8): add SIGNALS section


65bcff35ff Alexander Barton

Manual pages: update and simplyfy AUTHORS section


790fa89e67 Alexander Barton

Remove "error file" when compiled with debug code enabled

The information written to the "error file" (/tmp/ngircd-<PID>.err) when ngIRCd is compiled with debug code enabled isn't that usefule, so don't create this file at all.


ce448e9077 Alexander Barton

README: Updated list of implemented commands



de6f08cc04 Alexander Barton

Merge branch 'numeric-329'

* numeric-329: New numeric 329: get channel creation time on "MODE #chan" commands Save channel creation time; new function Channel_CreationTime()


678d5411e2 Florian Westphal

add doc/PAM.txt to distribution tarball

doc/PAM.txt was not included in the release tarball. reported by Christoph Biedl.




0d19f2b43a Alexander Barton

ngIRCd release 17 (tags/rel-17)


5a14942b0a Alexander Barton

Updated doc/Platforms.txt for upcoming release 17


2bca14b52e Alexander Barton

contrib/platformtest.sh: make command name quoting consistent



30b6e72b96 Alexander Barton

Fix up generation and distribution of sample-ngircd.conf

- Add generated sample-ngircd.conf to new .gitignore file, - refactor Makefile.am to generate sample-ngircd.conf on "make all", to clean it up on "make clean", and to install it to the correct place. - Make sure path names in sample-ngircd.conf are separated by "/".



bdcf3f0e24 Alexander Barton

ngIRCd Release 17~rc3 (tags/rel-17-rc3)


d7ad956a06 Alexander Barton

Fix connect attempts to further IP addresses of outgoing server links

If a hostname resolves to more than one IP address (round-robin DNS, IPv4 and IPv6) and an attempt to connect to the first address fails, ngIRCd should try to connect to the 2nd address, 3rd address etc. But because of a wrong variable used in the call to New_Server(), the wrong server structure has been used in further connection attemps which possibly lead to connection attempts to already connected servers.


e2c9290030 Alexander Barton

Debian: Install default /etc/pam.d/ngircd allowing all logins

This is required for backwards compatibility when installing the -full or -full-dbg package variant: PAM is enabled now but no configuration present, so all login attempts would be denied ... Creating /etc/pam.d/ngircd including "auth required pam_permit.so" restores the old behaviour of allowing all connections.



864f3df575 Alexander Barton

Make contrib/platformtest.sh more portable


ffccfb0975 Alexander Barton

Mac OS X package ("make osxpkg"): generate PAM configuration


76f40bdb98 Alexander Barton

Xcode builds ("make xcode"): disable pam_fail_delay()

disable pam_fail_delay() only is available starting with Mac OS X 10.6; but we use the 10.5 SDK for campatibility, so don't use this function at all when building using Xcode.


3dd91923e4 Alexander Barton

Xcode: update project file, use 10.5.x SDK

This is required for universal 32 bit and 64 bit builds: now code for ppc, i386, and x86_64 is generated (which requires 10.5 or newer).


a4de27deee Alexander Barton

Xcode builds ("make xcode"): detect version number correctly


8449e08245 Alexander Barton

ngIRCd release 17~rc2 (tags/rel-17-rc2)


05d1df97c3 Alexander Barton

Updated contrib/platformtest.sh (new version scheme)

- handle version numbers generated by "git describe" - detect gcc compiler version correctly when "-std=xxx" is used


01c39ba001 Alexander Barton

New doc/HowToRelease.txt file describing the release process



8288878122 Alexander Barton

Generate ngIRCd version number from GIT tag

Now the ngIRCd release/version number is deduced from the "current" annotated GIT tag; see "git describe --help" for details. This is the same scheme the Linux kernel uses and gives much more details version numbers for interim releases and inofficial source archives generated using "make dist". Please note: the version number is only updated it the autogen.sh script is run; so after pulling in and pushing out new commits, you should run ./autogen.sh!


596bc096b0 Alexander Barton

Make sourcecode compatible with ansi2knr again

This allows to compile ngIRCd using a pre-ANSI K&R C compiler again: all source files are automatically converted by the included ansi2knr program (of GNU automake/autoconf) before compiling them with the K&R C compiler, but a few coding standards must be met. Tested on Apple A/UX 3.x. Regression testing on Linux and Mac OS X.


5700329f8c Alexander Barton

./configure: check if C compiler can compile ISO Standard C

This is required for enabling ansi2knr on systems that don't have an ANSI C compiler installed (e.g. on A/UX with Apple standard C compiler).


3b74280879 Alexander Barton

./configure: check support for C prototypes again


f1267ca375 Alexander Barton

Don't use PARAMS() macro for function implementations

The PARAMS() macro is only needed for function prototypes; don't use it for the actual implementations.


ccb175dce6 Alexander Barton

Added m68k/apple/aux3.0.1 (gcc 2.7.2) to doc/Platforms.txt


99e08eaced Alexander Barton

Only try to set FD_CLOEXEC if this flag is defined

A/UX 3.x doesn't implement this constant, for example.


5f2bc55d36 Alexander Barton

Only use "__attribute__ ((unused))" if GCC >=2.8 is used

At least GCC 2.7.2 doesn't support this attribute.


1fa5b11995 Alexander Barton

doc/Makefile.am: don¹t set docdir, automake handles it already

And elder make(1) programs don¹t like "x ?= y" ...


d00a0f1e7c Alexander Barton

ngIRCd release 17~rc1 (tags/rel-17-rc1)


a988bbc86a Alexander Barton

New configuration option "NoZeroConf" to disable ZeroConf registration

If ngIRCd is compiled to register its services using ZeroConf (e.g. using Howl, Avahi or on Mac OS X) this parameter can be used to disable service registration at runtime.


4226db873f Alexander Barton

Xcode: only build current architecture in "Debug" target


f579043671 Alexander Barton

doc/Platforms.txt: added NetBSD 5.0.2


50cb321bb1 Alexander Barton

Updated doc/Platforms.txt


ade8902b88 Alexander Barton

Make sure sighandlers.h is listed in noinst_HEADERS

... because it must be included in the distribution archive :-)


3a826b774a Alexander Barton

const'ify ngt_SyslogFacilityName() function

This fixes the following gcc compiler warning: tool.c: In function 'ngt_SyslogFacilityName': tool.c:195: warning: return discards qualifiers from pointer target type



5e82a91d13 Alexander Barton

New configuration option "SyslogFacility"

The new option "SyslogFacility" deines the syslog "facility" to which ngIRCd should send log messages. Possible values are system dependant, but most probably "auth", "daemon", "user" and "local1" through "local7" are possible values; see syslog(3). Default is "local5" for historical reasons.


4943bbb066 Alexander Barton

New functions ngt_SyslogFacilityName() and ngt_SyslogFacilityID()

These both functions translate syslog facility names to ID numbers and vice versa. On systems that don't define the facilitynames[] array in syslog.h, we try to build one ourself.


e2ba7e08b4 Alexander Barton

Explicitly cast return value of read(2) to "int"

This fixes the following gcc warning, emitted by Xcode: src/ngircd/sighandlers.c: In function 'Signal_Callback': src/ngircd/sighandlers.c:239: warning: implicit conversion shortens 64-bit value into a 32-bit value


b1a117cd98 Alexander Barton

Add sighandlers.{c|h} to Xcode project

And update static Mac OS X config.h used by the Xcode project.


4a770e8e2d Alexander Barton

Don't call sigaction() if it is not available on the system


ba720fcbae Florian Westphal

Fix signalpipe file descriptor leak on RESTART

Signals_Init() must only be called once. This does not affect any ngircd release version. Earlier version of this patch moved the io and sighandler initialization before the while() loop, but as Alexander Barton noticed that broke all systems without builtin select support in io.c...


b3cfbc3d28 Alexander Barton

sighandlers.{c|h}: Code cleanup

- declare signals_catch[] array not between the function implementations. - rename now local function NGIRCd_Rehash() to Rehash(). - remove empty and therefore not used "catch SIGHUP; break;".


74578890b7 Alexander Barton

Make sighandlers.{c|h} compatible with ansi2knr


212311efc5 Alexander Barton

Updated ChangeLog to include signal handler changes


fe5c7cb22d Alexander Barton

Bump version number to "17-dev"


cdae82413d Alexander Barton

Update ChangeLog and NEWS: include SIGUSR1/SIGUSR2 changes



cd954ee7e9 Alexander Barton

Reformat "server state" debug messages a little bit


355828e64f Alexander Barton

Enable the daemon to dump its internal state in debug-mode.

This patch allows ngIRCd to dump its internal state (connected clients, actual configuration) when compiled with --enable-debug. The daemon catches two more signals: - SIGUSR1: toggle debug mode (on/off), - SIGUSR2: dump internal state to console/syslog.


755f54b150 Florian Westphal

signalhandlers: add fallback to deprecated sysv API


ef3dbf96eb Florian Westphal

remove NGIRCd_SignalRehash

now that the main signal handling is done from the dispatcher loop we can call NGIRCD_Rehash() directly. the /REHASH handler can queue the Rehash() function for execution by sending a SIGHUP. It will be run when we return back to the dispatch loop.


1fe17e246c Florian Westphal

Add new 'delayed' signal handlers.

Allows to defer/queue signal processing for execution on the next event dispatch call, i.e. we can perform any signal action in normal, non-signal context. Example uses: - Reload everything on HUP without writing a global "SIGHUP_received" variable - Dump status of internal Lists on SIGUSR1, etc.


c135d0dded Florian Westphal

io: add io_cloexec to set close-on-exec flag.


1e281a8baa Florian Westphal

ng_ipaddr.h: include assert.h

We use assert() in this header, so we should include assert.h.


6349ec8bb3 Alexander Barton

Conn_SyncServerStruct(): test all connections; and work case insensitive

Fix synchronization of established connections and configured server structures after a configuration update: - Not only test servers that already have a connection, but also check and update configured servers to which a new connection is beeing established (SERVER_WAIT state). - And do the server name comparision case-insensitive.


8d68fe3f86 Alexander Barton

Check_Servers(): skip servers already beeing connected

Let CheckServers() not only skip servers that already have a connection, but also skip servers to which a new connection is already beeing established (SERVER_WAIT state).


4f6c19712e Alexander Barton

Check_Servers(): Code cleanup



90a186158b Alexander Barton

Fix linebreak in INSTALL text to fit in 80 columns


b52d5e2a78 Alexander Barton

configure: correctly indent IPv6 yes/no summary output


04e38f17ae Alexander Barton

Don't reset My_Connections[Idx].lastping when reading data

This fixes PING-PONG lag calculation (which resulted in "0" before). The "lastping" time is still reset it if a time shift backwards has been detected to prevent the daemon from miscalculating ping timeouts.


32188d821b Alexander Barton

write_whoreply(): respect hostname cloaking


6f4a348b75 Alexander Barton

IRC_USERHOST(): respect hostname cloaking


a51670005f Alexander Barton

IRC_USERHOST(): Code cleanup & some documentation


0263fa4c66 Alexander Barton

Send_Message(): respect hostname cloaking



fd4dfccc30 Alexander Barton

Refactor IRC_WriteStr{Channel|Related}Prefix(); support cloaking

Move common code to new local function Send_Marked_Connections() and respect hostname cloaking.


2a4bf67aac Alexander Barton

Implement user mode "x": hostname cloaking (closes: #102)

When a client has user mode "x" set, its real hostname is cloaked by substituting it with the server name (as configured in ngircd.conf). Restricted clients (user mode "r") aren't allowed to change mode "x". Please note that hostname cloaking is only in effect in server-client communication! The server still uses the real hostname for its own logging and for all server-server communication -- therefore all servers in the network must support user mode "x" to prevent older servers from leaking the real hostname of a cloaked client!


575485eb82 Alexander Barton

WHOWAS: respect hostname cloaking

Store cloaked hostname if user mode "x" is set when the client disconnects from the server.


3fd4f320b7 Alexander Barton

WHOIS: respect hostname cloaking


6fdd3479f1 Alexander Barton

Implement Client_HostnameCloaked() and Client_MaskCloaked()

These two functions return the cloaked hostname, if the client has enabled hostname cloaking indicated by the -- still to implement -- user mode "x". See furter patches :-)


617640e0a3 Alexander Barton

Clean up an document Client_Hostname() and Client_Mask()


f72e22d361 Alexander Barton

Make configure switch "--docdir" work (closes: #108)


c65bf5d2ce Alexander Barton

Reformat and update FAQ.txt a little bit


9c6230e177 Florian Westphal

INSTALL: mention SSL and IPv6


479a43b1c6 Florian Westphal

INSTALL: mention changed handling of MotdFile.


056de78e31 Florian Westphal

ngircd: change MOTD file handling

previously, the given MotdFile file was read whenever a client requested it. Change handling to read the MotdFile contents into memory once during config file parsing. Two side effects: - changes to the MOTD file do not have any effect until ngircds configuration is reloaded - MOTD file does no longer have to reside in the chroot directory (the MOTD contents will then not be re-read on reload in that case)


a02bc9cc6f Florian Westphal

startup: open /dev/null before chroot

before people had to create a /dev/null inside the chroot to make redirection work.



acb66d6463 Alexander Barton

Allow IRC operators to use MODE command on any channel (closes: #100)

This allows IRC operators to change channel modes of ANY channel, even without joining these channels first.


63a304755a Alexander Barton

Added mailmap file for git-[short]log and git-blame


6ebb31ab35 Alexander Barton

Remove Proc_Kill(), use timeout to kill child processes

This avoids a race and potentionally killing the wrong process on systems that use randomized process IDs; now the child itself is responsible to exit in a timely manner using SIGALRM.


cf93881dfb Alexander Barton

New function Conn_CloseAllSockets() to close all open sockets

This is useful in forked child processes, for example, to make sure that they don't hold connections open that the main process wants to close.


560492a4a4 Alexander Barton

Authenticated users should be registered without the "~" mark



6131822af6 Alexander Barton

Don't even fork a PAM-subprocess if "NoPAM" option is set



41034950d9 Alexander Barton

Mark some variables as "unused" to prevent compiler warnings

Some variables are only used when compiling with IDENT or PAM support or when the debug code is enabled. Mark them as "unused" so that gcc doesn't generate warnings when neither of these options is enabled.


6faf44bc6d Alexander Barton

Set NoPAM=yes in configuration files used for the testsuite


f369177617 Alexander Barton

New configuration option "NoPAM" to disable PAM

When the "NoPAM" configuration option is set and ngIRCd is compiled with support for PAM, ngIRCd will not call any PAM functions: all connection attemps without password will succeed instead and all connection attemps with password will fail. If ngIRCd is compiled without PAM support, this option is a dummy option and nothing changes: the global server password will still be in effect.


37ee0a3313 Alexander Barton

io.c: Include conn.h when using the select() API



28424d013d Alexander Barton

Make sure signal.h is #include'd when needed


583c50476b Alexander Barton

Initial documentation for using PAM with ngIRCd


808d4f6e85 Alexander Barton

Implement asynchronous user authentication using PAM

For each client connection a child process is forked which handles the actual PAM authentication and reports the result back to the master process using a pipe for communication. While the PAM authentication is in process the daemon does not block.


fb4b5acfb8 Alexander Barton

Add new pam.{c|h} module to Xcode project

Adjust Xcode project and Mac OS X static config.h header to use PAM.



1995af0ed6 Alexander Barton

New functions Client_[Set]OrigUser() to get/set user specified by peer

The Client_SetOrigUser() function is used to store the peer-provided user name (see USER command) in its original form, not changed by IDENT results, for example.


761b2284b9 Alexander Barton

Detect PAM libraries


79be1c477e Alexander Barton

Refactor Resolve_Read() into generic Proc_Read() function


7b5e2fe38e Alexander Barton

Make Proc_Kill() more fault-tolerant


bf8b646304 Alexander Barton

New function Conn_GetProcStat()

Get PROC_STAT sub-process structure of a given connection.


e4ffcd00bd Alexander Barton

Code cleanup: don't reset penalty time on DNS resolver result

See commit d4632a727fbee6: it's not necessary any more!


4cc4c29e38 Alexander Barton

New function Proc_GenericSignalHandler()


0db9a31e50 Alexander Barton

Rename Log_[{Init|Exit}_]Resolver to Log_[{Init|Exit}_]Subprocess

Rename Log_Init_Resolver, Log_Exit_Resolver, and Log_Resolver to Log_Init_Subprocess, Log_Exit_Subprocess, and Log_Subprocess and make it more generic thereby.


5462c6c50f Alexander Barton

Don't #include client.h when conn.h/conn-func.h is already included

conn.h and cinn-func.h both already #include client.h, so it is not needed to do it twice.


3d49fa5bff Alexander Barton

New function Conn_GetFromProc() to get CONN_ID of a subprocess

Get CONN_ID from file descriptor associated to a subprocess structure.


2d4ea28835 Alexander Barton

Resolver: Implement signal handler and catch TERM signal


d4632a727f Alexander Barton

Don't set a penalty time when doing DNS lookups

The logic isn't as described in the source and intended by this code: ngIRCd doesn't wait for the asynchronous resolver process until the set penalty time is over, but until the forked process terminates or the initial connection timeout (= PongTimeout) triggers. So don't set the penalty time at all and remove the wrong comment.



89e73ad4b4 Alexander Barton

Refactoring: Rename CONNECTION.res_stat to .proc_stat

We want to use this process status variable not only for the resolver subprocesses but other asynchronous tasks as well; so let's name it more generic.


54e67ea9ee Alexander Barton

New "module" proc.c/proc.h for generic process handling

The new "module" proc.c is used for functions dealing with child processes. At the moment, it is only used by the asynchronous resolver. All the functions already implemented habe been migrated from the resolver code base, and the rest of the ngIRCd source code has been adepted to the new namespace and calling conventions. The goal is to develop "generic" process handling functions that can be used for other purposes as well, e.g. running processes on client connects etc.


cc336b7558 Alexander Barton

Only #include resolve.h if it is really needed


ae55d4f500 Alexander Barton

Fix redundant redeclaration of Conn_Count*() functions

The wrongly placed #endif lead to the following compiler warnings: conn.h:125: warning: redundant redeclaration of ‘Conn_Count’ conn.h:125: warning: previous declaration of ‘Conn_Count’ was here conn.h:126: warning: redundant redeclaration of ‘Conn_CountMax’ conn.h:126: warning: previous declaration of ‘Conn_CountMax’ was here conn.h:127: warning: redundant redeclaration of ‘Conn_CountAccepted’ conn.h:127: warning: previous declaration of ‘Conn_CountAccepted’ was here


edfa215481 Alexander Barton

const'ify Conn_WriteStr() function


c6742192a6 Alexander Barton

const'ify Send_ListChange() function in irc-mode.c


0c0d4af55a Alexander Barton

const'ify IRC_WriteStrXXX() and Get_Prefix() functions


8605e9c0fe Alexander Barton

const'ify command name variable in _COMMAND strcuture


a68103771c Alexander Barton

const'ify Client_TypeText()


8ad1c23ae4 Alexander Barton

Add some documentation for using BOPM with ngIRCd


f76e0a1db6 Alexander Barton

Implement user mode "c": receive connect/disconnect NOTICEs

Users having the user mode "c" set receive NOTICE messages on each new client connection to the local server as well as disconnects. Only IRC operators (users having the mode "o" set) are allowed to set the 'c' user mode. These connect/disconnect messages can be useful for open proxy scanners -- BOPM (http://wiki.blitzed.org/BOPM) is now functional with ngIRCd, for example.


51ed742054 Alexander Barton

Refactor Wall_ServerNotice() into more generic Log_ServerNotice()

Log_ServerNotice() sends a messages to all users having a given user mode set.


60eac5e952 Alexander Barton

New function Conn_IPA(): get client IP address as string


139d6303e7 Alexander Barton

ngircd.init: require $network $remote_fs when stopping ngircd


28f8b50174 Alexander Barton

Show SSL status in WHOIS, numeric 275

"I've been wanting this for years and finally took the 5 minutes to patch it in. I took the response code (275) from whatever's running OFTC's IRC network." -- Neale Pickett <neale@woozle.org>, Fri, 11 Jun 2010 17:32:41 -0500 (OFTC is running Hybrid ircd.)


e2930f3f5e Alexander Barton

Include correct header files when testing for arpa/inet.h (Closes: #105)

Tested on OpenBSD 4.7, OpenBSD 4.1, FreeBSD 8, Linux and Mac OS X. Thanks to rck <dev.rck@gmail.com> for reporting and testing!


059e707249 Alexander Barton

Revert "configure: make implicit declarations fatal"

This reverts commit b3a6c33da0b12ba74dc395979b677813d4bc2c0f. apparently not all gcc versions support this 8-(


b849e63fbf Alexander Barton

configure: make implicit declarations fatal

from bugzilla #105: "ngircd-16 works great under openbsd4.7/i386, but it segfaults on openbsd4.7/amd64." Caused by missing function prototypes and the resulting truncation of pointer to int. Lets try to catch these bugs during compilation instead of SIGSEGV.


55190f2d3d Alexander Barton

Don't access already freed memory in IRC_KILL()

It is not possible to call Conn_Close() after Client_Destroy() has been called, because Conn_Close wants to access the CLIENT structure which then has been freed already. Fix IRC_KILL to use Conn_Close() for local clients and Client_Destroy() for remote clients only (and never both).


6dc80bd195 Florian Westphal

fix "beeing" typo

reported by Fabio Scotoni via bugzilla #101.


df359835d1 Florian Westphal

SSL/TLS: fix bogus 'socket closed' error message

When we get there then the ssl handshake has failed, or we could not create a ssl context because ssl library initialization failed on startup. Reflect that in the log message.


defd7e09af Alexander Barton

ngIRCd release 16 (tags/rel-16)


29d448ed63 Florian Westphal

doc/SSL: remove line continuation marker

some people got confused by the '\' line continuation marker, thus put everything in a single line, even if the line gets overly long.


bdec5ac1f3 Alexander Barton

ngIRCd release 16~rc2 (tags/rel-16-rc2)


73fd26e9fa Alexander Barton

Don't reset counters on RESTART

When ngIRCd restarts, all the connection counters are preserved now, as well as the command counters for example. It's unclear if resetting or not resetting is the "correct" behaviour, but it's quite clear that the behaviour should be consistent for all the counters ngIRCd uses ... And initializing "WCounter", the global but temporary write counter, is not necessarry at all: it is initialized (reset) before its use in the command parser (see parse.c).


79e1ec2b1e Alexander Barton

New numeric RPL_STATSCONN (250): display connection statistics

The RPL_STATSCONN numeric (250) displays information about the highest simoultaneous connection count and the number of all accepted connections since the daemon started up. Used by ircd-Hybrid, Bahamut, and Unreal for example.


615d09459e Alexander Barton

Display total number of served connections on daemon shutdown


1338ade650 Alexander Barton

Enhace connection statistics counters

This patch enables ngIRCd to count the highest maximum simultaneous connections and all the connections accepted since startup. New functions: - Conn_Count(): get current connections - Conn_CountMax(): maximum simultaneous connections - Conn_CountAccepted(): number of connections accepted


21140500f1 Alexander Barton

Conn_Init: code cleanup


77ceb9f8ab Alexander Barton

Updated doc/Platforms.txt


b042363e88 Alexander Barton

Only include <netinet/in_systm.h> if it exists


6b0bb665c3 Alexander Barton

Include netinet/{in.h, in_systm.h} when checking for netinet/ip.h

This solves warning messages of autoconf on e.g. FreeBSD 8: configure: WARNING: netinet/ip.h: present but cannot be compiled configure: WARNING: netinet/ip.h: check for missing prerequisite headers?


1caa3fb94b Alexander Barton

Include netinet/in_systm.h alongside netinet/ip.h

This fixes the following error when compiling on e.g. FreeBSD 6.x: In file included from conn.c:40: /usr/include/netinet/ip.h:160: error: syntax error before "n_long" /usr/include/netinet/ip.h:163: error: syntax error before "n_long"


025342fe46 Alexander Barton

Fix gcc warning "ignoring return value of ..."

This patch fixes two warnings of gcc 4.4.3 when used with eglibc 2.11.1: ngircd.c: In function ‘NGIRCd_Init’: ngircd.c:801: warning: ignoring return value of ‘chdir’, declared with attribute warn_unused_result conn.c: In function ‘Simple_Message’: conn.c:2041: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result The first by checking the return code and an appropriate error message, the second by "better" ignoring it (which is correct there!) ...


628c6c962b Alexander Barton

Only compile in Get_Error() if really needed

This fixes "resolve.c:150: warning: ‘Get_Error’ defined but not used".


1ed49de83a Alexander Barton

Updated some more copyright notices, it's 2010 already (part 2)

Silly me forgot the most important place, the program output itself ...


bb914b93e9 Alexander Barton

Updated some more copyright notices, it's 2010 already :-)


50e8a62c5c Alexander Barton

ngIRCd release 16~rc1 (tags/rel-16-rc1)


aa32fec1b6 Alexander Barton

Updated NEWS and ChangeLog file for ngIRCd 16-rc1



20276f7cc9 Florian Westphal

configure.in: only add -lnsl when needed

dpkg-shlibdeps: warning: dependency on libnsl.so.1 [..] (they use none of its symbols). As shown via commit 2b14234abc252383679bae2d23861b773dc9713e (dpkg-shlibdeps: warning: dependency on libnsl.so.1) and the following revert of that commit, we cannot simply drop the AC_CHECK_LIB(nsl). Although -lnsl is indeed unneeded when glibc is used, some platforms (e.g. Solaris) need it. Use AC_SEARCH_LIBS instead to only link when the library exports a particular symbol.


6e8cf51bb2 Alexander Barton

Implement WEBIRC command

The WEBIRC command is used by some Web-to-IRC gateways to set the correct user name and host name of users instead of their own. Syntax: WEBIRC <password> <username> <hostname> <ip-address> The <password> must be set using the new configuration variable "WebircPassword" in the [Global] section of ngircd.conf. Please note that the <ip-address> is currently not used by ngIRCd (we don't store it in the CLIENT structure, only the resolved hostname).


53fc0ebff6 Alexander Barton

ngircd.conf.5: Document missing "Password" variable


9b3e143a26 Alexander Barton

Re-format Init_New_Client() function




e1de769ab9 Alexander Barton

Quote received messages of ERROR commands in log output


9f58418765 Alexander Barton

Implemented new "secure clients only" channel mode: +z

Only clients using a SSL encrypted connection to the server are allowed to join such a channel. But please note three things: a) already joined clients are not checked when setting this mode, b) IRC operators are always allowed to join every channel, and c) remote clients using a server not supporting this mode are not checked either and therefore always allowed to join.


ef157715a0 Alexander Barton

Clean up and document IRC_STATS() function


ecad9f32c8 Alexander Barton

Clean up and document IRC_JOIN() and join_allowed() functions


f58c8b94d9 Alexander Barton

Show our name (IRCD=ngIRCd) in ISUPPORT (005) numeric

Inspired by Hyperion IRC daemon.


3a2ac66f7f Alexander Barton

Added missing modes to USERMODES #define

Now the numeric 004 correctly reports all the supported user and channel modes (user modes "r" and "w" were missing), e. g.: :a.irc.net 004 a a.irc.net ngircd-15 aiorsw biIklmnoPstv


cf05bf31a7 Alexander Barton

Updated links to ngIRCd homepage (bug tracker, mailing list)



1ddc74f13e Alexander Barton

Really test for netinet/ip.h and set HAVE_NETINET_IP_H


75dabcaae5 Alexander Barton

ReverseLookup(): fix documentation comment



03cde2efd3 Alexander Barton

Connection functions: add some more documentation comments


cb6faed61c Alexander Barton

Clean up conn.{c|h} a little bit


c62c2d349b Alexander Barton

Xcode: fix "-Wuninitialized is not supported without -O"

Fix Apple Xcode warning "cc1: warning: -Wuninitialized is not supported without -O" when using the "Debug" build target: Detection of uninitialized automatic variable requires data flow analsys that is only enabled during optimized compilation.


60137a7139 Alexander Barton

Added i686/unknown/kfreebsd7.2-gnu


513a75c919 Alexander Barton

platformtest.sh: Only show latest commit

Only show latest GIT commuit ID as version number, even when the last commit has been a merge.


4f1b5400e9 Alexander Barton

Merge commit 'cade80dcf516f40e7d53124bc98526e6e5b3fb66'

* commit 'cade80dcf516f40e7d53124bc98526e6e5b3fb66': Added missing contrib/platformtest.sh to distribution


cade80dcf5 Alexander Barton

Added missing contrib/platformtest.sh to distribution (tags/rel-15)


28ca31e576 Florian Westphal

Remove limit on max number of configured irc operators.


c414d0bd3a Alexander Barton

ngIRCd release 15


bc88b2cb06 Florian Westphal

configtest: print ssl config options even when unset

Print "SSLOptionVar =" instead of omitting the option when running --configtest with ssl enabled. This better matches the behaviour of other options, e.g. ChrootDir.


bc1ac7fbc5 Alexander Barton

ngIRCd release 15~rc1 (tags/rel-15-rc1)


37e950a40c Alexander Barton

Updated NEWS and ChangeLog files


55c04e691d Alexander Barton

Make sure forwarded CONNECT commands are handled correctly


881b9af251 Alexander Barton

Generate WALLOPS message on operator-generated SQUIT


294320ed62 Alexander Barton

Enable SQUIT command for IRC Operators

This patch enables IRC Operators to use the SQUIT command as specified in RFC 2812, section 3.1.8 "Squit". When forwarding SQUIT commands, the server connected to the target will drop the connection (not the target server itself!). Please note: - the configuration option "AllowRemoteOper" mus be enabled on the server disconnecting the target to allow forwarding of SQUIT commands. - if the remote server is configured to establish the connection, it will just do this; so the disconnect is not permanent in this case!


03b70229eb Alexander Barton

Xcode: added new op.{c|h} to project file


9918dfc1d5 Alexander Barton

Use functions provided by op.c "module"

Local functions Check_Oper() and No_Privileges() have been replaced by global functions in op.c "module": Op_Check() and Op_NoPrivileges().


e46cf64cc1 Alexander Barton

New "module" op.c/op.h for IRC operator related functions

The new "module" op.c is used to implement functions related to IRC Ops. At the moment, these two functions are available: - Op_Check() to check for a valid IRC Op, and - Op_NoPrivileges() to generate "permission denied" messages.


113bd34878 Alexander Barton

Allow forwarding of CONNECT commands.

The syntax of the CONNECT command now is: - CONNECT <server-id> - CONNECT <server-id> <port> - CONNECT <server-id> <port> <target> - CONNECT <server-id> <port> <host> <my-pwd> <peer-pwd> - CONNECT <server-id> <port> <host> <my-pwd> <peer-pwd> <target> Note: the configuration option "AllowRemoteOper" mus be enabled on the target server to allow forwarding of CONNECT commands.



45b1a45c97 Alexander Barton

No_Privileges(): handle forwarded messages.



30b584c2e8 Alexander Barton

CONNECT, DISCONNECT: generate WALLOPS messages


eaaf0c3bd5 Alexander Barton

New function IRC_SendWallops().

Implement new global function IRC_SendWallops() that can be called by other functions to generate WALLOPS messages to users with +w mode.


9a7499af8b Alexander Barton

Code cleanup of IRC_DISCONNECT().



926204cacd Alexander Barton

New local functions Check_Oper() and No_Privileges().


3bf0c6f3b9 Alexander Barton

Bad_OperPass(): code cleanup.


f78b0c61e9 Alexander Barton

New configuration option "AllowRemoteOper"

Added new configuration option "AllowRemoteOper" to control whether remote IRC operators are allowed to use administrative commands that affect this server or not This commit introduces the configuration variable, but actually no function is using it. That's up for the next patches to come ...


fa09883c72 Florian Westphal

fix assertion failure in ng_ipaddr.c

when building with debugging enabled, but without ipv6 support, ngircd dumped core when loading a config file that specified an ipv6 listen address. ngircd: ng_ipaddr.c:45: ng_ipaddr_init: Assertion `sizeof(*addr) >= res0->ai_addrlen' failed.


affa03b277 Florian Westphal

configtest: complain when ssl keys are not readable


5b1efaee67 Alexander Barton

Check for sockaddr_in.sin_len and initialize it

Test for sockaddr_in.sin_len and initialize it to the correct value which some systems (notably Mac OS X) require. Note: this code path is only relevant when not using getaddrinfo().


d5f80b2a8d Alexander Barton

Always use get{addr|name}info() when available

Both getaddrinfo() and getnameinfo() are now used always when available, and not only when compiling ngIRCd with support for IPv6. This not only enables ngIRCd to handle multiple addresses per hostname when compiled without support for IPv6, but fixes binding ngIRCd to IP addresses on Mac OS X (and probably other BSD-based systems) as well: these systems require that sockaddr_in is zeroed out and sockaddr_in.sin_len is set to sizeof(sockaddr_in) like that: src/ipaddr/ng_ipaddr.c, line 54: assert(ip_str); + memset(addr, 0, sizeof *addr); + addr->sin4.sin_len = sizeof(addr->sin4); addr->sin4.sin_family = AF_INET; But this would break all the systems not using sockaddr_in.sin_len, for example Linux -- so we assume that all these systems provide getaddrinfo() and use that for now.


60fc4d6335 Alexander Barton

Xcode: add "debug" configuration to project


536538968c Alexander Barton

Fix cb_connserver() to handle aborted outgoing connections

A configured server could have been removed while a connection apptempt is still in progress. So the cb_connserver() callback has to test if the server configuration record is still valid.


4daf780f01 Florian Westphal

conn.c: fix more sizeof(..dst_addr) misuse

the wrong sizeof() usage fixed in d76910ce7b9fad5679b7c614ed086e036560e37d (conn.c: fix resolver server address backlog) was a bit more widespread, fix all others, too.


ed72bf4ceb Florian Westphal

resolve.c: fix valgrind 'uninitialized memory' warning

fix the following warning generated by valgrind if ipv6 is enabled: Syscall param write(buf) points to uninitialised byte(s) at 0x4000982: (within /lib/ld-2.9.so) by 0x80681A8: Resolve_Name (resolve.c:477) by 0x805439F: Conn_Handler (conn.c:1658) by 0x804AA7C: main (ngircd.c:331) The warning is because ng_ipaddr_t can be a union, and only the necessary parts are initialised. The callers know what part of the union is valid, so this is not a bug.


d76910ce7b Florian Westphal

conn.c: fix resolver server address backlog

if more than one ip address is returned for a single host name, ngircd is supposed to try other addresses in case connect() to the first address returned fails for some reason. Alexander Barton noticed that this did not work at all, as the additional results were not stored.


8fd0e29d46 Alexander Barton

Fix "implicit conversion shortens 64-bit value" warning

This patch fixes the following gcc warning in our sources: "implicit conversion shortens 64-bit value into a 32-bit value"


bfa48f3448 Alexander Barton

Xcode: use gcc 4.0 for Mac OS X 10.4 compatibility


66c6458ae7 Alexander Barton

Channel_Mode(): fix return code of function

Fix error handling of Channel_Mode() to return the correct connection status ("connected"/"disconnected") insted of always returning success.


3b37ad334b Alexander Barton

IRC_SERVER(): code cleanup, remove unneeded variable


c191ea53a9 Alexander Barton

IRC_PASS(): remove unnecessary variable initialization


e1598e2670 Alexander Barton

Conn_Close(): remove unused variable "txt"


44acf41cc1 Alexander Barton

Mac OS X: fix test for packagemaker(1) tool in Makefile


933da741c6 Alexander Barton

Fix --with-{openssl|gnutls} to accept path names

This patch fixes --with-openssl and --with-gnutls and enables both to accept path names, so that you can use "./configure --with-XXX=/path". All the other --with-XXX parameters support this already.


cf7e19193b Florian Westphal

do not add default listening port if ssl ports were specified

Cosmo Kastemaa reported that its impossible to create an ssl-only setup, as ngircd binds to port 6667 by default, even if setting "Ports =". Only add the default port if _both_ "Ports" and "SSLPorts" are unspecified. Fixes bugzilla #98.


5f1e43416a Alexander Barton

Fix LSB header of Debian init script


5debe20509 Alexander Barton

Use AM_SILENT_RULES([yes]), if available

Starting with GNU automake 1.11 "AM_SILENT_RULES([yes])" is available to make the build process less verbose ("Linux 2.6 style") which helps to spot warning and error messages. So we use it if it is available.


a7eef6666b Alexander Barton

Update NEWS and ChangeLog for next release


56a8abc253 Alexander Barton

Updated doc/Platforms.txt


21bb2bd658 Alexander Barton

New script contrib/platformtest.sh

This script analyzes the build process of ngIRCd and generates output suitable for inclusion in doc/Platforms.txt.


bddfd67550 Florian Westphal

doc/Platforms.txt: ngircd builds on hppa2.0w-hp-hpux11.11 target

Goetz Hoffart reports successful compile on HPUX/HPPA (on ngircd mailing list): Target: hppa2.0w-hp-hpux11.11 Compiler: gcc Compiler flags: -g -O2 -pipe -W -Wall -Wpointer-arith -Wstrict-prototypes -fstack-protector -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR='"$(sysconfdir)"' Libraries: -lz -lnsl Syslog support: yes Enable debug code: no zlib compression: yes IRC sniffer: no Use TCP Wrappers: no Strict RFC mode: no Zeroconf support: no IRC+ protocol: yes IDENT support: no I/O backend: "poll()" IPv6 protocol: no SSL support: no


805bf03490 Alexander Barton

Client_CheckID(): fix connection information

This patch fixes the following silly log messages: 'ID "XXX" already registered (on connection -1)!' If the ID is already registered on a local connection, the local connection ID is printed; and if the ID is connected via a remote server, "via network" is displayed.


63cbc6cd42 Alexander Barton

Fix return code of Conf_EnableServer()

Conf_EnableServer() only reports success if all required variables, including host name and port, are set for the specific server.


b3cacf86df Florian Westphal

AUTHORS: update my email address


0ef94edad7 Florian Westphal

add section and rfc number to comment about QUIT error


643ae1b48b Florian Westphal

enforce upper limit on maximum number of handled commands

reported on #ngircd: pasting lots of lines into a channel can kill off many people on the channel if the read buffer is drained quickly enough and the client-side TCP can't keep up with the incoming data. This implements a throttling scheme: - an irc client may send up to 3 commands per second before a one second pause is enforced. - an irc client may send up to 256 bytes per second before a one second pause is enforced. After discussion with Alexander Barton, server <-> server links are treated specially: There is no artificial limit on the number of bytes sent per second, and up to 10 commands are processed per second before a pause is enforced. It may be neccessary to make those limits tuneable to accomondate larger networks, but for now they are compile time values.


9b1c47220f Florian Westphal

conn.c: fix NumConnections imbalance

New_Server() can call Conn_Close() in its error paths, but that function decrements the number of current active connections. Thus we need to increment it earlier.



f31c3a3aa2 Florian Westphal

SSL/TLS: fix error path in gnutls ssl ctx allocation


b0931f322b Florian Westphal

manpage: move SSLConnect option to the right section


5196e9bcb1 Florian Westphal

SSL/TLS: remove redundant asserts/ifdefs


57aa64e117 Florian Westphal

SSL/TLS: proper indentation, remove erroneous comment


fd7e85b798 Alexander Barton

Update copyright notice, it's 2009 already!


b1852f3029 Alexander Barton

Updated Debian "changelog" file for ngIRCd 14.1 (tags/rel-14-1)


822c1e9265 Alexander Barton

ngIRCd release 14.1


5b4a3eda08 Alexander Barton

Added start/stop script for Red Hat based distributions

Script contributed by Naoya Nakazawa <naoya@sanow.net>.


a83554b572 Alexander Barton

Renamed contrib/ngircd.sh to contrib/ngircd-bsd.sh


627b0b713c Alexander Barton

security: fix remotely triggerable crash in SSL/TLS code

When a server is running with SSL/TLS support compiled in, it is trivial to crash the server by sending an MOTD request via another server in the network. - ONLY servers without ssl/tls support compiled in are not affected. Disabling SSL in the configuration (no ssl listening ports, etc) does NOT help. - servers that are running standalone (i.e., not connected to any other servers) are not affected, either. This affects all ngircd releases since ngircd 13 (earlier versions have no SSL/TLS support).


95428a72ff Alexander Barton

Fixed "Conflicts:" line in debian/control: missing comma


6b83d1740e Alexander Barton

Debian: build ngircd-full-dbg package

In addition to the "ngircd" and "ngircd-full" packages a new package named "ngircd-full-dbg" is build: this package contains all the features of the "full" package but includes debug code and both the --debug and --sniffer options and the resulting binaries are _not_ stripped.


c8bba8e5c3 Alexander Barton

debian/rules: whitespace fixes


37359799eb Florian Westphal

Fix server list announcement

When ngircd announces the list of currently known servers to a new (connecting) server, it sent the introducer of the servers instead of the top server. Assuming this network: irc1.example.com |--irc2.example.com | `--irc3.example.com | `--irc4.example.com `--irc5.example.com When irc4 connects to irc3, irc3 tells irc4 that irc5 was connected to irc2. (irc2 had introduced irc5 to irc3; but thats not what ngircd should have sent to the new server). This also placed users on the wrong servers.


4a14fb252d Alexander Barton

Doxygen: update source code repository link to GIT


9b59f043c8 Florian Westphal

allow ping timeout quit messages to show the timeout value


b545d38ae4 Florian Westphal

irc-server: do not remove hostnames from info text

that code does not really make sense -- the info text is freely cofngiureable and des not follow a specific format. Also, that "+2" might have caused invalid memory accesses.


84eaed6c9a Florian Westphal

conn-zip: fix error handling

callers of (Un)Zip_Buffer() assume that the function closes the connection on error. However, this was not always the case.


544b9884f4 Florian Westphal

remove or translate old comments


5e16b6df2d Florian Westphal

client.c: remove unecessary comments


ea041b8838 Florian Westphal

add const qualifier to pointers where possible


68835a1d1a Alexander Barton

ngIRCd release 14 (tags/rel-14)


54879b432b Alexander Barton

Display IPv6 addresses as "[<addr>]" when accepting connections.

With this patch ngIRCd displays IPv6 addresses as "[<addr>]:<port>" when accepting new connections and later, if no successful DNS lookup could be made (or DNS is disabled altogether).


d9355d53f8 Alexander Barton

Xcode: #define include __DATE__ in VERSION

Change VERSION to include the __DATE__ when compiling from within Xcode. When building using "make xcode" or "make osxpkg" VERSION already is defined to the "real" version number set in configure.in.



166ab3925e Alexander Barton

Fix up last Debian changelog entry


1f6a5744f6 Alexander Barton

ngIRCd release 14~rc1 (tags/rel-14-rc1)


156569d263 Alexander Barton

Updated NEWS and ChangeLog files


c3a8d6a73e Alexander Barton

Updated Debian/Linux init script

- PidFile, ServerUID and ServerGID are read from actual server configuration - Exit code and behaviour is more LSB compliant - New "status" and "test" sub-functions


3a7d59c1ac Florian Westphal

misspelling in ERR_NORECIPIENT reply


51b88b12f3 Alexander Barton

Add missing contributors to AUTHORS file


ea35ba74b6 Florian Westphal

testsuite: add more predefined channels to server config

make sure it creates & and +, and accepts channel names without a special character (ngircd should treat 'Name = chan' as 'Name = #chan').


2d4361d088 Florian Westphal

allow creation of persistent modeless channels


e9e7fc33f1 Florian Westphal

add and use Channel_IsModeless()

avoid "name[0] == '+'" where possible, having Channel_IsModeless() makes things much more obvious.


c09742c518 Alexander Barton

Enhance INFO command to report compile time, if available


c56ab96270 Alexander Barton

Update NEWS and ChangeLog files


0a9608a26f Alexander Barton

Channel mode changes: break on error

Don't echo multiple syntax error messages (461) on invalid commands, but break after the first one. In addition, this solves corrupted 'Unknown mode "+' messages.


dee89c2355 Alexander Barton

Channel_Mode(): code cleanup (no functional changes)


b8c6dd503f Florian Westphal

TLS/SSL: remove useless error message when ssl connection is closed

When using OpenSSL, the following annoying "error" message was logged whenever an encrypted connection was shut down in a orderly fashion: TLS/SSL Connection shutdown: ConnSSL_Read: Unable to determine error of course, this isn't an error at all.


66d6c3c84b Florian Westphal

update ChangeLog.


2fce4667a8 Florian Westphal

SSL/TLS: clear all ssl realted flags on shutdown

one ssl related flags was not cleared on ssl shutdown. introduce and use CONN_SSL_FLAGS_ALL to zap them all.


c6a43fbaf0 Florian Westphal

TLS/SSL: fix memory leak when using compressed server links with ssl

commit 6bc2d3d06e9cb4da68ea4b63d9b6b219d88ab927 (New connection option CONN_RFC1459) forgot to adjust the ssl bitmasks. The result is that when a compressed AND encrypted server link goes down the memory allocated by zlib and the r/w buffers are no longer free'd as the previous ConnSSL_Free() would then also remove the CONN_ZIP flag from the flag mask.


3be9c477be Alexander Barton

Fix spelling of log message: "channek" vs. "channel" ...


d09094812f Alexander Barton

Channel key file: store file name and open on each access.

Store the file name of channel key files and reopen them on each access (on each JOIN command) insted of just storing the file handles. This eliminates the special requirements (no delete) and makes sure that always the actual file contents are used in all circumstances.


c5000694d1 Alexander Barton

Support individual channel keys for pre-defined channels.

This patch introduces the new configuration variable "KeyFile" for [Channel] sections in ngircd.conf. Here a file can be configured for each pre-defined channel which contains individual channel keys for different users. This file is line-based and must have the following syntax: <user>:<nick>:<key> <user> and <nick> can contain the wildcard character "*". Please not that these channel keys are only in effect, when the channel has a regular key set using channel mode "k"!


2c1b6280fa Alexander Barton

RFC 2812, sec. 3.3.1: really check for the last dot

This fixes commit 5a3128243f4b60 and makes the test suite ("make check") run again without errors.


5a3128243f Florian Westphal

irc.c: reject masks with wildcard after last dot

RFC 2812 says in section 3.3.1 ("Private Messages"): The mask MUST have at least 1 (one) "." in it and no wildcards following the last ".".


95e8320ca9 Florian Westphal

irc.c: Fix handling of channels containing dots

commit 2546a13ad2949192eb70bf21e114ec60af287ee4 ('Cumulative Message Patch') broke PRIVMSG to channels containing dots. Fix this by switching evaluation order: Check first if the target matches a existing channel and only do a check for target masks if that failed. PRIVMSG with host/server masks is described in RFC 2812, section 3.3.1. Makes one wonder how a server is _really_ supposed to tell the difference between hostmasks and channel names. Sigh.


8f46681bc8 Alexander Barton

Update ngircd.spec file

- Change Copyright to License - Update URL - Make BuildRoot use %{_tmppath} macro - Add basic BuildRequires - Compile with zlib and openssl - Install all docs in standard document location Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>


1c7b9dbe93 Florian Westphal

remove unneeded LOG_DEBUG when not compiling with DEBUG support

when ngircd is build without DEBUG enabled, LOG_DEBUG messages are always discarded. To avoid the extra code, ngircd has a LogDebug() wrapper which gets removed by the compiler when compiling without DEBUG defined. Update a few functings which were using the Log(LOG_DEBUG, .. interface directly without #ifdef DEBUG guards. text data bss dec hex filename 127748 1900 28280 157928 268e8 ngircd.before 126836 1896 28280 157012 26554 ngircd.after


0acef7c598 Florian Westphal

documentation: gnutls does not support password-protected privkeys

already mentioned in man page and sample config file, but for completeness also document it in doc/SSL.txt.


00c8dfa8be Alexander Barton

Mac OS X: update texts for Mac OS X Installer.app


75243ffb37 Alexander Barton

Xcode: build ngIRCd with IPv6 support on Mac OS X


5468ba3744 Alexander Barton

Xcode: get release number dynamically; new make target "xcode-clean".

- make target "xcode" now detects the release number stored in the configure.in file and passes it to Xcode. - new make target "xcode-clean" which removes all files generated by "make xcode" and removes the Xcode build directory.


eb159e0a8d Alexander Barton

Xcode: define TARGET_VENDOR and TARGET_OS


df3473c9c1 Alexander Barton

Add new and missing files to Mac OS X Xcode project



175f0af979 Alexander Barton

Clean up channel allocation table on shutdown/restart.

Silly bug: the condition of a while() loop in the Channel_Exit() function used the wrong variable and therefore got never executed ... This bug is in the code since the beginning (see commit bb19cfda in 2002); shame on me!


40a0e9abbe Alexander Barton

Add Channel_Free().

Central function to free a channel structure and all its resources (invite/ban lists, topic, ...).


0659503afd Alexander Barton

Clean up (reformat and comment) Delete_Channel() function.


18efc7469c Alexander Barton

Free topic array on channel deletion.

The topic array in the CHANNEL structure must be free()'d before the channel itself becomes deleted.


fd9266df78 Alexander Barton

Fix spelling in some documents.


0e4e22a7a6 Alexander Barton

Allow pre-defined server local channels ("&").


9d20397470 Alexander Barton

Spell check and enhance ngIRCd manual pages.


307cdce908 Florian Westphal

man ngircd.conf: line break missing before the SSLConnect description

reported by Christoph Biedl.


dc9f42dc3c Florian Westphal

defines.h: remove MAX_LISTEN_PORTS, MAX_SERVICES

_SERVICES was never used; _LISTEN_PORTS is a leftover from commit 51ccb5928ad1453b0593fedd934298384d09e619 ('internal changes needed for future ssl support').


a971047bc5 Florian Westphal

Remove limit on max number of predefined channels.

This resolves Bugzilla Bug 68 ('Too many pre-defined channels configured.')


6500d443fc Florian Westphal

channel.c: constify a few function arguments.


d26a283ea9 Florian Westphal

use %ld as format specifier for posix data types

in the same vein as the earlier commit: cast posix data types (pid_t, ...) to long and use %ld as format specifier. This will avoid problems when sizeof(int) != sizeof(type). We could also cast to int, but this might truncate the value.


4b83a23d9d Alexander Barton

ngIRCd release 13 (tags/rel-13)


8a94ec9728 Florian Westphal

don't print pid_t type with %ld format specifier

Reported by Christoph Biedl: ngircd[21581]: Running as user irc(39), group irc(39), with PID 140733193409613. cast pid_t to long to avoid this. While we are there, cast uid_t and gid_t, too.


e5fea5380d Alexander Barton

Update the date ("Dec 2008") of the manual pages.


9a82ca0d6b Alexander Barton

doc/Platforms.txt: added x86_64/unknown/linux-gnu


e573f54b0c Alexander Barton

doc/Platforms.txt: update list of tested platforms.


e070d93f64 Alexander Barton

doc/SSL.txt: enhance documentation.



85ce82e504 Alexander Barton

Testsuite start-server.sh: return correct exit code.

src/testsuite/start-server.sh returns 0 when no errors occurred and the daemon has been startet and 1 on errors. Always returning 0 is wrong ...



56cf95278e Alexander Barton

doc/Services.txt: document using ngIRCd with IRC Services.


d0b2526a01 Alexander Barton

sample-ngircd.conf: remove now unused CVS "$Id$"


7cf9d93aee Alexander Barton

ngIRCd release 13~rc1 (tags/rel-13-rc1)


ffc5f93ef5 Alexander Barton

Fix double minus signs in manual pages

This patch fixes the following lintian(1) warning: "Manual page seems to contain a hyphen where a minus sign was intended. '-' chars are interpreted as hyphens (U+2010) by groff, not as minus signs (U+002D). Since options to programs use minus signs (U+002D), this means for example in UTF-8 locales that you cannot cut&paste options, nor search for them easily. '-' must be escaped ('\-') to be interpreted as minus."


97d97ef5c4 Alexander Barton

Debian package ("make deb"): fix some lintian(1) warnings


2eb564ccaa Alexander Barton

Change formatting of some log messages

- Fix formatting of some log messages, mostly punctuation. - cb_Connect_to_Server(): don't use string concatenation, because it is not supported by pre-ANSI C compilers ...


14baf64f41 Alexander Barton

Fix pem_passwd_cb(): unused variable "rwflag" (OpenSSL)

This patch fixes the following warning of GCC (version 4.3.2) in function pem_passwd_cb() when compiling with OpenSSL support and without debug code: conn-ssl.c: In function 'pem_passwd_cb': conn-ssl.c:122: warning: unused parameter 'rwflag'


4c113d8850 Alexander Barton

New configuration option "NoIdent" to disable IDENT lookups

The new configuration option "NoIdent" in ngircd.conf can be used to disable IDENT lookups even when the ngIRCd daemon is compiled with IDENT lookups enabled.


3243d9ee44 Alexander Barton

Implement the IRC command "SERVLIST"

The IRC command "SERVLIST" lists all the registered services, see RFC 2811, section 3.5.1. The syntax is "SERVLIST [<mask> [<type>]]". The parameter <type> is not used by ngIRCd at the moment, all registered services are of type 0 (which is the default when omitted).


672b391523 Alexander Barton

Updated NEWS and ChangeLog, using NEWS for news only :-)


0eda085f1e Alexander Barton

Create local &SERVER channel and log server messages to it

ngIRCd now creates a server-local channel &SERVER with channel modes +mnPt (moderated, no messages from outside the channel, persistent and with the topic locked) and logs all the messages to it that a user with mode +s ("server messages") receives. If an IRC operator withdraws the +P ("persistent") mode and the &SERVER channel is freed because of no members, nothing special happens. The channel can be recerated any time later and ngIRCd would begin logging to it again.


2cc21caf32 Alexander Barton

Implement local channels (prefix "&")

This patch implements server-local channels, prefix "&", that are only visible to users of the same local server and not in the network. Patch written by Scott Perry (2008-06-04), see: - http://arthur.barton.de/cgi-bin/bugzilla/show_bug.cgi?id=87 - http://arthur.barton.de/cgi-bin/bugzilla/attachment.cgi?id=24&action=view


7b69bc2ae8 Alexander Barton

Added some missing files of GIT tree to distribution archives

The following bits and bytes were not included in distribution archives: - contrib: ngindent, ngircd.sh - contrib/Debian: ngircd.postinst - contrib/MacOSX: preinstall.sh, postinstall.sh - doc/src: Doxyfile, header.inc.html, footer.inc.html, ngircd-doc.css - src/portab: splint.h


7ad167f4c4 Alexander Barton

Test suite: start two servers and test server-server links

I changed the test suite to start two test servers (on port 6789 and 6790), so server-server links can be tested as well for which I included the new test script "server-link-test.e". In addition the documentation of the test suite (src/testsuite/README) has been updated and is more complete now.


920d0636ff Alexander Barton

Add conf-ssl.h to "noinst_HEADERS"

conf-ssl.h must be listed in "noinst_HEADERS" so that it becomes included in distribution archives generated by "make dist" and "make distcheck".


54e6a2dce5 Alexander Barton

Re-add CVE identifiers to ChangeLog.

I'm lame. My last commit removed all the CVE numbers recently added in commit 598df0758 to the ChangeLog ... shame on me! See all the CVE entries of ngIRCd at: <http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=ngircd>



9f067a059d Alexander Barton

Connection counter: count outgoing connections as well.

This patch lets ngIRCd count outgoing connections as well as incoming connections (up to now only outgoing connections have been counted). This change is required because the Conn_Close() function doesn't know whether it closes an outgoing connection or not and therefore would decrement the counter below zero when an outgoing connection existed -- which would trigger an assert() call ... Please note that this patch changes the (so far undocumented but now fixed) behaviour of the "MaxConnections" configuration option to account the sum of the in- and outbound connections!


5a91d62100 Alexander Barton

Ignore numeric 020 ("please wait while we process your coinnection")

Some servers send the numeric 020 ("please wait while we process your connection") when a client connects. This is no useful information for this server, so we simply ignore it :-)


3a5b7b63ae Alexander Barton

GNUTLS: define new API types when installed library is too old

This patch enables ngIRCd to use GNUTLS in really old versions, tested with version 1.0.16, that don't define the "new" data types ending in xxx_t. LIBGNUTLS_VERSION_MAJOR isn't defined there as well, so we use it to test if we must define the new types on our own.



027cf22267 Alexander Barton

Console log: output timestamp (seconds since start of daemon)


125c05fba0 Florian Westphal

conn-ssl.c: work around gnutls API problems on 64 bit platforms

Alexander Barton reported a compiler warning on 64-bit platforms: cc1: warnings being treated as errors conn-ssl.c: In function 'ConnSSL_Init_SSL': conn-ssl.c:403: error: cast to pointer from integer of different size Unfortunately, I couldn't find a real solution; the GNUTLS API expects 'gnutls_transport_ptr_t' (which is void*), but the default push/pull functions (send/recv) expect an int. The only alternative solution is to pass in an address to the file descriptor, then add send/recv wrappers that expect a pointer. What a mess[tm].



34b2f0085d Alexander Barton

Fix ForwardLookup(): "ISO C90 forbids specifying subobject to initialize"

This patch fixes the following warning of GCC (version 4.3.2) in function ForwardLookup(): resolve.c: In function 'ForwardLookup': resolve.c:282: warning: ISO C90 forbids specifying subobject to initialize resolve.c:284: warning: ISO C90 forbids specifying subobject to initialize resolve.c:285: warning: ISO C90 forbids specifying subobject to initialize


ce2541a826 Alexander Barton

Fix ConnSSL_LogCertInfo(): unused variable "cred" (GNUTLS)

This patch fixes the following warning of GCC (version 4.3.2) in function ConnSSL_LogCertInfo() when compiling with GNUTLS support: conn-ssl.c: In function 'ConnSSL_LogCertInfo': conn-ssl.c:542: warning: unused variable 'cred'


d44a7dac26 Alexander Barton

Debian: build ngircd-full with support for GNU TLS and IPv6.


475ce1e93c Alexander Barton

Debian: make sure that /var/run/ircd is owned by user "irc".


0cba8f362a Alexander Barton

GIT: Ignore Debian-related generated files.

Added files that become generated while building Debian GNU/Linux packages of ngIRCd to the .gitignore lists.


afd65bc728 Alexander Barton

Updated config.{guess|sub} to version 2008-01-16.




1d6dcb25c4 Alexander Barton

Document the server flag "S": SERVICE command is supported.


178f9cbdac Alexander Barton

Announce IRC services in the network.

This patch - introduces a new server flag "S" to indicate that the server can handle the SERVICE command (on server links), - implements the IRC command "SERVICE" for server-server links, - uses the "SERVICE" command to announce IRC services when a new server connects to it, - and fixes the Send_Message() function to let it send messages to services using a "target mask". If the remote server doesn't indicate that it can handle the "SERVICE" command (it has not set the "S" flag), services are announced as regular users as before.



28e9888764 Alexander Barton

Convert SQUERY to PRIVMSG on RFC 1459 compliant links.



3913de3cff Alexander Barton

Fix PRIVMSG/NOTICE handler (II): keep command when forwarding to channels.

- new function ngt_UpperStr(). - change Channel_Write() to take command name and error flag. - remove now unneeded function Channel_Notice().


91e87a3705 Alexander Barton

New function ngt_UpperStr()



d93030ad27 Alexander Barton

Make real use of the CLIENT_SERVICE client type.

This patch enables ngIRCd to handle IRC services as real services, and not as "fake users": - Set correct client type CLIENT_SERVICE for services, - Change log messages to include correct client type, - PRIVMSG: allow users to send messages to services, - Send services nick names to other servers (as users). Please note that this patch doesn't announce services as services in the network, but as regular users (as before). Only the local server knows of services as services (see LUSERS command, for example). It is up to one of the next patches to fix this and to introduce the SERVICE command in server to server communication. The propagation of services as regular users between servers doesn't limit the functionality of the IRC services and will be the fallback for servers that don't support "real" services propagation in the future.


4e125fb67c Alexander Barton

Allow IRC services to change their nick names.


33f32dbd67 Alexander Barton

New function Client_TypeText() and Destroy_UserOrService().

Client_TypeText() is used to get correct naming ("Client", "Service", ...) for log messages, and Destroy_UserOrService() is used to correctly destroy user and services clients.


74aac88dbf Alexander Barton

Send_Message(): really enforce target client type.



02d7623074 Alexander Barton

Allow ngIRCd to detect services connected to an "virtual services server".

Introduce a new configuration variable "ServiceMask" in SERVER blocks to define a mask matching nick names that should be treated as services. Regular servers don't need this parameter (leave it empty, the default), but you should set it to "*Serv" when connection ircservices, for example. This patch allows ngIRCd to detect services, it doesn't change the functionality: you only get different log messages ;-)


c5342fb467 Alexander Barton

Centralize logging functions in Introduce_Client().


557be8c56b Alexander Barton

Get rid of INTRO_INFO structure again: we don't need it at all!

All the required information is already stored in the CLIENT structure of new new connection, so pass this to Introduce_Client() and don't invent an unneeded new structure ...


687784d276 Alexander Barton

Announce_User(): support RFC 1459 compatibility mode.


92603f7c80 Alexander Barton

Introduce_Client(): send MODES in RFC 1459 mode, too.


d070ec08ab Alexander Barton

numeric.c: whitespace fixes ...


a60465be3e Alexander Barton

Server links: detect RFC 1459 mode direct after SERVER command

This patch allows ngIRCd to detect right after receiving the SERVER command from the peer whether the RFC 1459 compatibility mode must be used or not. And it fixes the announcement of users during establishing new server links with such peers.


14048c4717 Alexander Barton

Send and handle NICK+USER commands for user registration (RFC 1459).

This patch enables ngIRCd to deal with NICK and USER commands following RFC 1459 to register new clients, and to send these commands instead of one full NICK command as specified in RFC 2813 on connections that are in RFC 1459 compatibility mode. Can be useful for e. g. IRC services that simulate a RFC 1459 server.




6bc2d3d06e Alexander Barton

New connection option CONN_RFC1459.

This new connection option CONN_RFC1459 indicates that the peer on this link only supports the IRC protocol as defined in RFC 1459 and that the compatibility mode (e. g. for outgoing commands like NICK) should be used.


a5735f68d7 Alexander Barton

New global function Conn_SetOption().


13f1d57e84 Alexander Barton

USER: servers and services can alter user information after registration.

This is required to do RFC 1459 style user registration on server links, and is used by some services packages, too. See RFC 1459 section 4.1.3.


068d43352d Alexander Barton

NICK: allow servers and services to use RFC 1459 syntax (2 parameters).

This patch allows servers and services to call the NICK command using the syntax defined in RFC 1459 to register new users, with only two parameters. See section 4.1.2. Useful for some services packages, which emulate this protocol.


e56bd8ff89 Alexander Barton

Whitespace fixes: remove trailing tabulator characters.


2fce881d96 Florian Westphal

conn-ssl.c: don't append a newline to ConnSSL_GetCipherInfo


ef3327d372 Florian Westphal

TLS/SSL support: code changes.

This adds the required code to enable ssl/tls support during compile and run time, respectively.


ebf5edfd87 Florian Westphal

TLS/SSL support: documentation.


bdd44eb0ab Florian Westphal

TLS/SSL support: core files.

Contains support for both OpenSSL and GNU TLS. Certificate Authentification is not yet supported.


c997e04325 Florian Westphal

Fix handling of MaxConnections option

Config option claimed to be 'number of connections' but in reality this was treated as 'largest file descriptor allowed'. This also fixes another bug in New_connection, where the ng_ipaddr_tostr_r error path was missing a return statement.


2c2c93e311 Alexander Barton

Include "mcheck.h" when using mtrace().


41a23d20e4 Alexander Barton

SECURITY: Fixed a message handling bug which could crash the daemon.

Some message targets could lead to a NULL pointer dereference and therefore could crash the daemon (denial of service). (cherry picked from commit e493ad2d30ff80bca2556cde2212e367cb006517)


c769cbecb6 Alexander Barton

Enable GNU libc "memory tracing" when compiled with debug code.

This patch lets ngIRCd activate "memory tracing" of the GNU libc when compiled with debug code (configure: --enable-debug) and the functionality is available on the system. (http://www.gnu.org/software/libc/manual/html_node/Allocation-Debugging.html)


707cc42dec Alexander Barton

New make target: "osxpkg" to create an Mac OS X installer package.

This patch adds a new make target, "osxpkg", to the main Makefile which gereates a Apple Mac OS X installer package of ngIRCd. The packagemaker(1) project bundle is stored in contrib/MacOSX/ngIRCd.pmdoc.


30f1ed211d Alexander Barton

Clean up Mac OS X Xcode environment.

- Remove obsolete contrib/MacOSX/cvs-version.h - Change SDK to 10.4



598df07584 Alexander Barton

Added CVE identifiers to ChangeLog.

see http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=ngircd



dfc3de131c Alexander Barton

Make ngIRCd compile and run on NeXTSTEP 3.3 and OPENSTEP 4.2

by Steven D. Blackford <kb7sqi@aol.com>: "I wanted to let you know that I've done a quick port of ngircd-0.12.0 for NEXTSTEP3.3/OPENSTEP4.2. There wasn't a lot of changes required to get it to compile clean, but I did make the necessary changes so that I didn't have to use -posix flag. The NeXT has a pretty buggy POSIX implementation so I always try to work around it. :-) Anway, here's the changes required to get it to compile."


338c643250 Alexander Barton

Merge branch 'master' of git://ngircd.barton.de/ngircd



0ca8156efd Florian Westphal

FAQ: add entry about /OPER and OperCanUseMode


ccbbd7d1a5 Alexander Barton

GIT: added src/testsuite/message-test to ignore list.


e5cf73b9ee Alexander Barton

Fix Validate_Args(): unused parameter "Idx" and "Req"

This patch fixes the following error message of GCC (tested with version 4.3.0) when not compiling ngIRCd in "strict RFC" mode: parse.c: In function "Validate_Args": parse.c:341: error: unused parameter "Idx" parse.c:341: error: unused parameter "Req"


5df56111c4 Alexander Barton

message-test: Disable two tests using "localhost" as host name

Some operating systems, for example OpenBSD and OpenSolaris, use "localhost.<domain>" instead of just "localhost" for 127.0.0.1, so the "message-test" using "localhost" failed on such systems. Don't have an idee how to make this work on all platforms ... :-/ So I simply disabled the two affected tests to make the testsuite run on OpenBSD and OpenSolaris again.


e5174c629c Alexander Barton

Fix Send_Message(): "lastCurrentTarget" may be used uninitialized

This patch fixes the following warning of GCC 4.3.1: irc.c: In function "Send_Message": irc.c:315: error: "lastCurrentTarget" may be used uninitialized in this function


3358ad07d7 Alexander Barton

Fix t_diff(): declaration of 'div' shadows a global declaration

This patch fixes the following GCC warning message: irc-info.c:422: warning: declaration of 'div' shadows a global declaration




d4eb55c79f Alexander Barton

Cleaned up PRIVMSG and NOTICE patches.


2546a13ad2 Alexander Barton

Cumulative Message Patch


b92a7627f3 Alexander Barton

Don't allow empty channel names ("#") in strict RFC mode.

This closes Bug #88. Patch proposed by Eric <egrunow@ucsd.edu>, but with wrong length comparision: please note that Channel_IsValidName() checks the name INCLUDING the prefix, so the test must be length<=1!


258143897c Alexander Barton

Return 461 (syntax error) on "JOIN :" and "PART :"

Up to this patch ngIRCd did not return any result (GIT master) or a badly formated 403 (":irc.server 403 test :No such channel" [note the two spaces!], branch-0-12-x) on the above commands, this patch changes the behaviour to reflect ircd 2.11 which returns 461 in both cases.


477f2fd9e7 Alexander Barton

Channel_Join(): Code cleanup.



3f01324160 Alexander Barton

Fixes to misc-test: accept "localhost.<domain>" as well as "localhost"

Some operating systems, for example OpenBSD, use "localhost.<domain>" instead of "localhost", so the "who-test" expecting "localhost" failed on such systems. (Please see 149859c5fecc..., which fixes this for the who-test already)


4467d127c2 Alexander Barton

Revert "dpkg-shlibdeps: warning: dependency on libnsl.so.1 [..]"

- Solaris needs both -lsocket _and_ -lnsl - A/UX needs -lUTIL "... which totally sucks because we'd link libnsl on Linux, too (where its not needed at all). So, we have to figure out how to tell autocrap to NOT put -lnsl there unless it exports a symbol we need. This also means that [...] has to be reverted (or done properly)." -- Florian Westphal @ #ngircd This reverts commit 2b14234abc252383679bae2d23861b773dc9713e.


2b14234abc Alexander Barton

dpkg-shlibdeps: warning: dependency on libnsl.so.1 [..]

(they use none of its symbols). So, rip out that AC_CHECK_LIB cruft, pointed out by Christoph Biedl. If there are platforms that really need that we should only link when we actually use these libraries.


b945726ac2 Alexander Barton

Merge autogen.sh changes

Merge commit 'alex/master'


da160d020e Alexander Barton

autogen.sh: Don't set AUTO{CONF|MAKE}_VERSION and WANT_AUTO{CONF|MAKE}

On some systems (for example Gentoo Linux, FreeBSD, and OpenBSD), these variables are used to select which version of GNU automake and autoconf to use, but we shouldn't depend on a specific version -- instead we should use the "system default". So probably it is up to the user to set these variables accordingly to set up some wrapper scripts of his operating system distribution.


71562ebe57 Florian Westphal

Translated comments from German to English


b95345731e Alexander Barton

autogen.sh: correctly test for and export ACLOCAL variable


258e39e89f Alexander Barton

Fix GCC warnings for possibly uninitialized variables in IRC_JOIN

This patch fixes the following two warnings of GCC 4.2.4: irc-channel.c: In function "IRC_JOIN": irc-channel.c:185: warning: "lastkey" may be used uninitialized in this function irc-channel.c:185: warning: "lastchan" may be used uninitialized in this function


e142c50ae6 Alexander Barton

GIT: added src/src/config.h.in~ to ignore list.


a84f7dcee5 Alexander Barton

Allow mixed line terminations (CR+LF/CR/LF) in non-RFC-compliant mode

Up to now ngIRCd accepted CR+LF as well as a single CR or LF in "non RFC compliant" mode (the default). But ngIRCd became confused when it received data containing mixed line endings (e. g. "111\r222\n333\r\n"). This patch enables ngIRCd (in "non RFC compliant" mode) to detect CR+LF, CR, and LF as equally good line termination sequences and to always end the command after the first one detected. Some clients (for exmaple Trilian) are that ... broken to send such mixed line terminations ... First patch proposed by Scott Perry <scperry@ucsd.edu>, Thanks to Ali Shemiran <ashemira@ucsd.edu> for testing!


8644cbf197 Alexander Barton

Don't allow stray \r or \n in command parameters

If ngircd receives an input line like "COMMAND arg\nIRRELEVANT\r\n", "arg\nIRRELEVANT" is passed as an argument to COMMAND. This can lead to output like: :ngircd.test.server 322 nick #chan 1 : topicwithprecedingnewline :ngircd.test.server 322 nick #nxtchan 1 : [..] Worse, this allows clients to piggyback irc commands, e.g. "TOPIC #a :test\n:fake!~a@nonexistant JOIN :#a\r\n", which causes the client to receive a JOIN command during /LIST output. Bug reported by Scott Perry, first patch by Florian Westphal.


4c121f277d Alexander Barton

GIT: ignore de.barton.ngircd.plist, it is a generated file.


12f5b0579b Alexander Barton

ngircd.init: use LSB logging functions, if available.


6f7b669bec Alexander Barton

--configtest: return non-zero exit code if there are errors


951314cb79 Alexander Barton

Handle_Buffer(): code cleanup.

Both callers ignore the return code of this function, so get rid of it, but make sure that the client is disconnected on errors.


d360871394 Alexander Barton

Conn_Handler(): cleanup code, add/translate comments.

In addition, the "timeout" variable has been removed because it is unnecessary today: Handle_Buffer() handles all the data it can handle, and io_dispatch() returns immediately when new data is available. So we don't have to double-check but better sleep. Pointed out by Florian.


b90f71ca2a Florian Westphal

Use strtok_r instead of strchr in IRC_JOIN.

This patch does significant cleanup on the join code by using strtok_r instead of mangling strchr to parse channel names and keys in parallel when a JOIN command contains a list of channels and keys. Also adds an strtok_r implementation to libportab.



73f7201ab3 Florian Westphal

configure.in: don't check for "obvious" standard functions.

Drop checks for the following C standard functions: malloc, memmove, memset, realloc, strchr, strcspn, strerror, strstr. Rationale: These are standard K&R/C89 functions, no point in ''making sure they exist''.


956bbe2c28 Alexander Barton

Reset client idle time on NICK, JOIN, and PART


e19f7a8c19 Florian Westphal

Remove ListenIPv4/ListenIPv6 options.

Use "Listen = list,of,addresses" instead.


4ed2cb1a02 Florian Westphal

make Listen parameter a comma-seperated list of addresses.

this also obsoletes ListenIPv4 and ListenIPv6 options. If Listen is unset, it is treated as Listen="::,0.0.0.0". Note: ListenIPv4 and ListenIPv6 options are still recognized, but ngircd will print a warning if they are used in the config file. Also, some plattforms require that ai_socktype is set in the getaddrinfo() hints structure.


818a206a42 Alexander Barton

Add option aliases -V (for --version) and -h (for --help).

This patch adds -h and -V short options (to complement the usage). It is based on a patch attached to Debian bug #466063, see <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=466063>. Idea by Jari Aalto <jari.aalto@cante.net>, patch adapted by Alexander Barton <alex@barton.de>.


1d9067b019 Florian Westphal

Add FAQ entry for 'Where is the log file'?


5d87f6ba80 Florian Westphal

Add tests for MOTD, VERSION, TIME, USERHOST

The misc-test.e file is also somewhat reorganized and commented here. Patch from Brandon Beresini, Bryan Caldwell and Dana Dahlstrom.


7cf187c09f Alexander Barton

Updated list of authors (AUTHORS file)


9486bc7465 Alexander Barton

Update master development branch

- use "dev" instead of "HEAD" as "version number", - update ChangeLog and NEWS to reflect the 0.12.0 release.


d02b083543 Alexander Barton

Merge commit 'aad49bd260494878aed6795c7a897ad1d28c3082'


70254a5553 Florian Westphal

This patch implements a (maybe) compliant WHOWAS command.

It is hard to test this in the test suite because we 1) shouldn't rely on previous tests populating WHOWAS and 2) don't connect a user for more than 30 seconds. Also makes WHOWAS return ERR_NONICKNAMEGIVEN_MSG as implied by RFC.


aad49bd260 Alexander Barton

Update ngIRCd manual pages

- Update timestamp, - enhance some phrasing, - and fix "Passive" ([Server]) formatting.



d90cc7add0 Alexander Barton

GIT: ignore symbolic links to tests in testsuite directory

Added symbolic links to new tests (invite-test, join-test, and kick-test) to .gitignore file.


149859c5fe Alexander Barton

Fixes to who-test: accept "localhost.<domain>" as well as "localhost"

Some operating systems, for example OpenBSD, use "localhost.<domain>" instead of "localhost", so the "who-test" expecting "localhost" failed on such systems.


d9c26f3aeb Florian Westphal

ng_ipaddr.h must include netinet/in.h.

compile on FreeBSD 5.4 failed with: ./../ipaddr/ng_ipaddr.h:34: error: field `sin4' has incomplete type Reported and tested by Jefferson S Almeida.



12cd554af1 Florian Westphal

Fix secret channel information leak

/who on a secret channel that the user is not a member of now returns proper RPL_ENDOFWHO_MSG instead of nothing.


5cf5ba31eb Alexander Barton

Added Cygwin uid kludge. (verified working)


75b719a0c8 Florian Westphal

Anglified and improved comments in channel.c and channel.h

[Dana Dahlstrom: repair tab/space conversion in patch]


4e56e5341f Alexander Barton

Implement IRC commands SERVICE, SERVLIST, and SQUERY as dummy functions

SERVICE, SERVLIST, and SQUERY are required by RFC 2812 (it states in section 3 that "all commands described in this section MUST be implemented by any server for this protocol." -- So we implement them without (much) actual functionality ...


3895b42d1b Florian Westphal

Add invite-test.e to test suite.


6c81ffaece Florian Westphal

Tests for the INVITE command.


97cc58fb13 Florian Westphal

Invite: prefix last argument with colon when necessary.


c63d8fd051 Florian Westphal

tests for JOIN and various replies

Brandon Beresini sent me a patch yesterday adding tests for JOIN under various circumstances, which I believe he worked on with Bryan Caldwell and Ali Shemiran. I made a few modifications; the result is below.


3d8eda9c86 Florian Westphal

Allow KICK to handle comma-delimited lists (of channels, nicks).

includes test cases. [fw@strlen.de: - move code around to avoid duplication - use const where possible - integrate test case]



faf9b6ea16 Florian Westphal

Fixes to who-test: accept any ident, escape some '*' flags.

This prevents who-test.e from failing when ngircd is performing ident lookups and an ident server is running.


452fb28394 Florian Westphal

IRC_INVITE: coding style cleanup.


0428a1c4ea Florian Westphal

Constify some of Channel_Kick()s arguments.