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

1099 commits

Author SHA1 Message Date
Jason Volk
2d494d8924 charybdis: Move getopt out from ircd::. 2016-09-23 00:01:00 -07:00
Jason Volk
f7f9d87df0 ircd::ctx: Add context pool. 2016-09-23 00:01:00 -07:00
Jason Volk
5e8c4bb2a1 ircd::ctx: Add async() function. 2016-09-22 16:18:33 -07:00
Jason Volk
8f9e6c93d6 ircd::ctx: Add promise and future primitives. 2016-09-22 16:18:33 -07:00
Jason Volk
a6466631ce ircd::ctx: Add a mutex primitive. 2016-09-22 16:18:32 -07:00
Jason Volk
e2d115a97a ircd::ctx: Add sleep() suite, or a wait() which ignores notification. 2016-09-22 16:18:32 -07:00
Jason Volk
1a367399d3 ircd::rfc1459: Replace gather() with charset() for use with spirit char_(). 2016-09-22 16:18:32 -07:00
Jason Volk
581ca84439 ircd: sendf() directly to client (prelim). 2016-09-22 16:18:32 -07:00
Jason Volk
5dd280bb3b ircd::fmt: snprintf -> category. 2016-09-22 16:18:32 -07:00
Jason Volk
fb50f82b6e ircd::rfc1459: Allow generation of single character params, and empty strings. 2016-09-22 16:18:32 -07:00
Jason Volk
a42765f0f3 ircd::rfc1459: Relax construction of primitive structures.
Allows cleaner bracket-notated aggregate initialization through pfx.
2016-09-22 16:18:32 -07:00
Jason Volk
21aacf6509 ircd::fmt: Add syntax for specifier forced-termination.
This is available for a particular corner case due to our use of full-
word format specifiers.

Case: "%couch" is that %c followed by ouch, or is that the handled
format specifier '%couch' ?

If '%couch' is not registered there is no fallback to finding '%c'
(maybe one day), so in this case one must write "%c$ouch" and '%c'
becomes the specifier and the output for 'p' will be "pouch" and for
"%c$$ouch" the output will be "p$ouch."
2016-09-22 16:18:32 -07:00
Jason Volk
d82c013552 ircd::fmt: Develop format string basics. 2016-09-22 16:18:32 -07:00
Jason Volk
2b8bf0a4d1 ircd::fmt: Add modular format specifiers. 2016-09-22 16:18:32 -07:00
Jason Volk
d698b8a4a8 ircd: Break up rfc1459:: 2016-09-22 16:18:32 -07:00
Jason Volk
1837f55d11 ircd::rfc1459: Output grammar [part 2: protocol-safe format strings]. 2016-09-22 16:18:32 -07:00
Jason Volk
1e2ce3617d ircd::rfc1459: Output grammar [part 1: structure streams]. 2016-09-22 16:18:31 -07:00
Jason Volk
d8d2fe1564 ircd: Add scope 'life_guard' util for references in reentrant contexts. 2016-09-22 16:18:31 -07:00
Jason Volk
8f9a4bd6db ircd::util: Add util to test is type is complete. 2016-09-21 16:29:30 -07:00
Jason Volk
417594d0cd mapi: Add check for "stuck modules" and display warning for developer. 2016-09-21 16:29:30 -07:00
Jason Volk
0096a4a8c6 mapi: Reincarnate MAPI III key-value metadata, C++ style. 2016-09-21 16:29:30 -07:00
Jason Volk
ca4e04d85f ircd::vm: Introduce vm; temp demo an immediate context. 2016-09-21 16:29:30 -07:00
Jason Volk
fcd410d656 ircd::client: Add timer logic to client socket/io.
Note: Not sure if I like two reference counters for each client,
ideally, but we'll see where it goes after abstractions.
2016-09-21 16:29:30 -07:00
Jason Volk
a9f967d16a ircd: Feed received tape into the machine. 2016-09-21 16:29:30 -07:00
Jason Volk
c706357db7 ircd: Add empty() for empty line checks; retune ircd::line typedef. 2016-09-21 16:29:29 -07:00
Jason Volk
e87a8cc5d2 ircd: Add low-level net utils for client (non-abstract). 2016-09-21 16:29:29 -07:00
Jason Volk
221145b31b ircd: Remove operhash. 2016-09-21 16:29:29 -07:00
Jason Volk
ec283711c2 ircd: Rename ircd_getopt.h. 2016-09-21 16:29:29 -07:00
Jason Volk
5cc056e68c ircd: Remove privset. 2016-09-21 16:29:29 -07:00
Jason Volk
dd1ef4fecf ircd: Remove dns, packet/parse, reject. 2016-09-21 16:29:29 -07:00
Jason Volk
922337386e ircd: Remove authproc, sslproc, wsproc, bandbi. 2016-09-21 16:29:29 -07:00
Jason Volk
d36541bb86 ircd: Remove old listener. (note to readd ban logic). 2016-09-21 16:29:29 -07:00
Jason Volk
d098a524e1 ircd: Remove msgbuf. 2016-09-21 16:29:29 -07:00
Jason Volk
847cb12d35 ircd: Add preliminary u::id struct. 2016-09-21 16:29:29 -07:00
Jason Volk
26a3cd8441 Preliminary new client. Reorg/renames for ircd::client struct symbol. 2016-09-21 16:29:29 -07:00
Jason Volk
a4e810d1c8 ircd::util: Prevent scope copying / minor cleanup. 2016-09-21 16:29:28 -07:00
Jason Volk
5b607b5b1f configure.ac: Add __int128 support. 2016-09-21 16:29:28 -07:00
Jason Volk
a023048419 ircd::util: Add weak typedef util. 2016-09-21 16:29:28 -07:00
Jason Volk
59982cff43 ircd: Add utils for manipulating boost iov's. 2016-09-21 16:29:28 -07:00
Jason Volk
4f6b56c3af ircd::util: Add std::chrono timer for benching. 2016-09-21 16:29:28 -07:00
Jason Volk
eb1d8fd8e6 ircd: Add convenience to test if line has a param number. 2016-09-21 16:29:28 -07:00
Jason Volk
9d558e5eb4 ircd: Rename cmd.h/cc files to cmds.h/.cc 2016-09-21 16:29:28 -07:00
Jason Volk
556ceba8a0 ircd: new client; start over. 2016-09-21 16:29:28 -07:00
Jason Volk
89c2e74f3b ircd::ctx: Improve context interface. 2016-09-21 16:29:26 -07:00
Jason Volk
090def32d2 ircd::mods: Add unload() to unload all modules. 2016-09-21 16:28:52 -07:00
Jason Volk
0dbb0d4af5 ircd::util: Split lex_cast into header (otherwise the ifdef will never be true). 2016-09-21 16:28:52 -07:00
Jason Volk
f71a7a5fb9 ircd::rfc1459: Reorganize grammar for better reuse. Add tape parser. 2016-09-21 16:28:52 -07:00
Jason Volk
07177e8a6b ircd/charybdis: Add at_main_exit() callback to indicate IRCd has finished
to the host program. Without any indication, the outer program's handlers
will continue to keep ios.run() from returning.
2016-09-21 16:28:51 -07:00
Jason Volk
cd92e5ed91 ircd: Split cmd.h to line.h 2016-09-21 16:28:51 -07:00
Jason Volk
aca6eefcd9 ircd: Improve exception reporting on newconf parsing. 2016-09-21 16:28:51 -07:00
Jason Volk
f25cb78588 ircd: Enumerate non-standard but ubiquitous mIRC colors. 2016-09-21 16:28:51 -07:00
Jason Volk
0115433a84 Convert the console to a context. 2016-09-21 16:28:51 -07:00
Jason Volk
2742547826 Introduce modular configuration system. 2016-09-21 16:28:51 -07:00
Jason Volk
d2bb8cd8a7 ircd::ctx: Add primary features to context. 2016-09-21 16:28:49 -07:00
Jason Volk
249ba02faa Introduce userspace contexts. 2016-09-09 16:17:36 -07:00
Jason Volk
6674648590 ircd::util: Add util for template based nothrow overloading. 2016-09-09 16:17:36 -07:00
Jason Volk
88a15924ed ircd::log: Add console_quiet to suppress log messages to console. 2016-09-09 16:17:36 -07:00
Jason Volk
9275429ee1 Replace command system. 2016-09-09 16:17:36 -07:00
Jason Volk
7ae8449078 ircd::util: Add util to output the sizeof() something at compile time.
This produces an error which stops compilation, but the result of sizeof()
is given in the error message.
2016-09-09 16:17:03 -07:00
Jason Volk
8eeb6af31f ircd::util: Define user literals for space units. 2016-09-09 16:17:03 -07:00
Jason Volk
94acd49766 ircd::util: Obligatory bernstein hash. 2016-09-09 16:17:03 -07:00
Jason Volk
55d3b7ec0c ircd::util: Add logical not convenience for std::string (in our ns). 2016-09-09 16:17:03 -07:00
Jason Volk
68a1d161b9 mapi: Add alternate simple constructor. 2016-09-09 16:17:03 -07:00
Jason Volk
db3d770b9d ircd::rfc1459: Introduce formal grammar. 2016-09-09 16:17:03 -07:00
Jason Volk
7bc7d37052 ircd::util: Add string() convenience to 'to_string' an object stream. 2016-09-09 16:17:03 -07:00
Jason Volk
f446081021 ircd::rfc1459: Add util to build string of characters by attribute. 2016-09-09 16:17:03 -07:00
Jason Volk
22587f465d ircd::util: Make the flag enum operators constexpr. 2016-09-09 16:17:02 -07:00
Jason Volk
f076b33724 ircd: Trivial type clarifications in rfc1459. 2016-09-09 16:17:02 -07:00
Jason Volk
2c854124af ircd::conf: Add newconf to oldconf translation. 2016-09-09 16:17:02 -07:00
Jason Volk
3e1bf93a22 ircd: Move reconstruct_parv() from parse.cc to stringops.cc 2016-09-09 16:17:02 -07:00
Jason Volk
670990a215 Upgrade newconf parser to boost::spirit. 2016-09-09 16:17:02 -07:00
Jason Volk
5aeeb73e20 ircd: Introduce ASIO; stub for signal handling and console UI. 2016-09-09 16:17:02 -07:00
Jason Volk
baa60ed253 ircd: Add booltype to getopts parser. 2016-09-09 16:17:02 -07:00
Jason Volk
4b9dc5bff4 ircd: Populate path:: with boost::filesystem wrapping. 2016-09-09 16:17:02 -07:00
Jason Volk
4b62a704bf charybdis: Establish main entry point. 2016-09-09 16:17:02 -07:00
Jason Volk
4399c1e2c3 ircd: Populate stringops with some general utils. 2016-09-09 16:17:01 -07:00
Jason Volk
a8ed3d2dc2 Simplify ircd::fs::path related to ircd::path. 2016-09-09 16:17:01 -07:00
Jason Volk
102c15d768 ircd: Remove fs path relocations for windows. 2016-09-09 16:17:01 -07:00
Jason Volk
153b017358 ircd: Remove pidfile. 2016-09-09 16:17:01 -07:00
Jason Volk
9d0a959bb5 MAPI IV. This iteration leverages the C++11 standardized RTTI.
* Simplifies the export declarations for module developers. While
MAPI III utilized a flexible key-value vector to eliminate positional
arguments in a header initializer, now the developer simply makes
a list of pointers to what they want to export for injection into
IRCd. Example:

mapi::header IRCD_MODULE
{
	"mymod",
	"My module adds a command, a hook, and a CLICAP",
	&my_cmdtab,
	&some_hook,
	&clicaptab
};

* Distributes the handlers for items passed to the above vector.
Anyone can add a type-handler to the module system from anywhere in IRCd
(and other modules?) When your type is encountered a handler is called
providing the symbol name to read out of the module. Example in parser.cc:

mods::add_loader<Message>([]
(mod &loading, const std::string &symbol)
{
	auto &msg(get<Message>(loading, symbol));
	add_command(msg.name, msg);
});
2016-09-09 16:17:01 -07:00
Jason Volk
5994fa3f21 ircd: static_assertion for critical unsigned mode mask value. 2016-09-09 16:17:01 -07:00
Jason Volk
e052b0ed06 ircd: Reuse umode template code here and there. 2016-09-09 16:17:01 -07:00
Jason Volk
3ebde4ab50 Convert umodes to mode_lease mechanism. 2016-09-09 16:17:01 -07:00
Jason Volk
127378b57c Refactor logger. 2016-09-09 16:17:00 -07:00
Jason Volk
052a6c8d22 Refactor snomask. 2016-08-28 01:48:25 -07:00
Jason Volk
ef1a01b752 Introduce the abstract mode_lease mechanism to acquire and release slots. 2016-08-28 01:48:25 -07:00
Jason Volk
248497505b Introduce the abstract mode table template. 2016-08-28 01:48:25 -07:00
Jason Volk
883dada3d4 ircd: Rename hostmask to mask; add pretty_mask() from chmode. 2016-08-27 20:57:36 -07:00
Jason Volk
8cca1190ec ircd: Deinline stringops.h 2016-08-27 20:57:36 -07:00
Jason Volk
e586d268fc ircd::util: Add microtime() util. 2016-08-25 21:48:16 -07:00
Jason Volk
4e8fd35341 ircd::util: Add enum for_each closure for conforming enums. 2016-08-25 20:43:40 -07:00
Jason Volk
004d60658b ircd: Remove unused patchlevel.h header. 2016-08-25 06:32:52 -07:00
Jason Volk
e4673b3fc0 ircd: Remove the restart.h header (temp merge into ircd.h). 2016-08-25 06:32:52 -07:00
Jason Volk
1f91909181 ircd: Remove unused ircd_linker.h header. 2016-08-25 06:27:20 -07:00
Jason Volk
3846579e59 ircd: Remove ircd_signals.h header (temp merge into ircd.h). 2016-08-25 06:27:10 -07:00
Jason Volk
d9e90e8937 ircd::cache: Convert send function arguments client* -> client& 2016-08-25 04:57:23 -07:00
Jason Volk
5f79420c29 Refactor isupport. 2016-08-25 03:01:45 -07:00
Jason Volk
9c16de2d41 Refactor whowas. 2016-08-25 02:34:28 -07:00
Jason Volk
5f218cdbb2 Refactor scache. 2016-08-25 02:07:11 -07:00
Jason Volk
fdf396862b ircd: Move inline/stringops.h out of inline/ 2016-08-25 02:07:11 -07:00
Jason Volk
fa3d3badb7 ircd::rfc1459: Add less comparison for char pointer. 2016-08-25 02:07:11 -07:00
Jason Volk
3e26e7ab44 ircd: Move tgchange related into namespace. 2016-08-25 02:07:11 -07:00
Jason Volk
b85b33d668 ircd: Scaffold some fnv_hash overloads for now. 2016-08-25 02:07:11 -07:00
Jason Volk
9eaf1c80d1 ircd::client: Split client. 2016-08-25 02:07:11 -07:00
Jason Volk
f33b369609 Refactor umodes. 2016-08-23 15:25:09 -07:00
Jason Volk
f081f4b7cb ircd::client: Disallow copying client struct. 2016-08-23 05:22:38 -07:00
Jason Volk
b7cb55a58a ircd::client: Pop the cork. 2016-08-23 05:22:38 -07:00
Jason Volk
b65c5430f2 Refactor client flags. 2016-08-23 05:22:38 -07:00
Jason Volk
ab9a8e5c04 Convert all client handler arguments to reference type. 2016-08-23 05:22:38 -07:00
Jason Volk
3847a3e30a Add basic bitflag-enum operator relaxation utilities. 2016-08-23 05:22:38 -07:00
Jason Volk
dd9124b687 Preliminary Client refactor.
Add client to ircd::client:: namespace.

Also move former struct User and struct Server into client.cc as
opaque structure demo.
2016-08-22 15:56:12 -07:00
Jason Volk
90093b82e6 Upgrade user struct. 2016-08-21 15:30:22 -07:00
Jason Volk
9a22cfd393 ircd::chan: Add some basic protocol ERR exceptions. 2016-08-21 15:30:22 -07:00
Jason Volk
68b8a83419 ircd: Reduce is_chanop_voiced(). 2016-08-21 15:30:22 -07:00
Jason Volk
a6dccc4419 ircd: Add ircd::err exception namespace for throwable protocol errors. 2016-08-21 15:30:22 -07:00
Jason Volk
fd4af9c02a Forward declare to prevent ltdl.h inclusion. 2016-08-20 20:39:31 -07:00
Jason Volk
abf1a5c598 rb: typedef `uint' if necessary. 2016-08-20 20:39:31 -07:00
Jason Volk
9835d43977 Upgrade channels structure. 2016-08-20 20:39:29 -07:00
Jason Volk
271aa22aee ircd: Add rfc1459::less overload on string pointers. 2016-08-20 19:30:35 -07:00
Jason Volk
3be7557d53 ircd: Disable ircd_linker.h on _WIN32. 2016-08-20 19:30:35 -07:00
Jason Volk
5752be41b8 Upgrade channel membership lists. 2016-08-20 19:30:35 -07:00
Jason Volk
276cad4275 Upgrade the channel invite list. 2016-08-20 19:30:35 -07:00
Jason Volk
a84fe8a09b Upgrade bqeI channel lists. 2016-08-20 19:30:35 -07:00
Jason Volk
c5224c8142 ircd::chan: Add convenience operators for channel mode structure. 2016-08-20 19:30:35 -07:00
Jason Volk
4f7eeaa60c ircd: Add select preliminary inlines for future client refactor. 2016-08-20 19:30:35 -07:00
Jason Volk
125e3b21f2 ircd: Improve/rename channel name check related. 2016-08-20 19:30:34 -07:00
Jason Volk
7d44e271f7 Better names for some channel mode convenience former-macros. 2016-08-20 19:30:34 -07:00
Jason Volk
d064881b2d Upgrade deprecated std comparators. 2016-08-20 19:30:34 -07:00
Jason Volk
e1cccd482b Updates to match utilities. 2016-08-20 19:30:34 -07:00
Jason Volk
1e07182f3e Remove CheckEmpty() from macro scope. 2016-08-20 19:30:34 -07:00
Jason Volk
2352528ffb ircd: rename mask_match() to match_mask(). 2016-08-20 19:30:34 -07:00
Jason Volk
f5143fbf73 Add channel structure into namespace + remove related rb_banheaps. 2016-08-20 19:30:34 -07:00
Jason Volk
03660fc4b0 Refactor chmode into namespace.
She's still a bit of a mess.
2016-08-20 19:30:34 -07:00
Jason Volk
f112111e51 Add rfc1459:: case compliance namespace. 2016-08-20 19:30:34 -07:00
Jason Volk
3f6d567285 ircd: Improve/refactor version.cc -> info.cc related. 2016-08-20 19:30:34 -07:00
Jason Volk
e78103e23b rb: define ulong to complement uint. 2016-08-20 19:30:33 -07:00
Jason Volk
13a18ace2b rb: Remove defines/includes related to booltype for __cplusplus. 2016-08-20 19:30:33 -07:00
Jason Volk
d9abfc3955 Include time and iomanip standard library headers. 2016-08-20 19:30:33 -07:00
Jason Volk
1f11e88ea5 ircd: Add a place for imports into namespace ircd. 2016-08-20 19:30:33 -07:00
Jason Volk
60c044d78a Fix redundant/conflicting namespace labels. 2016-08-20 19:30:33 -07:00
Jason Volk
fc4af83fdf Remove __unused macro. 2016-08-20 19:30:33 -07:00
Jason Volk
7405910c2e ircd: Add lex_cast/boost::lexical_cast util. 2016-08-20 19:30:33 -07:00
Jason Volk
61b517ca3c Precompile and remove most include directives. Notes:
* To benefit from the precompiled-header (PCH) it MUST provide "the first C token."

Advantages:
Never worry about the include stack again. Remember, this means one less thing
for random module developers, community people learning C++, and new developers
to deal with. It should reduce the learning curve and barrier for participation.

Disadvantages:
Makes overall compilation a bit slower, especially without any additional
work to improve it again. There are several opportunities, places where the
PCH is probably being ignored, etc that can be addressed.
2016-08-20 19:30:33 -07:00
Jason Volk
029a83a17d ircd: Update exception macro to ensure format string checks. 2016-08-20 19:30:32 -07:00
Jason Volk
a1ee5034a2 Organize fs/path related into namespace. 2016-08-19 22:39:34 -07:00
Jason Volk
43575fff5b Add compile-time expression num_of<> for conforming enums. 2016-08-19 22:39:34 -07:00
Jason Volk
dd270c9d78 Fix some typoed include guard/define names. 2016-08-19 22:39:34 -07:00
Jason Volk
90c9fe686e ircd: Namespace and partially modernize ircd::cache. 2016-08-19 22:39:34 -07:00
Jason Volk
31328e4759 Add missing RAII scope util. 2016-08-19 22:39:34 -07:00
Jason Volk
7d3e1e49a5 configure.ac: Fix CPPDEFINE error and improve boost check.
Require at least 1.56 for now... Testing of older versions is
needed once librb is replaced and we know what's needed.
2016-08-19 22:39:34 -07:00
Jason Volk
a71a4551ae ircd: Insert into ircd:: namespace. 2016-08-13 02:43:42 -07:00
Jason Volk
0e62b5a91a Add PIC/PCH condition in stdinc.h. 2016-08-13 02:43:41 -07:00
Jason Volk
3dafbeaf21 ircd: Convert defaults to constexprs.
Also cleanup unused defaults.
Also move single-use defaults to a tighter scope.
2016-08-13 02:43:41 -07:00
Jason Volk
fb8792da3d ircd: Towards a comprehensive capability C -> C++ refactor. 2016-08-13 02:43:41 -07:00
Jason Volk
10946db85e Remove unused function prototype. 2016-08-12 17:02:37 -07:00
Jason Volk
f6199d5d12 Reduce redundant includes. 2016-08-12 16:41:40 -07:00
William Pitcock
09d19cbbd3 capability: clean up CAP_REQUIRED and CAP_ORPHANED flags, use bool variables instead 2016-07-31 18:39:19 -05:00
William Pitcock
e7a768ca22 capability: fix capability stats dumping 2016-07-31 18:10:31 -05:00
William Pitcock
d7eb77c61b rb: import formatter library 2016-07-31 17:55:43 -05:00
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