William Pitcock [Sat, 22 Dec 2007 22:05:51 +0000 (16:05 -0600)]
- add IOReadFunc and IOWriteFunc types.
- add fde::read_impl, fde::write_impl.
(defaults to read(2) and write(2) with raw FDs at the moment;
this will be revised to act on the fde later.)
Jilles Tjoelker [Wed, 12 Dec 2007 23:14:02 +0000 (00:14 +0100)]
Do not copy string passed to add_top_conf()/add_conf_item().
If the caller can keep a function pointer valid, they can
certainly keep a string valid.
This also fixes an error with HAVE_STRDUP undefined.
Jilles Tjoelker [Sat, 8 Dec 2007 20:54:51 +0000 (21:54 +0100)]
Remove reject entries on unkline/ungline/unxline.
When a user is rejected, remember the hash value of the
ban mask (for klines/glines, hash value of the user part
XOR hash value of the host part) with the rejected IP;
if the kline/gline/xline is removed, remove rejects with
the same hash value also. Note that this does not happen
for expiries; this is deliberate.
Rejects for no auth{} or dnsbl put a hash value of 0;
they cannot be removed selectively.
Jilles Tjoelker [Sat, 8 Dec 2007 18:44:18 +0000 (19:44 +0100)]
Change meaning of "bits" in FNV hash functions to bitlen instead of 32-bitlen.
Do reduction like recommended by
http://www.isthe.com/chongo/tech/comp/fnv/index.html#xor-fold
Jilles Tjoelker [Fri, 30 Nov 2007 00:14:12 +0000 (01:14 +0100)]
Speed up /undline similarly
- Change find_exact_conf_by_address() to work for dlines also.
- Use find_exact_conf_by_address() to find the dline and
abort immediately if there is no such dline.
- When removing a permanent dline, remove the dline from
the data structures instead of rehashing bans.
- Convert alternative ways to write the same dline to the
one in the found dline. (This was changed in unkline too.)
Jilles Tjoelker [Wed, 28 Nov 2007 23:12:51 +0000 (00:12 +0100)]
Speed up /unkline
- Use find_exact_conf_by_address() to find the kline and
abort immediately if there is no such kline.
- When removing a permanent kline, remove the kline from
the data structures instead of rehashing bans.
Jilles Tjoelker [Fri, 23 Nov 2007 21:11:25 +0000 (22:11 +0100)]
Merge links_cache into scache and rework scache.
This changes flattened /links output to disclose less
routing information and slightly increases memory "leak"
from server names that do not come back anymore.
jilles [Sat, 18 Aug 2007 14:45:10 +0000 (07:45 -0700)]
[svn] callerid (+g) documentation:
- Mention 005 (isupport) token with possibility of different mode letter.
- Explicitly clarify that /accept can be used while -g, and setting -g
does not clear the accept list.
- Mention that some users may be able to bypass +g.
- Mention that /accept may allow more than just going through +g.
- Update to 716/717/718 numerics instead of notices.
- Clarify that the one-minute period applies to messages from all users,
not just one user.
- Add a numerics section with more exact syntax.
[svn] Use mask_match() to check bans from local clients for
redundancy. This fixes the problem that bans like *!?@*
prevent any ban starting with *!*@ being set.
[svn] Add mask_match(), like ircu mmatch().
This compares two masks and returns whether the "new" is
more specific than or equal to the "old". The difference
with match() is that a '?' in "old" does not match a '*' in
"new".
[svn] add_id() for local client: do not collapse() the ban mask.
The code calling this already collapses the mask, and if
not, doing it here would cause a desync.
jilles [Sat, 30 Jun 2007 22:15:35 +0000 (15:15 -0700)]
[svn] monitor: send the same message buffer to all users
monitoring a certain nick; the target field of the
numeric becomes *, much like server notices