Commit Graph

14 Commits

Author SHA1 Message Date
LucentW 03c8997af3 Fixed building issues\
Now builds cleanly. Pass all tests from make check.
2015-05-13 20:08:26 +00:00
Alexander Barton b130b35f48 Update #include's: remove unused and add missing ones
The "deheader" tool (<http://www.catb.org/~esr/deheader/>) has been
used to find unused #include directives as well as missing ones.

Tested on:

- A/UX 3.1.1
- ArchLinux (2014-03-17)
- Debian GNU/Hurd
- Debian GNU/Linux 6.0.9
- Debian GNU/Linux 7.4
- Fedora 20
- FreeBSD 9.2
- OpenBSD 4.8
- OpenBSD 5.1
- OS X 10.9
- Solaris 11
2014-03-17 11:37:25 +01:00
Alexander Barton 259c314d14 Remove imp.h and exp.h header files
These include files don't have a function any more, remove them.
2014-03-17 00:17:02 +01:00
Alexander Barton a4ed90ba9a Fix two K&R C portability issues
Fix the following two errors emitted by the Apple K&R C compiler
on Apple A/UX:

"./class.c", line 47: no automatic aggregate initialization
"./class.c", line 47: illegal lhs of assignment operator

"./conf.c", line 1052: syntax error

Tested on A/UX 3.1.1.
2014-03-16 20:07:08 +01:00
Alexander Barton 27fd92d580 Rename "Mask" variables into "Pattern" in assert() statements
This completes commit 3ab00e3a11 which broke debug builds.
2013-04-21 15:58:46 +02:00
Federico G. Schwindt 3ab00e3a11 Change Lists_MakeMask() to receive a buffer for the mask
Change callers accordingly so they don't rely on a global buffer and
rename Mask to Pattern where it makes sense since some functions
where indeed receiving a pattern and not a mask.
2013-04-20 00:43:47 +01:00
Federico G. Schwindt cde2e8a277 Fix use-after-free on Lists_CheckReason()
Change Lists_CheckReason() to receive a buffer where the reason
will be stored and its length.  Change callers accordingly.

Change Class_GetMemberReason() (and its callers) in a similar way
so it doesn't rely on a global buffer for the rejected reason.
2013-04-20 00:43:35 +01:00
Alexander Barton 1537c79132 G/K-Lines: only add and delete valid IRC masks 2012-01-22 18:53:16 +01:00
Alexander Barton eba95bb0d2 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().
2012-01-22 18:33:45 +01:00
Alexander Barton 6ef20e0f9a Class_GetList() now retuns a pointer to list_head structure 2011-12-25 19:11:07 +01:00
Alexander Barton ae5ebfb9f0 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 :-)
2011-12-25 17:44:20 +01:00
Alexander Barton dc9fcb0fb2 New function Class_GetList() 2011-12-25 14:49:52 +01:00
Alexander Barton af70c3dbc9 List and class handling: add optional "reason" text
Adjust Lists_Add() and Class_AddMask() accordingly, implement
Lists_GetReason() and Lists_GetValidity().
2011-12-25 14:19:45 +01:00
Alexander Barton 06a20b87c4 Add new class.{c|h} to project
Implement Class_{AddMask|DeleteMask|IsMember}() functions.
2011-12-24 13:40:27 +01:00