Commit graph

689 commits

Author SHA1 Message Date
Jilles Tjoelker e238d01db9 If use_forward is off, ignore forwarding bans rather than stripping the channel.
We do not want to set $r:* if $r:*$* was requested.
2011-12-10 17:17:13 +01:00
Jilles Tjoelker 5efa7ef677 Do not allow forward channels for +qeI, as in ircd-seven. 2011-12-10 00:58:08 +01:00
Jilles Tjoelker e1dc9e549f Apply the same restrictions to ban forwarding as to +f. 2011-12-10 00:45:57 +01:00
Jilles Tjoelker 0c7303213e Move checks for forward channels to a separate function.
No functional change is intended.
2011-12-10 00:40:07 +01:00
Jilles Tjoelker 0ea417c4a4 Disallow $ in usernames as this may cause problems with ban forwarding. 2011-12-06 00:01:59 +01:00
Jilles Tjoelker ca8ff4830b Force nicklen (all flavours) to be at least 9. 2011-11-29 23:41:18 +01:00
William Pitcock c68d30f70b Switch to ircu NICKLEN/MAXNICKLEN semantics.
Clients should use MAXNICKLEN for preallocation, and NICKLEN should be treated as
informative.
2011-11-29 16:24:48 -06:00
William Pitcock a83486bfe6 Remove nicklen_set barrier.
Since serverinfo::nicklen only controls NICKLEN_USABLE, we do not need to have a
barrier here.
2011-11-29 16:19:37 -06:00
William Pitcock 7b42eab627 Make sure ConfigFileEntry.nicklen follows the same semantics as real NICKLEN.
Otherwise, truncation would be one byte too short on nick changes.
2011-11-29 16:16:38 -06:00
William Pitcock b583faf970 Add support for customizing the usable nick length.
This adds a new ISUPPORT token, NICKLEN_USABLE which is strictly an informative value.
NICKLEN is always the maximum runtime NICKLEN supported by the IRCd, as other servers may
have their own usable NICKLEN settings.  As NICKLEN_USABLE is strictly informative, and
NICKLEN is always the maximum possible NICKLEN, any clients which depend on NICKLEN for
memory preallocation will be unaffected by runtime changes to NICKLEN_USABLE.

The default NICKLEN is 50; the default serverinfo::nicklen in the config file is set to
30, which is the NICKLEN presently used on StaticBox.
2011-11-29 16:10:21 -06:00
Jilles Tjoelker 0cce01d388 Fix -Wformat errors found in ircd-ratbox.
We cannot use -Wformat meaningfully but ircd-ratbox trunk can.
2011-11-13 00:22:09 +01:00
Stephen Bennett a695b0e40e Apply extended-join client cap to QJM joins 2011-11-12 14:41:01 +00:00
Jilles Tjoelker d74fa5b502 Prefer PATH_MAX to non-standard MAXPATHLEN. 2011-10-28 16:45:18 +02:00
Jilles Tjoelker c55b2782fc Properly update 004/005 when a rehash changes use_forward. 2011-10-25 00:38:27 +02:00
Stephen Bennett 717f809762 Don't treat +r specially when displaying supported channel modes.
This used to be only advertised if a service was linked, which made
sense in ratbox when +r was only settable if services were available.
Now, however, +r is always available and so should always be advertised.
2011-10-24 19:59:31 +01:00
Jilles Tjoelker db6b1735cf ilog_error: Avoid overwriting errno before sending it to opers. 2011-10-21 23:21:22 +02:00
Jilles Tjoelker 894325fe41 Force client_flood_burst_rate and client_flood_burst_rate to at least rfc1459 values (5). 2011-10-04 22:16:01 +02:00
Jilles Tjoelker 5a72f20c2c Limit sent_parsed to the highest possible value in the current config.
After a configuration change (or deoper with no_oper_flood) sent_parsed
might be way higher than allow_read, so that the user would have to wait
a long time before the server responds. Avoid this.
2011-10-04 01:08:12 +02:00
Jilles Tjoelker a75bf40dad Fix weirdness with client_flood_burst_rate and client_flood_burst_max.
They are now in messages, even if client_flood_message_time is not 1.

If client_flood_message_time is not 1 (by default it is), this needs a
configuration change to maintain the same behaviour.
2011-10-04 00:57:49 +02:00
Jilles Tjoelker d182b85454 Minor cleanup to command throttling code:
* Deduce allow_read from the client's state (IsFloodDone) rather than
   storing it in LocalUser.
 * Fix the documentation (in oper /info), however strange
   client_flood_burst_rate and client_flood_burst_max may seem, that is
   how they currently work.
2011-10-04 00:46:00 +02:00
Jilles Tjoelker f9dda63969 Disable LocalUser.actually_read (write-only field). 2011-10-04 00:25:22 +02:00
Jilles Tjoelker c598ff7b04 Fold client_flood_burst_rate check into MAX_FLOOD_BURST.
The original definition of floodgrace was MAX_FLOOD_BURST lines per second.
A second check for another number of lines per second makes no sense.
2011-10-04 00:21:19 +02:00
Jilles Tjoelker 41ca4cac35 Enforce the average allowed send rate is at least the one allowed by rfc1459. 2011-10-04 00:13:53 +02:00
Jilles Tjoelker 1aa35c8af1 Make sure to check the length of a ban mask before removing a forward channel.
Otherwise a line might be truncated later, leading to desyncs.
2011-09-25 16:25:17 +02:00
Jilles Tjoelker 2da6f6ebd7 Put back use_forward. 2011-09-25 16:22:29 +02:00
Jilles Tjoelker 93fbe9c349 Fix double-free when removing a ban.
del_id() should not free the ban anymore, its caller does that now.
2011-09-14 00:52:56 +02:00
Jilles Tjoelker f890420014 Ensure all signals keep working after a SIGINT restart.
After setting up signal handlers, unmask the signals we care about
(installed handlers for).

When handling SIGINT, the kernel adds SIGHUP and SIGINT to the signal
mask (as requested in sigaction()); if execve() is called from the
signal handler, this change is persistent.
2011-08-31 01:04:40 +02:00
Elizabeth Jennifer Myers 25ea5d2fac Fix git fuckery.
Apparently my tree got horribly corrupted.
2011-08-12 21:27:52 -04:00
Elizabeth Jennifer Myers 73d0f900c0 chmode: fix construct_cflags_strings.
Accidentally ported too much from ircd-seven. Fix this.
2011-08-12 21:09:13 -04:00
Elizabeth Jennifer Myers 765d839d3c Port ircd-seven banfowards to charybdis.
nenolod gave the thumbs-up to port ircd-seven banfowards to charybdis to spb
for a while, and people have asked about it. Might as well do it since it's a
slow weekend.

Note that as a side effect use_forward is removed from the config and
unconditionally enabled!
2011-08-12 20:33:10 -04:00
Jilles Tjoelker 2a483a807d Remove a stale comment. 2011-08-07 22:04:16 +02:00
Elizabeth Jennifer Myers 7eec45bc9d Back out chanroles.
While what chanroles are trying to accomplish is a good idea, it is
apparently unclear this is the proper way to do it. Until we figure out
the exact way we wish to do this, it should be reverted for now.
2011-07-07 21:24:14 -04:00
Elizabeth Jennifer Myers e794d39a80 Add client interface for GRANT.
TODO: implement notifications of grant privilege changes to the target.
2011-07-06 17:25:26 -04:00
William Pitcock f3bfe2c271 chanroles: instead of checking for chanop + CHANROLE_UNSET combination, grant a default set of flags.
this allows ops with zero effective privilege.
2011-07-06 15:12:46 -05:00
William Pitcock ae79dab6ae chanroles: grant initial set of flags to people added to a channel with CHFL_CHANOP.
this allows us to, later on, add a hook that will enable us to disable channel ops entirely
without causing permissions revocation.
2011-07-06 15:00:32 -05:00
Elizabeth Jennifer Myers 6d8ec56083 Add chanroles to isupport so clients know it exists. 2011-07-06 13:50:36 -04:00
Elizabeth Jennifer Myers 8aabb973c0 Implement chanroles, as discussed with nenolod.
The theory behind this is that services sends an ENCAP * GRANT #channel
UID :+flagspec message specifying the chanroles the user has. They are
mapped into flag bits and applied to the membership of the user. They
then are restricted or permitted to what they can do based on the
permissions mask regardless of rank.

For backwards compatibility, the default permission bit (without a GRANT
statement) allows a user to to anything an existing op can do ONLY if
they are an op.

Todo: make CHANROLE_STATUS work (the ability to apply +ov to people),
which is at the moment controlled by CHANROLE_MODE.
2011-07-06 13:46:22 -04:00
Keith Buck ab894d74fe Add target change spam notice. 2011-05-16 15:29:09 -07:00
William Pitcock 8bd1c8a19a branding: denote custom branding in ircd -version 2011-05-08 09:11:50 -05:00
William Pitcock f5493691ed branding: if CUSTOM_BRANDING is defined, display charybdis version in /info
(based on ircd-seven rebrand patch)
2011-05-08 09:06:19 -05:00
Jilles Tjoelker b19d3c5186 Style: use a consistent order for the _C constants. 2011-03-31 00:05:42 +02:00
Stephen Bennett 94d86632dc Disallow mIRC italics in channel names when disable_fake_channels 2011-03-30 11:30:47 +01:00
Stephen Bennett e6e54763d9 Make flood control settings configurable by those who know exactly what they're doing.
From ircd-seven git changeset 29aa4203150337925a4f5c6e7da47be5394c2125 .
2011-03-27 16:35:26 -04:00
Stephen Bennett 5fabe51369 Don't allow +Z to be set by default_umodes 2011-03-11 13:12:40 +00:00
Elizabeth Jennifer Myers 0a1e77c27c Support IPv6 blacklists. Also add a conf file option allowing the use of IPv4, IPv6, or both for a blacklist.
Although few blacklists currently support IPv6 lookups, they will likely begin to do so in the near future as more net trash begins using IPv6.
2011-02-27 16:38:05 -05:00
Elizabeth Jennifer Myers f4b52a0ad3 can_send: properly initalise moduledata. 2011-02-13 09:50:25 -05:00
Jilles Tjoelker 462ae9d7a5 Fix memory leak of operator certfp fields. 2011-01-25 00:39:07 +01:00
Elizabeth Jennifer Myers ed45dfe676 newconf: fix a warning 2011-01-23 16:56:36 -05:00
Elizabeth Jennifer Myers 63c7a68e19 newconf: fix certificate fingerprint auth.
yy_oper->certfp was not copied into yy_tmpoper->certfp, thus the information was lost and certfp auth was never really working, since the string was always empty.
2011-01-23 16:12:32 -05:00
Jilles Tjoelker 26e9dd93ad Remove nickTS from extended-join. 2011-01-11 00:26:15 +01:00