0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-14 12:38:54 +02:00
Commit graph

744 commits

Author SHA1 Message Date
Keith Buck
5bd79c2c56 res.c: Try other servers if errors or corrupt replies are encountered.
Currently, the resolver treats SERVFAIL, NOTIMP, and REFUSED queries the
same as NXDOMAIN, but this really should not be the case. Instead, if
the DNS server errors on our request or provides an invalid request, try
another server.

Also, count DNS server errors in addition to timeouts and avoid these
undesirable servers.
2012-10-09 05:58:02 +00:00
William Pitcock
deb24d2b31 reslib: remove advertising clause, which was dropped as a requirement by the copyright holder.
(See http://svnweb.freebsd.org/base/head/COPYRIGHT?view=co).
Closes #5.
2012-09-29 17:08:40 -05:00
William Pitcock
c4e81ae9e9 m_starttls: handle error condition with ERR_STARTTLS (691) numeric per tls-3.2 specification 2012-09-22 19:31:55 -05:00
William Pitcock
3e54d7bfb0 Define RPL_STARTTLS. 2012-09-22 14:04:57 -05:00
Jilles Tjoelker
8d20b088f9 In capability_get(), if a capability is not found, return 0 instead of all-ones.
Returning all-ones will set all caps if an unknown cap name is passed.
2012-07-03 19:16:31 +02:00
Jilles Tjoelker
33b214fa42 Fix capability_index_list(), used e.g. in /stats ? capability output. 2012-07-03 19:15:25 +02:00
Jilles Tjoelker
89fd463e59 Add needed space between "TS6" or "SSL" and capabs from CAPAB in /stats ?. 2012-07-03 19:11:15 +02:00
Jilles Tjoelker
f3b3ad0b07 chmode: Allow mode queries on mlocked modes.
Check mlock at the same point where chanops are checked (except for
querying a +e/+I list) and abstract this check into a function.

In particular, /mode #channel f is now again allowed if +f is mlocked.
2012-06-19 00:33:29 +02:00
Jilles Tjoelker
294d32bf16 If umode +D or +g are oper-only, don't advertise them in 005. 2012-05-27 22:46:24 +02:00
Keith Buck
c46a4ecd97 Move marking of services entirely to m_services.c; mark all services when m_services loads and unmark them when it unloads. 2012-05-21 21:03:56 +00:00
Keith Buck
7d60375446 Add new conf_read_start and conf_read_end hooks. 2012-05-21 20:22:07 +00:00
William Pitcock
f30a5ee4c4 Remove MODE_NOCTCP from core, in favor of chm_noctcp. 2012-03-31 22:48:36 -05:00
William Pitcock
67aeaba593 Remove MODE_NOCOLOR from core, replacing it with modules/chm_nocolour.so. 2012-03-31 22:26:45 -05:00
William Pitcock
ca4c2a86ee Add support for hookifying PRIVMSG/NOTICE.
This will allow us to modularize message processing, e.g. having new modules to manipulate
channel and private messages in new ways.

Yes: it can be used to intercept messages, but such modules are already out in the wild for
charybdis anyway -- so this doesn't really change anything there.

If you are changing the text, then it is your responsibility to provide a pointer to a new
buffer.  This buffer should be statically allocated and stored in your module's BSS segment.
We will not, and cannot, free your buffer in core, so dynamically allocated buffers will
cause a memory leak.

This will allow us to simplify m_message considerably, by moving channel mode logic out to
their own modules.
2012-03-31 21:23:01 -05:00
Jilles Tjoelker
34616c3be1 change_nick_user_host: Only send +n snotes about local clients. 2012-03-27 00:46:50 +02:00
Keith Buck
ae4ce45f2e change_nick_user_host: Send nick change notices to SNO_NCHANGE opers when change_nick_user_host is called to only change nick. 2012-03-25 01:59:20 +00:00
Keith Buck
07d3283f38 RESV FNC: Sign off/on monitor, and don't try to FNC users that already have a UID nick. 2012-03-25 01:49:34 +00:00
Keith Buck
330692a1f2 Add option to immediately apply nick RESVs by FNC'ing. 2012-03-25 01:34:45 +00:00
Keith Buck
521f9d63a9 client.c: Fix spelling/grammar in comments. 2012-03-18 01:28:55 +00:00
Keith Buck
bc4dea6937 target change: Propagate restricted addresses. 2012-03-18 01:18:57 +00:00
William Pitcock
02270e9602 Add listen::defer_accept option for controlling usage of TCP_DEFER_ACCEPT option. 2012-03-17 10:00:39 -05:00
Nathan Phillip Brink
80e49b4ca8 Run make depend. 2012-03-01 03:51:33 +00:00
Nathan Phillip Brink
96b8a6edce Fix bandb's interaction with --enable-fhs-paths by storing ban.db in the correct directory, pkglocalstatedir. 2012-03-01 03:39:54 +00:00
Nathan Phillip Brink
c74836dc4a Add explicit support for being installed into a system triggered with --enable-fhs-paths.
Add two mechanism for avoiding name-collisions in a system-wide
installation of charybdis. The ssld and bandb daemons, intended to be
directly used by ircd and not the user, install into libexec when
--enable-fhs-paths is set. For binaries which are meant to be in PATH
(bindir), such as ircd and viconf, there is now an option
--with-program-prefix=progprefix inspired by automake. If the user
specifies --with-program-prefix=charybdis, the ircd binary is named
charybdisircd when installed.

Add support for saving the pidfile to a rundir and storing the ban
database in localstatedir instead of in sysconfdir. This is, again,
conditional on --enable-fhs-paths.

Fix(?) genssl.sh to always write created SSL key/certificate/dh
parameters to the sysconfdir specified during ./configure. The
previous behavior was to assume that the user ran genssl.sh after
ensuring that his current working directory was either sysconfdir or a
sibling directory of sysconfdir.
2012-03-01 02:41:09 +00:00
Nathan Phillip Brink
414c5f7d9b Fix parallel compilation issue when building lexer/parser. 2012-02-28 04:36:00 +00:00
William Pitcock
63a0ed0604 numeric: reserve RPL_SASLMECHS (908) 2012-02-21 09:15:15 -06:00
Jilles Tjoelker
d42e6915cf Pace aways.
This becomes important because of away-notify sending aways to common
channels much like nick changes (which are also paced).

Marking as unaway is not limited (but obviously only does something if the
user was away before). To allow users to fix typos in away messages, two
aways are allowed in sequence if away has not been used recently.
2012-02-18 16:32:57 +01:00
Keith Buck
e88a1f1b15 Add ratelimit for high-bandwidth commands. 2012-02-18 03:54:44 +00:00
Jilles Tjoelker
7f0fc87d3c Include forward channels when bursting bans to servers.
Obtained from:	ircd-seven (spb)
2012-02-16 23:36:05 +01:00
Keith Buck
c5bbc60375 Add away-notify client capability. 2012-02-14 14:15:44 +00:00
Keith Buck
3e910a1847 chmode.c: Fix bug in printing removed bans. 2012-02-06 16:38:10 +00:00
William Pitcock
a16910aa4e capability: add capability_index_stats() for getting statistics about the capability broker system 2012-02-04 21:27:43 -06:00
William Pitcock
885cd603b5 capability: add global list of capability indexes, and name all capability indexes 2012-02-04 21:16:40 -06:00
Jilles Tjoelker
bde42c6063 Don't shadow the name "index". 2012-02-04 15:15:26 +01:00
William Pitcock
8bedf01d19 capability: store capability bit entries with actual bit numbers, instead of as an expanded mask
This makes accounting of number of bits allocated easier.  Specifically, the amount of allocated
bits is computed by doing (index->highest_bit - 1) in code.
2012-02-04 05:23:15 -06:00
William Pitcock
e915e51f4d capability: don't use DictionaryIter internals.
it's just ugly now that we're providing our own copies of keys.
2012-02-04 05:13:04 -06:00
William Pitcock
e679e38906 capability: do not use strings provided by modules for keyword index, instead duplicate the keyword. 2012-02-04 04:47:37 -06:00
William Pitcock
f01f67f0ad capability: add capability_require(). 2012-02-04 02:00:33 -06:00
William Pitcock
0582290f21 capability: missed one 2012-02-04 01:58:07 -06:00
William Pitcock
5058c8ebce capability: change CapabilityIndex.orphaned to (CapabilityIndex.flags & CAP_ORPHANED)
This makes it possible to add other flags to capabilities.
2012-02-04 01:55:11 -06:00
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
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