0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-03 20:38:53 +01:00
Commit graph

1905 commits

Author SHA1 Message Date
William Pitcock
346fba9252 Migrate capability negotiation code to new dynamic capability management API.
This needs a lot of testing, obviously.
2012-02-04 01:47:46 -06:00
William Pitcock
ec3a9055f2 capability: add capability_index_mask() which calculates old CAP_MASK 2012-02-04 00:39:53 -06:00
William Pitcock
5e773521a9 capability: add capability_index_list() to build a list of capabilities given an index and mask 2012-02-04 00:36:42 -06:00
William Pitcock
64b56afd8c Add a new dynamic capability manager.
Specifically, what this capability manager does, is map keywords to
calculated bitmasks.  These bitmasks are allocated at runtime, so that
the any managed capability index can be manipulated by modules.

Modules should call capability_orphan() when orphaning capabilities.  This
makes it so that bitmasks aren't reallocated, except for cases where the
capability is the same.
2012-02-04 00:05:13 -06:00
William Pitcock
481b443b4d Missed a few -Wformat-security warnings. 2012-01-25 13:24:04 -06:00
William Pitcock
32ea9d3d83 Fix some warnings when using -Wformat-security on Alpine. 2012-01-25 13:22:56 -06:00
Keith Buck
4862f41a02 extban : Correct logic for matching against permissions. 2012-01-24 17:13:32 +00:00
JD Horelick
a8eae73002 extb_usermode should declare itself as what it actually is. 2012-01-22 13:56:25 -05:00
William Pitcock
655e7dee45 extban $o: add support for matching against specific permissions.
Syntax: $o:oper:admin (match against the oper:admin permission)
2012-01-22 04:05:34 -06:00
William Pitcock
11f2e78727 extb_usermode: should use EXTBAN_INVALID if no modestring is provided 2012-01-22 03:58:32 -06:00
William Pitcock
0b18e32cad Add extban target for matching against a user's modes.
Syntax: $m:+o (require usermode +o)
Syntax: $m:+o-a (require usermode +o but do not allow +a)
Syntax: $m:+a (require usermode +a)
Syntax: $m:-h (require user disables cloaking to enter)
2012-01-22 03:46:08 -06:00
Jilles Tjoelker
97532cfafb Fix assertion failure when failing to join a channel and there is no forward.
This was harmless apart from the message.
2012-01-08 16:41:26 +01:00
Jilles Tjoelker
1c60de9757 Check +bq against underlying IPv4 as well.
As with k/dlines, exceptions (here +eI) are not checked.
2012-01-08 16:39:11 +01:00
Jilles Tjoelker
fe74401bf0 Add one more const. 2012-01-08 16:25:34 +01:00
Jilles Tjoelker
d9af501aa8 Fix a warning about const with forward channels. 2012-01-08 16:23:18 +01:00
Jilles Tjoelker
a14de124d6 Remove code duplication between is_banned() and is_quieted(). 2012-01-08 16:21:07 +01:00
Jilles Tjoelker
d006b551c8 Check k/dlines against underlying IPv4 as well. 2012-01-08 15:51:48 +01:00
Jilles Tjoelker
ae52fe0ff7 Show underlying IPv4 in a remote whois. 2012-01-08 15:51:48 +01:00
Jilles Tjoelker
524a5b3ac7 Add code to get IPv4 addresses from 6to4 and Teredo IPv6 addresses.
It is not used yet.
2012-01-08 15:51:44 +01:00
Keith Buck
9319a2e206 Remove double-quote restriction on dline, kline, resv, and xline reasons; remove colon restriction on xline reasons. 2011-12-30 17:29:58 +00:00
Jilles Tjoelker
adcec062ce 'monitor s' output does not end with RPL_ENDOFMONLIST. 2011-12-21 21:29:46 +01:00
Jilles Tjoelker
be0365e152 Add an error message if a ban mask is invalid.
This is given if the ban mask is too long, it is an invalid extban or the
forward channel is invalid and no other message has been given about that.
2011-12-18 23:24:22 +01:00
Jilles Tjoelker
f2edb2be59 Disallow '$' in forward targets only, rather than all channel names. 2011-12-11 16:56:37 +01:00
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
Keith Buck
c459d23ba9 Clarify documentation for cmode +c 2011-12-01 03:38:19 +00:00
Keith Buck
6e098ed550 Add tags to .gitignore 2011-12-01 03:25:32 +00:00
Jilles Tjoelker
cf5337395c Rerun autoconf. 2011-11-29 23:41:30 +01:00
Jilles Tjoelker
ca8ff4830b Force nicklen (all flavours) to be at least 9. 2011-11-29 23:41:18 +01:00
Jilles Tjoelker
b225bf93b7 Change default --with-nicklen to 31, like atheme-services. 2011-11-29 23:32:10 +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
William Pitcock
e2606551a2 Fix potential buffer-overflow from malformed RSFNC request. 2011-11-29 15:50:54 -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
92236e376a Remove an obsolete TS5 reference. 2011-11-01 22:07:32 +01: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