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

790 commits

Author SHA1 Message Date
William Pitcock
d0a59d58a0 capability: major rewrite for C++ support.
- no rb_dictionary use anymore
- CapabilityIndex converted into a proper class
- proper RAII lifecycle management
2016-07-31 03:18:22 -05:00
William Pitcock
ddd9920f5b util: memory, not unique_ptr header :) 2016-07-31 02:14:37 -05:00
William Pitcock
6fb9a722a2 fix build on clang++ 3.8 2016-07-31 01:59:57 -05:00
William Pitcock
10ff2d192c alias: convert to RAII/std::string/etc, no more rb_dictionary use (ref #202) 2016-07-31 01:57:04 -05:00
William Pitcock
1c77b054a8 parse: move cmd_dict to a std::set 2016-07-31 01:36:14 -05:00
William Pitcock
c7135bdf9a cache: adopt proper RAII pattern 2016-07-31 01:03:05 -05:00
William Pitcock
1c813cee95 cache: rough conversion of help system to std::map (ref #202) 2016-07-30 22:13:29 -05:00
William Pitcock
d18e5dc54f util: add std::map helpers for using case-insensitive strings/irccmp strings 2016-07-30 21:54:48 -05:00
William Pitcock
12ef3b15d6 fs: use normal ETCDIR for now 2016-07-30 21:02:24 -05:00
William Pitcock
f9a4adc03b headers: make ircd namespace inline in more places 2016-07-30 20:52:41 -05:00
William Pitcock
d60c03c28f Revert "headers: don't use inline namespaces"
This reverts commit 51a75f00be.
2016-07-30 20:50:27 -05:00
William Pitcock
51a75f00be headers: don't use inline namespaces 2016-07-30 20:47:44 -05:00
Jason Volk
625fb277ca Add root exception + basic utilities. 2016-07-25 19:43:26 -07:00
Jason Volk
73297c988b Preliminary defaults/paths namespacing.
The namespace is inline to mimic the C namespace for now.
2016-07-25 16:49:00 -07:00
Jason Volk
4796bec441 Activate PCH for position independent code.
Cuts compilation time by 30%+
2016-07-25 00:54:38 -07:00
Jason Volk
d1edbc0e58 Complete the C++ linkage with flex/bison. 2016-07-25 00:54:38 -07:00
Jason Volk
78ad65f386 ircd/rb: Move some remaining macros to rb. 2016-07-24 21:15:47 -07:00
Jason Volk
02119375b1 Add --disable-pch configuration option. 2016-07-23 19:40:18 -07:00
Jason Volk
31f4d0d699 Fix rb.h.gch compilation flags. 2016-07-23 19:40:18 -07:00
Jason Volk
404239eb60 Build system cleanup. 2016-07-22 19:46:28 -07:00
Jason Volk
1a8ed13747 ircd: Make Chm::mode_type unsigned long. 2016-07-22 19:46:28 -07:00
Jason Volk
e7e7f8ff9f Convert bison.
NOTE: This only has "C" linkage right now.
2016-07-22 19:46:27 -07:00
Jason Volk
834964c659 Convert IRCd to C++
Happy 28th birthday. You're all grown up.
2016-07-22 19:46:27 -07:00
Jason Volk
7cea4c784d ircd: Merge the defaults/ircd_defs stuff for now.
ircd/rb: Move some lowish level macros down to rb.
2016-07-21 20:51:02 -07:00
Jason Volk
ffb2f63850 ircd: newconf: Fix const correctness. 2016-07-21 20:51:02 -07:00
Jason Volk
ea53aab823 Refactor repository layout.
* librb is no longer a separately configured subproject.
* charybdis is now a standalone directory with a binary.
* Include path layout now requires a directory ircd/ rb/ etc.
2016-07-21 20:51:02 -07:00
Jason Volk
007c6bf496 ircd/librb: Move "AFP" macro from ircd to rb. 2016-07-19 22:38:56 -07:00
Jason Volk
acd516444a Fix header compatibility with c++ dialects.
This allows the option of at least -std=gnu++14 for new translation units.
Changes are trivial.
2016-07-19 22:38:56 -07:00
Jason Volk
e8355cb7be MAPI Version 3
This version leverages a flexible, cleaner key-value strategy
reducing the need to design entire new headers for every feature
addition, change, etc.

* A friendly declaration for the module authors, with minimal
requirements to fill in, and explicit labels of what the fields are.
* Repetition of keys, removing references to (and the requirement to
build) a clist, hlist and hfnlist and caplist and whatever the future
holds.
* Safe deterministic loading and unloading. Keys are evaluated in
order, errors can be recognized, and unloading occurs in reverse
order.

ircd: Refactor internal half of modules.c, with some V3 additions.
Provides better delegation for versions, a cleaner stack with better
error handling, and some functionality deduping. V1 and V2 handlers
are still somewhat unaltered, just factored in.
2016-06-28 20:14:09 -07:00
Jason Volk
97a4adae40 ircd/librb: epoch needs a john hancock 2016-06-28 20:14:09 -07:00
Jason Volk
c5698b0276 librb: Move bool type stuff from ircd stdinc to rb. 2016-06-28 17:00:14 -07:00
Jason Volk
3073c2fa3a ircd: Add slog(), a log function that takes both an L_ argument and
a SNO_ argument to smash the pattern of having an ilog() followed by
sendto_realops_snomask() with the same message.
2016-06-27 14:32:53 -07:00
Jason Volk
6357ad5fd9 Add a reason pointer to hook_data_privmsg_channel. When set, the reason is appended to the text of ERR_CANNOTSENDTOCHAN. The pointer will not be free()'ed. 2016-06-25 22:57:04 -05:00
William Pitcock
7e1bb8ad0d Proper channel mode classification. Fixes existing ad hoc
channel mode classification which is required by RPL_MYINFO indicating arity,
and RPL_ISUPPORT indicating an enumerated class. The content of these replies
had previously been generated by hardcoded strings of some letters.

Channel modes require classification which corresponds to the
CHANMODES= data in RPL_ISUPPORT. Classes A,B,C can then be
listed in the unary column of RPL_MYINFO. cflag_add() is updated
for this. Additional cleanup of chmode.h and channel.h
circularity is also proffered within.

Submitted-by: Jason Volk <jason@zemos.net>
2016-06-25 22:54:37 -05:00
William Pitcock
e55a9d6abc modules: serious cleanups 2016-06-18 00:52:16 -05:00
William Pitcock
92dad4831d modules: cleanups 2016-06-18 00:38:40 -05:00
William Pitcock
8e30e3def4 messages: fix format string warning reported by latest clang 2016-06-17 23:39:19 -05:00
Aaron Jones
aa7b99eb77
restart: functions that call exit(3) should be marked noreturn 2016-06-01 20:54:12 +00:00
Aaron Jones
df3db5d99b
ircd: functions that call exit(3) should be marked noreturn 2016-06-01 20:54:12 +00:00
Aaron Jones
341560ecf2
getopt: a function that calls exit(3) should be marked noreturn 2016-06-01 20:54:12 +00:00
Simon Arlott
da20854e83
random_ping: stop producing negative values that become 16 chars 2016-05-02 21:14:16 +01:00
Simon Arlott
f018ed844d
certfp: Move method name/prefix strings to a separate header file 2016-04-26 20:33:18 +01:00
Simon Arlott
5adde7a4ed
getopt: don't modify argv as it breaks restart() 2016-04-25 23:32:18 +01:00
Simon Arlott
762468f85d
authd: wait until the ssl connection is "open" before reading
It's useful to allow authd to run in parallel with ssl negotiation,
but if the ssld connection has plaintext data ready for reading
there's a race condition between authd calling read_packet() and
ssl_process_certfp() storing the certificate fingerprint. This
scenario would be bad for a server connecting because fingerprint
verification will fail.

Allow either operation to complete first, but wait until
ssl_process_open_fd() calls the ssl open callback before calling
read_packet().
2016-04-25 21:43:21 +01:00
Simon Arlott
53789fddda
sslproc: simplify ssl open callback
Don't use the librb callback type as we're always passing client_p.

Provide a return value so that the connect handler can exit_client()
and the accept handler can opt to use the default dead handler.
2016-04-25 21:12:44 +01:00
Simon Arlott
f7b0c4b3d8
sslproc: use global ServerInfo configuration
There's no need to pass information around that sslproc already has access
to, so use ServerInfo directly. Remove the extra NULL checks as these are
already performed before setting ircd_ssl_ok = true.
2016-04-25 19:20:45 +01:00
Simon Arlott
d4214e9445
ircd: server connection configuration
Fix the server connection configuration so that it can simultaneously
handle a hostname/IPv4/IPv6 for connecting and a hostname/IPv4/IPv6
for binding. Maintains backwards compatibility for matching a hostname
with a mask.

Multiple host/vhost entries can be specified and the last value for
each address family is stored. Hostnames that resolve automatically
overwrite the IP address.

Server connections can now be made to either IPv4 or IPv6 at random
as well as preferring a specific address family.
2016-04-24 17:06:24 +01:00
Simon Arlott
4fbb736202
ssld: add a callback when the connection is opened
This allows us to wait until we have the fingerprint information before
continuing with a server connect process.
2016-04-24 11:48:35 +01:00
Simon Arlott
3085734104
m_stats: display certificate fingerprint in STATS C 2016-04-24 01:06:51 +01:00
Elizabeth Myers
7445ece1d1
Revert "Implement the netsplit batch type."
This needs more work, see
https://github.com/ircv3/ircv3-specifications/issues/253

This reverts commit 2373891299.
2016-04-16 11:05:00 -05:00