Jilles Tjoelker [Sun, 2 Mar 2008 16:03:56 +0000 (17:03 +0100)]
Show some target change statistics in /stats t.
- the number of messages blocked by target change on
this server since it was started
- the number of IPs currently subject to a a lower
target limit on this server (these expire over time)
Jilles Tjoelker [Sun, 24 Feb 2008 23:05:15 +0000 (00:05 +0100)]
Remove CHFL_DEOPPED check from TMODE.
This check sometimes blocks oper overrides (OMODE).
It does not stop any hacks that the channelTS check
already stops, because CHFL_DEOPPED is only set when
this server ignored an @ in an incoming SJOIN (the
SJOIN is then propagated without the @) and this
can only be because of a TS difference.
Jilles Tjoelker [Thu, 17 Jan 2008 00:06:32 +0000 (01:06 +0100)]
send_linebuf_remote(): Remove broken and useless ghost check that can never happen.
Reasoning why it never does anything:
- the to = to->from line makes sure that MyConnect(to)
- then IsPerson(to) && (to == from->from) implies that to == from
- so MyClient(to)
- which cannot happen because it also wants that !MyClient(from)
Originally, the to = to->from line was below, and it did a
fake direction check, killing a client if servers could be
confused about it. The kill cannot do any good with TS6.
The fake direction check is and was performed by the
callers of send_linebuf_remote().
Jilles Tjoelker [Fri, 28 Dec 2007 00:31:56 +0000 (01:31 +0100)]
More helpful ERROR server notices.
- Do not use hide_error_messages for certain "safe" ERRORs.
- If hide_error_messages hides an ERROR from a handshake,
send a server notice anyway, but without the message
text.
- Send server notices about ERRORs from handshakes network
wide if it was a remote connect.
Jilles Tjoelker [Wed, 26 Dec 2007 21:46:43 +0000 (22:46 +0100)]
Make remote numerics to channels work.
Note that +D clients do not get these. This is consistent
with how ircu treats remote numerics and with how we treat
server notices from other servers, but not with how locally
generated notices and numerics are sent also to +D clients.
Jilles Tjoelker [Tue, 25 Dec 2007 23:51:22 +0000 (00:51 +0100)]
Never allow a duplicate kline; always allow a wider kline.
Duplicate klines are now disallowed regardless of
no_redundant_klines. There is a somewhat hackish check
to see if the new kline is wider than the existing one.
Jilles Tjoelker [Tue, 25 Dec 2007 23:18:22 +0000 (00:18 +0100)]
When removing a temp kline, show removed mask, not given mask.
Example: when temp klining 10.0.0.0/16 and unklining 10.0.0.1/16,
it showed 10.0.0.1/16 being removed before, and shows
10.0.0.0/16 now.
Jilles Tjoelker [Mon, 24 Dec 2007 22:29:01 +0000 (23:29 +0100)]
Remove "<server> had been connected for <time>" snote.
For registered servers, it is entirely redundant with the
"<server> was connected for <time>. <traffic>" snote, and
only sent for some ways of closing; for handshakes, you
already know that it had not been connected for long.
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