]> arthur.barton.de Git - ngircd-alex.git/log
ngircd-alex.git
12 years agoFix ERR_{SUMMON|USERS}DISABLED: don't repeat command name in reply
Alexander Barton [Sun, 22 Jan 2012 14:41:21 +0000 (15:41 +0100)]
Fix ERR_{SUMMON|USERS}DISABLED: don't repeat command name in reply

12 years agoImplement channel exception list (mode 'e')
Alexander Barton [Sat, 21 Jan 2012 18:59:57 +0000 (19:59 +0100)]
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).

12 years ago{Add|Del}_Ban_Invite > {Add_To|Del_From}_List(): more generic
Alexander Barton [Sat, 21 Jan 2012 18:27:03 +0000 (19:27 +0100)]
{Add|Del}_Ban_Invite > {Add_To|Del_From}_List(): more generic

12 years agoRename ShowInvitesBans() to ShowChannelList(), make it more flexible
Alexander Barton [Sat, 21 Jan 2012 12:48:31 +0000 (13:48 +0100)]
Rename ShowInvitesBans() to ShowChannelList(), make it more flexible

12 years agoPRIVMSG/NOTICE: handle nick!user@host masks case-insensitive
Alexander Barton [Sat, 21 Jan 2012 12:21:36 +0000 (13:21 +0100)]
PRIVMSG/NOTICE: handle nick!user@host masks case-insensitive

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

12 years agoPRIVMSG/NOTICE: don't stop list processing on invalid target
Alexander Barton [Mon, 16 Jan 2012 11:37:37 +0000 (12:37 +0100)]
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.

12 years agoImplement user mode 'C': require "same channel" to send message
Alexander Barton [Mon, 16 Jan 2012 10:43:22 +0000 (11:43 +0100)]
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.

12 years agoNew RPL_WHOISREGNICK_MSG(307) numeric: indicate if nick is registered
Alexander Barton [Mon, 16 Jan 2012 01:18:24 +0000 (02:18 +0100)]
New RPL_WHOISREGNICK_MSG(307) numeric: indicate if nick is registered

12 years agoIRC_WHOIS_SendReply(): Code cleanup
Alexander Barton [Mon, 16 Jan 2012 01:15:41 +0000 (02:15 +0100)]
IRC_WHOIS_SendReply(): Code cleanup

12 years agoLimit channel invite and ban lists to 50 entries
Alexander Barton [Sun, 15 Jan 2012 23:26:12 +0000 (00:26 +0100)]
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")

12 years agoMake Send_ListChange() a little bit more generic
Alexander Barton [Sun, 15 Jan 2012 23:15:26 +0000 (00:15 +0100)]
Make Send_ListChange() a little bit more generic

12 years agoRemove unused prototype of Lists_AlreadyRegistered()
Alexander Barton [Sun, 15 Jan 2012 18:46:00 +0000 (19:46 +0100)]
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 ...

12 years agoChannel lists: Fix duplicate check and error messages
Alexander Barton [Sun, 15 Jan 2012 18:07:15 +0000 (19:07 +0100)]
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().

12 years agoDon't enforce MAX_HNDL_MODES_ARG on server and service links
Alexander Barton [Sun, 15 Jan 2012 13:33:04 +0000 (14:33 +0100)]
Don't enforce MAX_HNDL_MODES_ARG on server and service links

12 years agoUpdate documentation (fix some URL, update some info)
Alexander Barton [Sat, 14 Jan 2012 11:29:53 +0000 (12:29 +0100)]
Update documentation (fix some URL, update some info)

12 years agoUpdate NEWS and ChangeLog for next ngIRCd release once more
Alexander Barton [Fri, 13 Jan 2012 18:23:07 +0000 (19:23 +0100)]
Update NEWS and ChangeLog for next ngIRCd release once more

12 years agoDon't stop join handling on faulty channel, skip it (part #2)
Alexander Barton [Fri, 13 Jan 2012 09:43:05 +0000 (10:43 +0100)]
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.

12 years agoJOIN command: don't check channel limit if already member
Alexander Barton [Fri, 13 Jan 2012 09:40:20 +0000 (10:40 +0100)]
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.

12 years agoReturn ERR_UNKNOWNMODE(472) for unknown channel modes
Alexander Barton [Mon, 9 Jan 2012 22:18:39 +0000 (23:18 +0100)]
Return ERR_UNKNOWNMODE(472) for unknown channel modes

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

12 years agoNumberic 005 (ISUPPORT), CHANMODES: add "O", "R", "z" modes
Alexander Barton [Mon, 9 Jan 2012 11:34:55 +0000 (12:34 +0100)]
Numberic 005 (ISUPPORT), CHANMODES: add "O", "R", "z" modes

12 years agoLimit list replies of LIST, WHO, WHOIS, and MAX_RPL_WHOWAS
Alexander Barton [Fri, 6 Jan 2012 19:06:25 +0000 (20:06 +0100)]
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).

12 years agoNew function IRC_CheckListTooBig() to check size of list replies
Alexander Barton [Fri, 6 Jan 2012 19:05:07 +0000 (20:05 +0100)]
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.

12 years agoLIST command: compare pattern case insensitive
Alexander Barton [Fri, 6 Jan 2012 18:55:21 +0000 (19:55 +0100)]
LIST command: compare pattern case insensitive

12 years agoIRC_LIST(): Code cleanup
Alexander Barton [Fri, 6 Jan 2012 18:54:23 +0000 (19:54 +0100)]
IRC_LIST(): Code cleanup

12 years agoDEFAULT_WHOWAS->DEF_RPL_WHOWAS; MAX_CMODES_ARG->MAX_HNDL_MODES_ARG
Alexander Barton [Fri, 6 Jan 2012 17:56:53 +0000 (18:56 +0100)]
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 :-)

12 years agodefines.h: Code cleanup and (a little bit) more documentation
Alexander Barton [Fri, 6 Jan 2012 17:25:10 +0000 (18:25 +0100)]
defines.h: Code cleanup and (a little bit) more documentation

12 years agoRPL_ISUPPORT (numeric 005): Report MODES=<MAX_CMODES_ARG>
Alexander Barton [Fri, 6 Jan 2012 16:46:52 +0000 (17:46 +0100)]
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.

12 years agoChannel modes: really break handling when MAX_CMODES_ARG is hit
Alexander Barton [Fri, 6 Jan 2012 16:42:52 +0000 (17:42 +0100)]
Channel modes: really break handling when MAX_CMODES_ARG is hit

This fixes 98493077.

12 years agochannel modes: only handle MAX_CMODES_ARG modes with arguments
Alexander Barton [Fri, 6 Jan 2012 16:27:29 +0000 (17:27 +0100)]
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) ...

12 years agoFix handling of channel mode sequence with/without arguments
Alexander Barton [Fri, 6 Jan 2012 16:24:55 +0000 (17:24 +0100)]
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".

12 years agoConn_Write(): Make sure there is a client when detecting its type
Alexander Barton [Fri, 6 Jan 2012 02:26:24 +0000 (03:26 +0100)]
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!

12 years agoProc_Close(): Only close socket if it is still valid
Alexander Barton [Fri, 6 Jan 2012 01:26:04 +0000 (02:26 +0100)]
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 :-(

12 years agoWHOIS command: make sure matching is case-insensitive
Alexander Barton [Wed, 4 Jan 2012 23:51:39 +0000 (00:51 +0100)]
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.

12 years agoWHOIS command: don't anser queries for IRC servers
Alexander Barton [Wed, 4 Jan 2012 23:24:46 +0000 (00:24 +0100)]
WHOIS command: don't anser queries for IRC servers

Thanks to Cahata for spotting this!

12 years agoWHOIS command: make sure the reply ends with RPL_ENDOFWHOIS
Alexander Barton [Wed, 4 Jan 2012 23:22:57 +0000 (00:22 +0100)]
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.

12 years agoREADME: update features list, borrow from list on our website
Alexander Barton [Wed, 4 Jan 2012 22:30:55 +0000 (23:30 +0100)]
README: update features list, borrow from list on our website

12 years agoLINKS command: support <mask> parameter
Alexander Barton [Wed, 4 Jan 2012 21:51:02 +0000 (22:51 +0100)]
LINKS command: support <mask> parameter

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

12 years agoIRC_LINKS(): Code cleanup; more documentation
Alexander Barton [Wed, 4 Jan 2012 21:49:18 +0000 (22:49 +0100)]
IRC_LINKS(): Code cleanup; more documentation

12 years agoAdd 1 second penalty for every further target on PRIVMSG/NOTICE
Alexander Barton [Wed, 4 Jan 2012 20:43:32 +0000 (21:43 +0100)]
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!

12 years agoConn_SetPenalty(): Add new "penalty time" on each function call
Alexander Barton [Wed, 4 Jan 2012 20:39:46 +0000 (21:39 +0100)]
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.

12 years agoEnhance log messages when setting user and group bug118-UnknownUID
Alexander Barton [Tue, 3 Jan 2012 20:05:35 +0000 (21:05 +0100)]
Enhance log messages when setting user and group

12 years agoNGIRCd_getNobodyID(): Code cleanup
Alexander Barton [Tue, 3 Jan 2012 19:49:42 +0000 (20:49 +0100)]
NGIRCd_getNobodyID(): Code cleanup

12 years agoDisplay correct error message when "Server{UID|GID}" is invalid
Alexander Barton [Tue, 3 Jan 2012 19:37:41 +0000 (20:37 +0100)]
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).

12 years agoNGIRCd_Init(): Code cleanup
Alexander Barton [Tue, 3 Jan 2012 18:34:54 +0000 (19:34 +0100)]
NGIRCd_Init(): Code cleanup

12 years agomain(): Code cleanup
Alexander Barton [Tue, 3 Jan 2012 18:25:31 +0000 (19:25 +0100)]
main(): Code cleanup

12 years agoREADME: point to included COPYING file, not gnu.org
Alexander Barton [Tue, 3 Jan 2012 17:56:31 +0000 (18:56 +0100)]
README: point to included COPYING file, not gnu.org

12 years agoUpdate Copyright notices for 2012
Alexander Barton [Tue, 3 Jan 2012 10:30:45 +0000 (11:30 +0100)]
Update Copyright notices for 2012

12 years agolists: don't crash if reason ptr is NULL
Florian Westphal [Mon, 2 Jan 2012 22:37:46 +0000 (23:37 +0100)]
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.

12 years agoDon't stop join handling on faulty channel, skip it
Alexander Barton [Mon, 2 Jan 2012 14:23:17 +0000 (15:23 +0100)]
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!

12 years agoIRC_JOIN(): Code cleanup
Alexander Barton [Mon, 2 Jan 2012 14:22:52 +0000 (15:22 +0100)]
IRC_JOIN(): Code cleanup

12 years agoISON command: reply with correct upper-/lowercase nick names
Alexander Barton [Mon, 2 Jan 2012 14:06:44 +0000 (15:06 +0100)]
ISON command: reply with correct upper-/lowercase nick names

Reported by Cahata -- thanks!

12 years agoIRC_ISON(): Code cleanup
Alexander Barton [Mon, 2 Jan 2012 14:04:40 +0000 (15:04 +0100)]
IRC_ISON(): Code cleanup

12 years agoRemove unused "bool have_arg" from IRC_WHO()
Alexander Barton [Sun, 1 Jan 2012 23:56:31 +0000 (00:56 +0100)]
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

12 years agoUpdate NEWS and ChangeLog for next ngIRCd release
Alexander Barton [Sun, 1 Jan 2012 22:14:28 +0000 (23:14 +0100)]
Update NEWS and ChangeLog for next ngIRCd release

12 years agongircd.conf.5: reword description of "Ports" variable
Alexander Barton [Sun, 1 Jan 2012 16:39:07 +0000 (17:39 +0100)]
ngircd.conf.5: reword description of "Ports" variable

12 years agoNew configuration option "PAMIsOptional"
Alexander Barton [Sun, 1 Jan 2012 16:12:36 +0000 (17:12 +0100)]
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.

12 years agoPAM: don't use global password buffer for conv struct
Alexander Barton [Sat, 31 Dec 2011 17:06:17 +0000 (18:06 +0100)]
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 ...

12 years agodoc/Modes.txt: document channel mode "r"
Alexander Barton [Sat, 31 Dec 2011 17:04:58 +0000 (18:04 +0100)]
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.

12 years agoFixed handling of WHO commands
Alexander Barton [Fri, 30 Dec 2011 13:52:48 +0000 (14:52 +0100)]
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.

12 years agoRemove unused "time_t now" from Lists_Check()
Alexander Barton [Fri, 30 Dec 2011 00:02:44 +0000 (01:02 +0100)]
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

12 years agoFixed some spelling errors in documentation and code comments
Alexander Barton [Thu, 29 Dec 2011 23:50:27 +0000 (00:50 +0100)]
Fixed some spelling errors in documentation and code comments

Thanks to Christoph Biedl!

12 years agocontrib/Debian/control: Update and complete "Build-Depends"
Alexander Barton [Thu, 29 Dec 2011 23:40:18 +0000 (00:40 +0100)]
contrib/Debian/control: Update and complete "Build-Depends"

12 years agoUpdate our Debian package descriptions with "official" ones
Alexander Barton [Thu, 29 Dec 2011 23:36:26 +0000 (00:36 +0100)]
Update our Debian package descriptions with "official" ones

See Debian Bug #648241 for details.

12 years agoFixed typo in two error messages
Alexander Barton [Thu, 29 Dec 2011 23:32:11 +0000 (00:32 +0100)]
Fixed typo in two error messages

Thanks to Christoph Biedl!

12 years agoLUSERS reply: only count "visible" channels
Alexander Barton [Wed, 28 Dec 2011 14:07:24 +0000 (15:07 +0100)]
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!

12 years agoIRC_Send_LUSERS(): Code cleanup
Alexander Barton [Wed, 28 Dec 2011 13:52:21 +0000 (14:52 +0100)]
IRC_Send_LUSERS(): Code cleanup

12 years agoDon't stop mode handling on unknown modes; skip it
Alexander Barton [Wed, 28 Dec 2011 13:39:47 +0000 (14:39 +0100)]
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!

12 years agoIRC_xLINE(): output an error message for unexpected "lines" bug114-GKLine
Alexander Barton [Sun, 25 Dec 2011 19:11:43 +0000 (20:11 +0100)]
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

12 years agoREADME: Update list of implemented commands
Alexander Barton [Sun, 25 Dec 2011 19:01:28 +0000 (20:01 +0100)]
README: Update list of implemented commands

12 years agoUpdate list item, if it already exists
Alexander Barton [Sun, 25 Dec 2011 18:43:00 +0000 (19:43 +0100)]
Update list item, if it already exists

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

12 years agoLists_CheckDupeMask(): return pointer to already existing item
Alexander Barton [Sun, 25 Dec 2011 18:42:03 +0000 (19:42 +0100)]
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.

12 years agoLog better error messages when rejecting clients
Alexander Barton [Sun, 25 Dec 2011 18:27:06 +0000 (19:27 +0100)]
Log better error messages when rejecting clients

12 years agoSynchronize G-Lines on server login
Alexander Barton [Sun, 25 Dec 2011 18:12:40 +0000 (19:12 +0100)]
Synchronize G-Lines on server login

12 years agoOp_Check(): always accept commands from a remote server itself
Alexander Barton [Sun, 25 Dec 2011 18:11:43 +0000 (19:11 +0100)]
Op_Check(): always accept commands from a remote server itself

12 years agoClass_GetList() now retuns a pointer to list_head structure
Alexander Barton [Sun, 25 Dec 2011 18:11:07 +0000 (19:11 +0100)]
Class_GetList() now retuns a pointer to list_head structure

12 years agoCheck G-Line and K-Line lists after authenticating clients
Alexander Barton [Sun, 25 Dec 2011 17:03:35 +0000 (18:03 +0100)]
Check G-Line and K-Line lists after authenticating clients

12 years agoNew functions Lists_Expire() and Class_Expire()
Alexander Barton [Sun, 25 Dec 2011 16:44:20 +0000 (17:44 +0100)]
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 :-)

12 years agoImplement IRC_xLINE(): handler for "GLINE" and "KLINE" commands
Alexander Barton [Sun, 25 Dec 2011 15:57:36 +0000 (16:57 +0100)]
Implement IRC_xLINE(): handler for "GLINE" and "KLINE" commands

12 years agoOp_Check(): return client that initiated the request or NULL
Alexander Barton [Sun, 25 Dec 2011 15:52:31 +0000 (16:52 +0100)]
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.

12 years agoirc-oper.c: code cleanup; more documentation
Alexander Barton [Sun, 25 Dec 2011 15:08:00 +0000 (16:08 +0100)]
irc-oper.c: code cleanup; more documentation

12 years agoImplement IRC "STATS g" and "STATS k" command
Alexander Barton [Sun, 25 Dec 2011 13:50:19 +0000 (14:50 +0100)]
Implement IRC "STATS g" and "STATS k" command

12 years agoNew function Class_GetList()
Alexander Barton [Sun, 25 Dec 2011 13:49:52 +0000 (14:49 +0100)]
New function Class_GetList()

12 years agolists.{c|h}: code cleanup; more documentation
Alexander Barton [Sun, 25 Dec 2011 13:48:13 +0000 (14:48 +0100)]
lists.{c|h}: code cleanup; more documentation

12 years agoList and class handling: add optional "reason" text
Alexander Barton [Sun, 25 Dec 2011 13:19:45 +0000 (14:19 +0100)]
List and class handling: add optional "reason" text

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

12 years agoAdd new class.{c|h} module to Xcode project
Alexander Barton [Sat, 24 Dec 2011 13:24:07 +0000 (14:24 +0100)]
Add new class.{c|h} module to Xcode project

12 years agoAdd new class.{c|h} to project
Alexander Barton [Sat, 24 Dec 2011 12:40:27 +0000 (13:40 +0100)]
Add new class.{c|h} to project

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

12 years agoLists: change "only once" property into "valid until"
Alexander Barton [Sat, 24 Dec 2011 12:34:25 +0000 (13:34 +0100)]
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.

12 years agoXcode: update project file for Xcode 4.2
Alexander Barton [Sat, 24 Dec 2011 12:22:34 +0000 (13:22 +0100)]
Xcode: update project file for Xcode 4.2

12 years agodefine HAVE_GAI_STRERROR for Mac OS X Xcode builds
Alexander Barton [Sat, 24 Dec 2011 12:16:38 +0000 (13:16 +0100)]
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 '('

12 years agoConfiguration: get rid of Conf_Oper_Count and Conf_Channel_Count
Alexander Barton [Sat, 27 Aug 2011 15:03:30 +0000 (17:03 +0200)]
Configuration: get rid of Conf_Oper_Count and Conf_Channel_Count

Count elements dynamically when needed.

12 years ago./configure: Fix logic and quoting of poll() detection code
Alexander Barton [Sun, 4 Dec 2011 23:19:32 +0000 (00:19 +0100)]
./configure: Fix logic and quoting of poll() detection code

This fixes commit 8e193df ...

12 years agoSuppress 'Can't create pre-defined channel: invalid name: ""' messages
Alexander Barton [Sun, 4 Dec 2011 21:30:32 +0000 (22:30 +0100)]
Suppress 'Can't create pre-defined channel: invalid name: ""' messages

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

12 years agoOnly use poll() when poll.h exists as well
Alexander Barton [Fri, 25 Nov 2011 21:06:44 +0000 (22:06 +0100)]
Only use poll() when poll.h exists as well

12 years agoNot only check for poll(), make sure poll.h exists as well
Alexander Barton [Fri, 25 Nov 2011 20:56:33 +0000 (21:56 +0100)]
Not only check for poll(), make sure poll.h exists as well

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

12 years agowhois-test: handle local hostname = "localhost.localdomain"
Alexander Barton [Thu, 10 Nov 2011 10:54:22 +0000 (11:54 +0100)]
whois-test: handle local hostname = "localhost.localdomain"

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

12 years agosample-ngircd.conf: show correct default for "PAM" variable
Alexander Barton [Tue, 8 Nov 2011 20:12:01 +0000 (21:12 +0100)]
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.

12 years agoUpdate GPL 2 license text to current version
Alexander Barton [Sun, 6 Nov 2011 20:51:48 +0000 (21:51 +0100)]
Update GPL 2 license text to current version

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

12 years agoTest for gai_strerror()
Alexander Barton [Sun, 6 Nov 2011 13:16:59 +0000 (14:16 +0100)]
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().

12 years agoOnly use AI_NUMERICHOST if it is #define'd
Alexander Barton [Sun, 6 Nov 2011 13:13:49 +0000 (14:13 +0100)]
Only use AI_NUMERICHOST if it is #define'd

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

12 years agodefines.h: fix comment: "lenth" -> "length"
Alexander Barton [Fri, 4 Nov 2011 23:35:18 +0000 (00:35 +0100)]
defines.h: fix comment: "lenth" -> "length"

Reported by Christoph Biedl in #ngircd. Thanks!