0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-28 11:48:54 +02:00
Commit graph

1026 commits

Author SHA1 Message Date
Jason Volk
20e62f04df ircd::js: Minor context interface cleanup; prevent task struct address change. 2016-11-25 19:23:47 -08:00
Jason Volk
070771f49b ircd::mods: Make log messages more consistent. 2016-11-25 19:23:47 -08:00
Jason Volk
8554fc858b ircd::log: Add function to logger with facility argument. 2016-11-25 19:23:47 -08:00
Jason Volk
f0a9f8bdc4 ircd::js: Improve information in various debug outputs. 2016-11-25 19:23:46 -08:00
Jason Volk
a44e6f701f ircd::js: Fix pending exception propagation on interleaving stack. 2016-11-25 19:23:46 -08:00
Jason Volk
ae4057b1d5 ircd::js: Use std::string for trap mapping. 2016-11-25 19:23:33 -08:00
Jason Volk
f92f117edc ircd::js: trap GC handler must be 'noexcept' apropos JS. 2016-11-13 16:34:27 -08:00
Jason Volk
559bc530c8 ircd::js: Improve off-thread compilation error handling. 2016-11-13 16:34:27 -08:00
Jason Volk
c8402577c3 ircd::js: GC related fixes. 2016-11-13 16:34:27 -08:00
Jason Volk
c3e6c52192 ircd::js: Improve private slot access. 2016-11-13 16:34:27 -08:00
Jason Volk
7a99d919d6 ircd::js: Improve reserved data access. 2016-11-13 16:34:27 -08:00
Jason Volk
84383d41d8 ircd::js: Fix unconditional cast of this to object type in trap::on_call handlers. 2016-11-13 16:34:24 -08:00
Jason Volk
fcc654699d ircd::locale: Add char16_t conversion overloads for unterminated strings.
ircd::js: Use sized conversions when calling ircd::locale.
2016-11-13 16:34:06 -08:00
Jason Volk
b8f5366f52 ircd::js: Improve trap callback arguments; add this value. 2016-11-13 16:34:00 -08:00
Jason Volk
67d9f11fbc ircd::js: Add constructible-id overload for get()/set()/has()/del(). 2016-11-13 16:33:25 -08:00
Jason Volk
da78598d86 ircd::mapi: Rectify linkage of the header symbol name string. 2016-11-13 16:33:25 -08:00
Jason Volk
0d2d21b49f ircd::js: Add asynchronous/concurrent compilation. 2016-11-13 16:33:24 -08:00
Jason Volk
edd77d2265 ircd::js: Add asynchronous state and completion target mechanism. 2016-11-13 16:33:22 -08:00
Jason Volk
333b0dca5a ircd::js: Use a script object in the task (more flexible than function). 2016-11-13 16:32:42 -08:00
Jason Volk
0e541cd3a9 ircd::js: get()/set()/has()/del() for array object indexes. 2016-11-13 16:32:41 -08:00
Jason Volk
d5fd794511 ircd::js: Add JSProp flags as arguments for constructing trap. 2016-11-13 16:32:41 -08:00
Jason Volk
0ed531fff1 ircd::js: Move JSClass instances to a drainage container until JSRuntime shutdown. 2016-11-13 16:32:41 -08:00
Jason Volk
f2b59a57dc ircd::js: Variadic arguments for object construction via trap. 2016-11-13 16:32:41 -08:00
Jason Volk
d2b3bedca6 ircd::js: Task identification (PID) and reference counted management. 2016-11-13 16:32:41 -08:00
Jason Volk
cca79d87fc ircd::js: Assertions for pending exceptions. 2016-11-13 16:32:41 -08:00
Jason Volk
e214d6e40c ircd::js: Remove boolean return type from trap hook for enumeration. 2016-11-13 16:32:41 -08:00
Jason Volk
bf540caead ircd::js: Order arguments to call() more intuitively. 2016-11-13 16:32:41 -08:00
Jason Volk
8a3f592753 ircd::js: Add property flag reflection. 2016-11-13 16:32:41 -08:00
Jason Volk
1adc76034c ircd::js: Fix trap constructor handler (?) 2016-11-13 16:32:41 -08:00
Jason Volk
3fcd3d2bb0 ircd::js: Trap find() overload with JSString type. 2016-11-13 16:32:40 -08:00
Jason Volk
12c1755899 ircd::js: Functions to get current zone; debug callbacks for zone; etc. 2016-11-13 16:32:40 -08:00
Jason Volk
c70ddd5a80 ircd::js: Allow setting the ECMA version for a compartment. 2016-11-13 16:32:40 -08:00
Jason Volk
845e81e446 ircd::locale: Move char16_t conversions into namespace. 2016-11-13 16:32:40 -08:00
Jason Volk
fc6cf72e2d ircd::js: Nullify the trap JSClass contents on dtor; minor fixes. 2016-11-13 16:32:40 -08:00
Jason Volk
cff506e0be ircd::js: Add global/task struct. 2016-11-13 16:32:40 -08:00
Jason Volk
d0ec6497c7 ircd::js: Add object private/reserved getters and setters. 2016-11-13 16:32:40 -08:00
Jason Volk
2846f80a8d ircd::js: Make trap tree root thread local near rt/cx. 2016-11-13 16:32:40 -08:00
Jason Volk
5e81c26fdf ircd::js: Add and use calls for current_compartment(). 2016-11-13 16:32:39 -08:00
Jason Volk
639dd7903b ircd::js: Move TLS assignment out of runtime/context (though this doesn't matter). 2016-11-13 16:32:39 -08:00
Jason Volk
ac14c2a4db ircd::js: Add generator state class. 2016-11-13 16:32:39 -08:00
Jason Volk
afefb2db07 ircd::js: Fix erroneous has() exception. 2016-11-13 16:32:39 -08:00
Jason Volk
7e18e32ce4 ircd::js: Improve/cleanup exception string generaton related. 2016-11-13 16:32:39 -08:00
Jason Volk
164f650a0f ircd::js: Use JS::Heap<> container for exception value. 2016-11-13 16:32:39 -08:00
Jason Volk
6b5bab0871 ircd::js: Convert all JS type wrappers into templates and typedef on requsted GC.
Templates are now in the namespace basic:: i.e `basic::value<>`
Typedefs are in ircd::js:: matching the original non-template types.

Ex. stack-duration type in template form is: `basic::value<lifetime::stack>`
Ex. stack-duration type in typedef form is `value`
Ex. heap-duration type in template form is: `basic::value<lifetime::heap>`
Ex. heap-duration type in typedef form is: `heap_value`
2016-11-13 16:32:39 -08:00
Jason Volk
7e66df914a ircd::js: Add debug dump() calls from JS_DEBUG ifdef'ed api. 2016-11-13 16:32:39 -08:00
Jason Volk
54c8044ca1 ircd::js: Add trap_function alternative to full object trap. 2016-11-13 16:32:38 -08:00
Jason Volk
5de2622bd1 ircd::js: Add string literal constructor to prevent any alloc/copy/free. 2016-11-13 16:32:38 -08:00
Jason Volk
118fc20bbc ircd::js: Use js strings in trap tree mappings. 2016-11-13 16:32:38 -08:00
Jason Volk
be48466ef3 fixup! [temp] Checkpoint test. 2016-11-13 16:32:38 -08:00
Jason Volk
4c62795aeb ircd::js: Use jsapi external string facilities for string constructions. 2016-11-13 16:32:38 -08:00
Jason Volk
6a1fb4e8fb ircd::local: Add additional char/char16_t buffer conversion. 2016-11-13 16:32:37 -08:00
Jason Volk
97c0d3df7d ircd::js: Support trap dtors on GC. 2016-11-13 16:32:37 -08:00
Jason Volk
ae40f9c016 ircd: Move all signal handling to charybdis executable. 2016-11-13 16:32:37 -08:00
Jason Volk
2d89b583e9 ircd::mods: Throw filesystem_error when requesting symbols on bad path. 2016-11-13 16:32:37 -08:00
Jason Volk
859f464698 ircd::ctx: Set the SELF_DESTRUCT flag on context::detach(). 2016-11-13 16:32:37 -08:00
Jason Volk
a8736e2198 ircd::js: Record the main thread id to know if js ever calls/debugs from another. 2016-11-13 16:32:37 -08:00
Jason Volk
04c6b67649 fixup! ircd::js: Stub runtime/context callback framework. 2016-11-13 16:32:37 -08:00
Jason Volk
91d11f391b ircd::js: Add recursive tree semantics to object trap system. 2016-11-13 16:29:47 -08:00
Jason Volk
fedeab2ddd ircd: Add locale:: namespace for portable internationalization. 2016-11-13 16:29:47 -08:00
Jason Volk
fd0f925459 ircd::js: Add handle typedefs in object wrappers to clean up arguments. 2016-11-13 16:29:47 -08:00
Jason Volk
6d7e1157b1 ircd::js: Add recursive has(), get(), set(), del(). 2016-11-13 16:29:46 -08:00
Jason Volk
b69444138f ircd::js: Reflect JSType + value type tests. 2016-11-13 16:29:46 -08:00
Jason Volk
1ae9f4ffa4 ircd::js: Add function_literal convenience. 2016-11-13 16:29:46 -08:00
Jason Volk
c2f23a01bd ircd::js: Support more debug and statistics from js engine. 2016-11-13 16:29:46 -08:00
Jason Volk
8f9465764d ircd::js: Construct compartment from more implicit information. 2016-11-13 16:29:46 -08:00
Jason Volk
c704c67aa5 ircd: Add more stringops tokenizer overloads. 2016-11-13 16:29:46 -08:00
Jason Volk
9ecb26d27e ircd::js: Simplify the interrupt(context) call. 2016-11-13 16:29:46 -08:00
Jason Volk
b6ba71b6a0 ircd::js: Add ctor/call functionality to object trap. 2016-11-13 16:29:46 -08:00
Jason Volk
83fbbc6462 ircd::js: Fix compartment acquire; trap JSClass delete; debug related. 2016-11-13 16:29:46 -08:00
Jason Volk
5069df70c0 ircd::js: Add string comparison, equality operator and empty on null. 2016-11-13 16:29:45 -08:00
Jason Volk
aae1264d7f ircd::js: Add some GC related stats/controls. 2016-11-13 16:29:45 -08:00
Jason Volk
2d89f0e97c ircd::js: Improve exception sequence / Add script and line data. 2016-11-13 16:29:45 -08:00
Jason Volk
f9848b0494 ircd::js: Add wait-free (for the user) timer. 2016-11-13 16:29:45 -08:00
Jason Volk
ad1fef4247 ircd::js: Add wait-free execution interruption. 2016-11-13 16:29:45 -08:00
Jason Volk
2f645941a8 ircd::ctx: Move ctx headers into directory. 2016-11-13 16:29:45 -08:00
Jason Volk
e6c8025ae0 ircd::ctx: Add yield() allowing other contexts to run before returning. 2016-11-13 16:29:45 -08:00
Jason Volk
b289c63b99 ircd::js: Improve the exception translation. 2016-11-13 16:29:45 -08:00
Jason Volk
4872883860 ircd::js: Improve value construction / string related. 2016-11-13 16:29:45 -08:00
Jason Volk
0b9efe06a1 ircd::js: Make the best of SM's jsalloc.h missing ReportOutOfMemory here. 2016-11-13 16:29:45 -08:00
Jason Volk
23318a2b4f ircd::js: Add script object + caller / deinline function caller. 2016-11-13 16:29:44 -08:00
Jason Volk
8108773021 ircd::js: Wrap JSAPI objects for better semantics. 2016-11-13 16:29:44 -08:00
Jason Volk
f0a1177c07 ircd::js: Fix assertion of handler type for Global object trap. 2016-11-13 16:29:44 -08:00
Jason Volk
b3c46af4a1 ircd::js: Lock context and run js dtor even on bailout for now. 2016-11-13 16:29:44 -08:00
Jason Volk
7fa3777a57 ircd::js: Improve trap exceptions; noexcept all jsapi callbacks. 2016-11-13 16:29:44 -08:00
Jason Volk
4171a9c834 ircd::js: Add js exception hierarchy. 2016-11-13 16:29:44 -08:00
Jason Volk
2c231ac187 ircd: Add exception message generation bypass constructor. 2016-11-13 16:29:44 -08:00
Jason Volk
dffb39f8cc ircd::js: Add string utf conversions; improve string related. 2016-11-13 16:29:44 -08:00
Jason Volk
4cc0b16086 ircd::js: Force garbage collection when a trap is destructed. 2016-11-13 16:29:44 -08:00
Jason Volk
7b5629e4a5 ircd::js: Add basic trap debug / rename trap.res -> trap.has. 2016-11-13 16:29:44 -08:00
Jason Volk
34881325bb ircd::js: Develop object compartment related. 2016-11-13 16:29:43 -08:00
Jason Volk
0e2b8600e5 ircd::js: Moz people recommend thread_local JSRuntime/JSContext;
There is no reason to clutter most arguments with contexts. Additionally
these will be merged in the future SpiderMonkey. There is only one
JSRuntime/JSContext per thread and it must be locked when in use.
2016-11-13 16:29:43 -08:00
Jason Volk
6db6b2a975 ircd::js: Add trap to define JSObject functionality in C. 2016-11-13 16:29:43 -08:00
Jason Volk
c7ea23bece ircd::js: Add debug / reflection for JSErrorReport; deinline other debug. 2016-11-13 16:29:43 -08:00
Jason Volk
01e6e732cc ircd::js: Stub runtime/context callback framework. 2016-10-25 01:55:50 -07:00
Jason Volk
c1fd6391c6 ircd::js: Add barebones accoutrements. 2016-10-25 01:55:50 -07:00
Jason Volk
191258cea5 ircd::js: Add main runtime and main context. 2016-10-25 01:55:50 -07:00
Jason Volk
95068c7d06 Introduce Mozilla SpiderMonkey. 2016-10-25 01:55:50 -07:00
Jason Volk
fde4626fce ircd::cmds: Minor cleanup of cmds:: related. 2016-10-11 03:30:11 -07:00
Jason Volk
43b07d1180 ircd: Add more token related stringops. 2016-10-11 03:30:11 -07:00
Jason Volk
5e0659b2f9 ircd: Use variable length receive buffer. 2016-09-28 14:19:18 -07:00
Jason Volk
757d7e10a8 [temp] checkpoint some crap which isn't going to stick. 2016-09-27 17:29:06 -07:00
Jason Volk
bbd73746c3 ircd::ctx: Abstract the db::work subsystem into ctx::ole OffLoad Engine (OLE). 2016-09-27 17:28:24 -07:00
Jason Volk
33cc4c19d7 ircd::db: Add standard iteration + caching/options improvements. 2016-09-27 17:27:48 -07:00
Jason Volk
2251595551 ircd::ctx: Add preliminary profiling system to mitigate silent degradation.
This system alerts the developer when something blocks a context from yielding
for too long or exceeds stack usage limits. More profiling can be added for
further optimization.
2016-09-27 17:27:48 -07:00
Jason Volk
acd5593aac ircd::db: Develop basic key/value API. 2016-09-27 17:27:48 -07:00
Jason Volk
3083bb8e62 ircd::db: Add logging mask for db subsys and improve handle opening messages. 2016-09-27 17:27:48 -07:00
Jason Volk
34eae9a829 ircd::db: Develop options system for database. 2016-09-27 17:27:48 -07:00
Jason Volk
5df4bf6da2 ircd::db: Add database interface. Support RocksDB. 2016-09-27 02:20:42 -07:00
Jason Volk
e642d24681 ircd::mods: Allow a symbol unloader when no loader is given. 2016-09-27 02:20:42 -07:00
Jason Volk
1da6aa2b93 ircd::mapi: Improve the stuck-module message by showing it immediately. 2016-09-27 02:20:42 -07:00
Jason Volk
6d2d5a71f5 ircd::fs: Add function to build path. 2016-09-26 16:06:56 -07:00
Jason Volk
0913873b30 ircd::fs: Generalize DBPATH. 2016-09-26 16:06:56 -07:00
Jason Volk
284bad47e9 ircd: Add mods::init; a subsystem init/fini singleton held by ircd::main(). 2016-09-24 16:40:02 -07:00
Jason Volk
a4d186b6a1 ircd: Refactor hook system. 2016-09-23 00:01:00 -07:00
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
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
ccac92704d ircd::fmt: Add "%param" and "%parv" for middle and full-vector, respectively. 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
99ad299ef0 ircd::fmt: Add a "%prefix" specifier which builds ":foo!bar@baz" from the arg. 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
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
679855be15 ircd: Split rbuf.h off client.cc 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
fe7a1faccb ircd::rfc1459: Modify the tape grammar to accept empty terminated inputs. 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
1fcb08d261 ircd: Post main exit cb to ios to keep the user off our stack; improve main comments. 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
6252d6f11e ircd: Remove cruft which boost abstracts away. 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
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
26adba7356 ircd::mods: Ignore empty handlers. 2016-09-21 16:28:52 -07:00
Jason Volk
090def32d2 ircd::mods: Add unload() to unload all modules. 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
aca6eefcd9 ircd: Improve exception reporting on newconf parsing. 2016-09-21 16:28:51 -07:00
Jason Volk
45c37f602e ircd: Establish main context; primary flow. 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
88a15924ed ircd::log: Add console_quiet to suppress log messages to console. 2016-09-09 16:17:36 -07:00
Jason Volk
cead127c73 ircd::rfc1459: Adjust grammar to allow 'empty message' of "\r\n" 2016-09-09 16:17:36 -07:00
Jason Volk
9275429ee1 Replace command system. 2016-09-09 16:17:36 -07:00
Jason Volk
46d992d3a0 ircd::log: Connect the -debug command line switch to DEBUG facility. 2016-09-09 16:17:34 -07:00
Jason Volk
ae71d5eabb ircd::modules: Search for module with automated path suffix. 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
f446081021 ircd::rfc1459: Add util to build string of characters by attribute. 2016-09-09 16:17:03 -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
edd8fa2ab0 Chase the Bison off a cliff.
---<<|<᚜<᚜᚜᚜᚜-
2016-09-09 16:17:02 -07:00
Jason Volk
12c836dc6e Rip out libltdl. 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
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
7dc9b7648e ircd: Remove pleonastic message prefix in sendto_realops_snomask(). 2016-08-28 01:48:25 -07:00
Jason Volk
052a6c8d22 Refactor snomask. 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
21cfd2eefd ircd: Rename newconf name conflict. 2016-08-26 08:50:11 -07:00
Jason Volk
9d87313756 ircd: Hose fork()/close(fd) related. 2016-08-25 22:02:19 -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
3e26e7ab44 ircd: Move tgchange related into namespace. 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
2088193118 ircd: Allow non-default CAP_MASK during server estab. 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
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
25d7274afa Fix missing namespace import. 2016-08-20 20:39:31 -07:00
Jason Volk
9835d43977 Upgrade channels structure. 2016-08-20 20:39:29 -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
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
e1cccd482b Updates to match utilities. 2016-08-20 19:30:34 -07:00
Jason Volk
b7a84d3650 Prevent ambiguous cast when the comparator function is overloaded. 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
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
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
90c9fe686e ircd: Namespace and partially modernize ircd::cache. 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
fb8792da3d ircd: Towards a comprehensive capability C -> C++ refactor. 2016-08-13 02:43:41 -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
8bb208aaa2 version: don't crash due to buffer underrun 2016-07-31 03:35:45 -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
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
4ed0aebcb6 cache: further cleanups 2016-07-31 01:21:10 -05:00
William Pitcock
840ffb0935 cache: do not cause an implicit copy of std::string elements 2016-07-31 01:19:15 -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
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
404239eb60 Build system cleanup. 2016-07-22 19:46:28 -07:00
Jason Volk
8f03786300 ircd: Use rb_socklen_t type. 2016-07-22 19:46:28 -07:00
Jason Volk
ac577c1322 Regress brace init relaxation for clang. 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
754a6d9b5c ircd: add local .gitignore. 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
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
de800bd3d7 ircd: Fix log error. 2016-07-19 22:35:49 -07:00
Jason Volk
fbcb6a2549 ircd: Fix missing operhash reference decrement from b02a913b. 2016-07-19 15:59:35 -07:00
Jason Volk
d58468f03b Fix erroneous return value. 2016-07-16 11:49:19 -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
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
Mantas Mikulėnas
33bbdf474e
use designated initializers for the mode table
The table sure was pretty but we've been using the C99 syntax in quite a
few places already with no complaints, anyway.
2016-06-27 09:18:01 +03: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
Jason Volk
12de082e2c Fix bug. Note: The second hunk is just an assumption. It's not called from anywhere. 2016-06-25 14:27:32 -05:00
Jason Volk
b5cfad0319 Core modules cannot be unloaded, otherwise bad things happen.
Additionally some information is logged and passed to the operator
conducting a MODRESTART.
2016-06-21 17:42:36 -07:00
Jason Volk
94afbe9c8e ircd: Fix capability entry name string ownership.
The entry->cap must be copied and exclusive to the entry for the
cap to be orphaned, even if literals are expected. Because modules.
2016-06-21 17:32:28 -07:00
William Pitcock
94555087a1 ircd: relocate_paths() back on windows only now 2016-06-18 01:05:38 -05:00
William Pitcock
1e37cb443d conf_parser: warning fixes 2016-06-18 00:52:54 -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
73b70ae846 ircd: fix compile of relocate_paths() 2016-06-18 00:22:02 -05:00
William Pitcock
7145720468 ircd: make relocate_paths() available always 2016-06-18 00:21:39 -05:00
William Pitcock
c51b77a312 ircd: call relocate_paths() in all cases 2016-06-18 00:20:59 -05:00
William Pitcock
e0e0c41524 ircd: print runtime path configuration 2016-06-17 23:36:47 -05:00
Aaron Jones
ab9088ad2e
wsproc: compile out dead code
Investigation is required to determine if this function should
actually be used
2016-06-01 20:54:12 +00:00
Aaron Jones
0b91afb2e1
ircd_signal: a function that tailcalls a noreturn function 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
b1cfd3922c
dns: make function used only within this unit static 2016-06-01 20:54:12 +00:00
Aaron Jones
4decc628bd
class: remove unused macros 2016-06-01 20:54:12 +00:00
Aaron Jones
ce2c092b49
chmode: remove unreachable break statement 2016-06-01 20:54:12 +00:00
Aaron Jones
bca336720e
chmode: silence harmless uninitialised variable warning 2016-06-01 20:54:12 +00:00
Aaron Jones
ec5522a1ca
channel: silence harmless uninitialised variable warning 2016-06-01 20:54:12 +00:00
Aaron Jones
2ec9f59588
bandbi: a function that calls exit(3) should be marked noreturn 2016-06-01 20:54:11 +00:00
Aaron Jones
5cbd46a893
authproc: don't shadow variable decls, avoid reserved name 2016-06-01 20:54:11 +00:00
Aaron Jones
0982871a99
strcpy: mass-migrate to strlcpy where appropriate 2016-05-15 03:58:44 +00:00
Aaron Jones
d539f22782
ircd_lexer: fix another crash with the same cause 2016-05-15 00:57:16 +00:00
Aaron Jones
401cb2bb17
ircd_lexer: fix crash with very large config option strings 2016-05-15 00:00:23 +00:00
Aaron Jones
b143df9ac4
minor spring cleaning: remove/relocate duplicate/unused includes & macros
[ci skip]
2016-05-14 23:29:33 +00:00
William Pitcock
dcf450702b newconf: ensure wsock and defer_accept are default-to-disable for now, for consistency sake on rehashes 2016-05-14 17:23:51 -05:00
Simon Arlott
d2a4981ab2
client: call authd_abort_client with the client that is exiting, not the originator 2016-05-12 10:06:31 +01:00
Aaron Jones
f5960b830b
[sslproc] Use certificate file if key file is not present 2016-05-05 04:10:57 +00:00
Aaron Jones
4d83a4d92d
[sslproc] Allow absense of private key file
Backends can then assume that the private key is in the certificate file
2016-05-05 03:47:18 +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
3c5f720c6f
authd_check: don't try to update bl_stats if it doesn't exist
This can happen if all the blacklists are removed and then authd
sends a blacklisted response for a client.
2016-04-30 13:18:06 +01:00
Simon Arlott
4573f8f2fb
authproc: don't try to delete bl_stats if it hasn't been created 2016-04-30 13:11:06 +01:00
Elizabeth Myers
e7c4ecd5b1
authproc: don't delete during iteration, this is not safe. 2016-04-30 01:11:56 -05:00
William Pitcock
b5f3e5e5e8 ircd: Channel.bants is not a serial but a timestamp.
Previously, the IRCd would increment bants instead of resyncing the timestamp, causing the potential of
false negatives from the bancache system.
2016-04-29 18:59:32 -05:00
Aaron Jones
fed4fc59bc
Mention another RFC with regard to deprecating plaintext 2016-04-29 16:28:18 +00:00
Simon Arlott
1cdf323be9
sslproc: don't send updated config to dead/shutdown sslds
They might be running older versions of the SSL library that
doesn't support the key type or ciphers being configured.
2016-04-29 07:35:43 +01:00
Simon Arlott
036cafaaaf
sslproc: reset ssld_wait/spin_count when explicitly requested to restart ssld 2016-04-28 22:25:36 +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
c173a8ad44
modules: use exit(EXIT_FAILURE) on failure
This will allow service process monitoring to recognise the difference
between a shutdown and an error of a -foreground ircd, because only
/DIE (or SIGINT) will exit with return code 0.
2016-04-25 22:27:57 +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
f61d096186
conf: require certificate fingerprint for SSL connections 2016-04-25 20:19:48 +01:00
Simon Arlott
dc986b5468
sslproc: prefix SPKI certfp types to distinguish them from CERT 2016-04-25 20:12:27 +01:00
Simon Arlott
93ad89b232
sslproc: send the certftp method on rehash 2016-04-25 19:25:45 +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
90fd6ede1b
sslproc: include ssl_cipher_list in length check before sending configuration to ssld 2016-04-25 19:12:47 +01:00
Simon Arlott
19d1853f71
ssld: remove init_prng command
This is no longer configurable so it's redundant.
2016-04-25 19:02:03 +01:00
Simon Arlott
8cbd70a8ed
ircd: don't send ERR_NOTREGISTERED to servers
Sending messages after SERVER but before zlib is established breaks
outgoing connections. If the other server is misbehaving then ignore
its messages.
2016-04-24 17:41:44 +01:00
Simon Arlott
5ad62c80ee
librb: remove socklen parameter from rb_connect_tcp 2016-04-24 17:11:20 +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
65f43a4fc4
ircd: Don't try to connect to servers that we know have an invalid fingerprint
This just causes an unnecessary link/squit on the other server.
2016-04-24 11:49:21 +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
5c317f1313
ircd: parse: add asserts for improper use of mod_add_cmd/mod_del_cmd 2016-04-23 23:56:41 +01:00
Simon Arlott
e8de2bfaf0
modules: add missing break 2016-04-23 23:37:38 +01:00
Simon Arlott
558744e520
ircd: do nothing in client_release_connids if !MyConnect 2016-04-23 23:25:25 +01:00
Simon Arlott
cc02bdf3a6
ircd: fix assert in client_release_connids
The connection may have already been closed and MyConnect cleared.

It's only a bug if the connection somehow has connids but is not
our connection.
2016-04-23 23:22:01 +01:00
Simon Arlott
cf430c1a40
ssld: Add new certfp_methods spki_sha256 and spki_sha512
These operate on the SubjectPublicKeyInfo of the certificate, which does
change unless the private key is changed. This allows the fingerprint to
stay constant even if the certificate is reissued.

(The same fingerprint is also used by DANE)
2016-04-23 22:51:05 +01:00
Simon Arlott
0ae7a89d78
ircd: sslproc: certfp commands have a 9 byte header, not 5 bytes
SHA512 hashes were being ignored because the message was too large
2016-04-23 20:52:20 +01:00
William Pitcock
c6098ed357 client: fix up client_release_connids() too, pointed out by lp0 2016-04-23 14:26:01 -05:00
William Pitcock
5c63bfe8b1 client: connid_get() should check MyConnect(), not MyClient(). 2016-04-23 14:17:36 -05:00
Simon Arlott
84e3e445aa
mr_server: Report certificate fingerprint mismatches
Log the received certificate fingerprint when it causes a server to be
rejected.
2016-04-23 17:37:05 +01:00
Simon Arlott
e7c4cf63bc
authproc: set GOT_ID flag when an ident response is received 2016-04-23 15:41:27 +01:00
staticfox
1729f46eab
authd: Avoid negative array indices 2016-04-22 23:06:42 -04: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
Elizabeth Myers
2373891299
Implement the netsplit batch type.
This also lays the groundwork for the netjoin batch type, but that isn't
implemented yet. I don't like how some of this is implemented but it'll
have to do for now...

Compile tested, needs more testing.
2016-04-15 16:50:43 -05:00
Elizabeth Myers
4f2b9a4fd1
Don't use key member of dictionary iter objects after deletion 2016-04-12 09:43:50 -05:00
Elizabeth Myers
9e5c31ea0d
authproc: fix a typo 2016-04-12 09:37:56 -05:00
Elizabeth Myers
5e9a3f8674
Change the way authd configures opm
It's a bit of a hack, but better than before. Rather than rehashing
(which could get us into an endless loop), we now segregate the
configuration phase (creating entries ircd-side in case we restart authd
later) and sending phases (when configure_authd() is called). Since we
have to call configure_authd() no matter what (to send timeouts etc.)
and we have to send this data to configure authd anyway, and sending
duplicate data is bad, this is the only way I can think of for now.
2016-04-12 09:36:09 -05:00
Elizabeth Myers
ed5e1d1e41 send: trim a blank line [ci skip] 2016-04-11 11:52:01 -05:00
Elizabeth Myers
7a21fb5b34 s_user: clean up authd checks 2016-04-10 10:02:33 -05:00
Elizabeth Myers
2a104d6641 s_user: enhancements to proxy reporting messages 2016-04-10 09:35:02 -05:00
Elizabeth Myers
d19aab3375 Fix stupid linux warning 2016-04-10 09:22:34 -05:00
Elizabeth Myers
154dc91ef0 Wrap up authd preclient stuff in its own struct 2016-04-10 09:20:51 -05:00
staticfox
02fa4362cd version.c.SH: Fix build
We need stddef.h mainly for NULL
2016-04-09 06:05:08 -04:00
Elizabeth Myers
b14d2bd6ea Formatting fixes for credits
Contributed from jackal^, but fixed up a bit.
2016-04-09 04:55:57 -05:00
Elizabeth Myers
4eafa9e62f ipv4_from_ipv6: move to librb 2016-04-08 03:49:23 -05:00
Elizabeth Myers
66f7fe673b Get rid of flags2.
It seems to come from an era where long long didn't exist and 64-bit
machines weren't common. 32-bit machines are still common but I can't
imagine this will have much performance impact there.

This "fixes" #179 in title only, but see comments within.
2016-04-07 07:40:55 -05:00
Elizabeth Myers
9057170ce8 Cleanup defaults.h config file.
Clean up spaces/tabs mixing mess (bleh), add some defaults for authd
stuff, and get rid of CHARYBDIS_SOMAXCONN (just define SOMAXCONN if it's
available...).
2016-04-07 04:47:48 -05:00
Elizabeth Myers
0a87075b86 modules: fix up display names 2016-04-07 04:15:12 -05:00
Elizabeth Myers
78946542bb modules: move module loading/unloading commands to dedicated module.
There's no reason to really have these in the main ircd anymore, static
modules are dead and aren't coming back.

To ensure people don't do something hopelessly retarded, this is a core
module.
2016-04-07 04:00:25 -05:00
Elizabeth Myers
999c42bad8 Remove useless alias_entry hits member 2016-04-06 11:47:13 -05:00
Elizabeth Myers
a19097baa4 ircd: load modules after conf files
The alias module depends on this
2016-04-06 07:43:45 -05:00
Elizabeth Myers
b663a8070f Move alias handling into a dedicated module.
Not yet tested, caveat emptor!

Closes #166
2016-04-06 07:27:50 -05:00
Elizabeth Myers
2575a78b0e Add hook for when rehash is called.
This will be used by the future alias module.
2016-04-06 05:43:54 -05:00
Elizabeth Myers
f956cb0f1f Use rb_* versions of nonportable string functions 2016-04-05 05:39:59 -05:00
Elizabeth Myers
731d128990 authd: rework module ID system
Provider ID's are now assigned dynamically at load-time. To accomodate
this, there is now a lookup system for finding providers by name (all
providers have names as well).
2016-04-05 04:31:22 -05:00
Elizabeth Myers
3256156aca Announce changed capabilities on module load
Closes #165
2016-04-04 02:30:35 -05:00
staticfox
5eb3d7a7c0 modules: Revert mapi_register() to use ints
modinit() returns either 0 (success) or -1 (failure) so we
can't check for true/false.
2016-04-03 20:14:36 -04:00
Elizabeth Myers
c0483ac17b boolify calls to rehash 2016-04-03 01:53:34 -05:00
Elizabeth Myers
aa483e55bd bool-ify modules stuff 2016-04-03 01:51:45 -05:00
Elizabeth Myers
6603175304 Clean up module loading a bit. 2016-04-03 01:21:19 -05:00
Elizabeth Myers
ffa79a9516 Use rb_dlink_list_length... == 0, not !rb_dlink_list_length 2016-04-02 22:45:52 -05:00
Elizabeth Myers
34bc7caeae Send enabling message to opm at the end of opm block. 2016-04-02 22:33:19 -05:00
Elizabeth Myers
5c5296c8f8 newconf: delete all proxies on rehash 2016-04-02 22:30:54 -05:00
Elizabeth Myers
e2a8228f85 authproc: minor fixes 2016-04-02 20:31:32 -05:00
Elizabeth Myers
8d48aa190b dns: don't use zero ID's 2016-04-02 20:19:37 -05:00
Elizabeth Myers
1d657e0b08 authproc: rehash on authd restart
This is a hack for now so it gets the config again.
2016-04-02 20:10:56 -05:00
Elizabeth Myers
3d2fc110e3 authproc: add more API's for opm management 2016-04-02 19:45:27 -05:00
Elizabeth Myers
c1f4db3fb7 Tweak some configuration semantics of opm 2016-04-02 19:45:09 -05:00
Elizabeth Myers
d9364d2913 authproc: pad leading 0 for localhost IP's
This avoids misparsing by rb's helper stuff..
2016-04-02 19:29:16 -05:00
Elizabeth Myers
eb0814b3cb opm: add support for HTTPS CONNECT proxies.
TBD: do we need an SSL listener for these?
2016-04-02 18:38:21 -05:00
Elizabeth Myers
64fae2607a Rename authd.[ch] on ircd side to authproc.[ch] to prevent shadowing. 2016-04-02 16:44:04 -05:00
Elizabeth Myers
b0326abdc9 authd: warn on a bad command 2016-04-02 05:05:28 -05:00
Elizabeth Myers
6d0fafec99 authd: minor cleanups 2016-04-02 04:51:11 -05:00
Elizabeth Myers
ae0a058544 authd: clean up command handling with a table 2016-04-02 04:49:01 -05:00
Elizabeth Myers
61d1befa2a authd: fix race on the ircd side.
The client may have already gone away, so if we can't find the local
cid, don't try to restart authd.
2016-04-02 03:51:54 -05:00
Elizabeth Myers
6d5edc6f53 authd: when aborting, don't just do read_packet. 2016-04-02 03:46:31 -05:00
Elizabeth Myers
9bba0f6143 opm: add adjustable timeout values 2016-04-02 03:33:27 -05:00
William Pitcock
34b88b6571 ircd: conf: properly calculate the number of wsockd to start 2016-04-02 03:20:16 -05:00
Elizabeth Myers
fabe8b94c5 Add HTTP CONNECT proxy scanning 2016-04-02 03:11:30 -05:00
William Pitcock
bccb7dedef ircd: wsproc: cleanups 2016-04-02 03:10:01 -05:00
William Pitcock
c53ca1e029 ircd: integrate ircd side of wsockd support 2016-04-02 02:56:22 -05:00
Elizabeth Myers
fbe8d087e7 Add exempt logic for open proxies 2016-04-02 02:42:11 -05:00
Elizabeth Myers
51fa2ab8a3 opm: allow scanners to be configurable 2016-04-02 02:29:48 -05:00
Elizabeth Myers
adfe7b8396 authd: small cleanup 2016-04-02 01:20:49 -05:00
Elizabeth Myers
6a7bb6f1df authd: more minor cleanups 2016-04-02 01:16:47 -05:00
Elizabeth Myers
b1a577f224 ircd/authd: cleanups 2016-04-02 01:05:21 -05:00
Elizabeth Myers
8275e2700d Add opm stuff to default configs 2016-04-01 04:11:04 -05:00
Elizabeth Myers
34f16c467d authd: fix API boo boo 2016-04-01 02:56:03 -05:00
Elizabeth Myers
6da256dc93 authd: remove some whitespace 2016-04-01 02:44:50 -05:00
Elizabeth Myers
4f6119cd40 authd: add API for setting OPM listeners 2016-04-01 02:43:01 -05:00
Elizabeth Myers
7372553dd6 authd: fix compile error 2016-04-01 02:42:50 -05:00
Elizabeth Myers
e158281056 authd: properly abort clients who timeout or when the helper restarts 2016-04-01 02:27:48 -05:00
Elizabeth Myers
d86692fa44 Add new sockaddr_storage port retrieval/setting macros
These macros are safe for use on IPv6 and clean up a lot of code.
2016-03-31 03:00:29 -05:00
Elizabeth Myers
bf3ecca24b ircd/listener: un-obsoleteify comments 2016-03-30 03:36:04 -05:00
Elizabeth Myers
4094d2fad5 Remove trailing whitespace from files. 2016-03-29 13:23:27 -05:00
Matt Ullman
2b535500f9 automake: Ensure ircd_parser.h is created
Fixes random travis explosions
2016-03-28 21:39:10 -04:00
Elizabeth Myers
7ad083b065 logger: add idebug
This only does something if debugging is enabled.
2016-03-28 19:06:31 -05:00
Elizabeth Myers
bae7e637de ircd/authd: remove rb_free no longer needed. 2016-03-28 18:19:06 -05:00
Elizabeth Myers
0bb5d3f031 authd: this isn't a list dammit! 2016-03-28 18:13:57 -05:00
Elizabeth Myers
540ae37b96 authd: don't use wild pointer 2016-03-28 18:09:22 -05:00
Elizabeth Myers
a6a30cc7b8 ircd/newconf: better IPv4 example 2016-03-28 17:55:54 -05:00
Elizabeth Myers
771dcfad37 newconf: add illustrative examples to comments 2016-03-28 17:54:01 -05:00
Elizabeth Myers
835d456c64 newconf: fix check for IPv6 address length 2016-03-28 17:47:13 -05:00
Elizabeth Myers
3fe0efd55a newconf: change an error to a warning 2016-03-28 17:45:35 -05:00
Elizabeth Myers
50808796e0 authd: It Works, Bitches™ 2016-03-28 16:47:51 -05:00
Elizabeth Myers
a9b809c796 ircd_lexer: use correct variable here.
ircd_paths[IRCD_PATH_ETC] is what's wanted, not IRCD_PATH_ETC.
2016-03-28 14:58:26 -05:00
Elizabeth Myers
7b4d1de38d Merge branch 'master' into authd-framework 2016-03-28 14:44:47 -05:00
Elizabeth Myers
ad04380360 ircd/authd: respect auth_disabled config option 2016-03-28 02:42:20 -05:00
Elizabeth Myers
59d42a9fcb ircd/authd: use proper timeout values for clients 2016-03-28 02:32:05 -05:00
Elizabeth Myers
ef0b13b960 ircd/authd: timeout dead authd clients 2016-03-28 02:30:54 -05:00
Elizabeth Myers
cc4d393152 ircd/authd: implement client noticing 2016-03-28 02:19:34 -05:00
Elizabeth Myers
d3f6b80867 Replace s_auth/blacklist stuff with authd calls
This also does a lot of surgery on the conf system to reconfigure authd.

/!\ WARNING! ACHTUNG! ADVERTENCIA! ATTENTION! AVVERTIMENTO! /!\
This code has not been run-time tested yet (though it compiles)!
2016-03-28 02:11:16 -05:00
Matt Ullman
33d43d4fa4 ircd: Move signaled variables to volatile sig_atomic_t 2016-03-27 20:05:38 -04:00
Matt Ullman
aa7eff28f2 hash.c: Save some more bytes 2016-03-27 06:29:10 -04:00
Elizabeth Myers
3f7039934f s_auth: remove trailing whitespace at end of usernames. 2016-03-26 19:21:16 -05:00
Elizabeth Myers
938f93f4bc ircd/authd: some comments 2016-03-26 16:44:41 -05:00
Matt Ullman
de8b3b7174 sslproc: Remove unused variable 2016-03-26 16:41:36 -04:00
Elizabeth Myers
0a659bf0ab Port notice stuff over from authd-framework-2 and use it.
This allows things like oper warnings from authd using the W message type
also.
2016-03-25 21:58:32 -05:00
Elizabeth Myers
122ae255d7 authd: change reload character to R from H.
This is more in line with the specification @kaniini laid out.
2016-03-25 21:00:13 -05:00
William Pitcock
de7cf7e009 ircd: client: substantially rework the connid registry system
now connid's are allocated on demand and clients may have as many connid's as necessary.
this allows us to build chains of helpers while ensuring the ircd properly tracks and GCs the resources.
2016-03-25 19:50:29 -05:00
Matt Ullman
afba2488ec extb_combi: More int to bool conversion
Cleanup whitespace in ircd_lexer.l
2016-03-25 19:47:58 -04:00
William Pitcock
0aaa37f721 ircd: only relocate_paths on windows, no point on posix 2016-03-25 18:13:39 -05:00
William Pitcock
d6c17e5de2 ircd: implement path relocation 2016-03-25 01:57:25 -05:00
William Pitcock
2f545aad87 ircd: use ircd_paths for logFileName and pidFileName 2016-03-25 00:00:06 -05:00
William Pitcock
0d180487b4 ircd: unbreak build 2016-03-24 18:50:13 -05:00
William Pitcock
4d8cfacd95 ircd: start staging for relocatable paths 2016-03-24 18:45:28 -05:00
Matt Ullman
e0a9b5d3bf chmode: Move check_forward() to a boolean 2016-03-24 14:42:54 -04:00
Matt Ullman
a383180a0a chmode: Move add_id() to a boolean 2016-03-24 14:37:52 -04:00
Matt Ullman
9aa639eddd chmode: Move allow_mode_change() to a boolean 2016-03-24 14:26:02 -04:00
Matt Ullman
2a4b3ea648 version.c.SH: Fix generation not incrementing 2016-03-24 04:00:23 -04:00
Matt Ullman
3b9507d0e9 channel: Move flood_attack_channel() to a boolean 2016-03-24 02:25:26 -04:00
Matt Ullman
216f58a27c channel: Change check_channel_name() note to false
[ci skip]
2016-03-24 02:14:03 -04:00
Matt Ullman
3a46803fef channel: Move check_channel_name() to a boolean 2016-03-24 01:54:39 -04:00
Matt Ullman
2e45f5d808 Cleanup more BSD-isms 2016-03-23 22:37:52 -04:00
Matt Ullman
4b11f39115 Move away from BSD data types 2016-03-23 19:11:42 -04:00
Elizabeth Myers
28c94d6598 Remove common.h from lexer and parser 2016-03-23 10:09:53 -05:00
Elizabeth Myers
79435744c7 common.h: raison d'être is gone, so out it goes.
Fold whatever was left into ircd_defs.h
2016-03-23 09:33:56 -05:00
Elizabeth Myers
7ac3261f97 Ensure the parser/lexer don't use IRCD_BUFSIZE. 2016-03-23 09:26:07 -05:00
Elizabeth Myers
82236a2a65 IRCD_BUFSIZE is redundant with BUFSIZE, so kill it. 2016-03-23 09:22:55 -05:00
Elizabeth Myers
ab31d2b07e Send YES/NO to Davy Jones's Locker. 2016-03-23 08:52:32 -05:00
Elizabeth Myers
bd43a44469 Remove more YES/NO usage. 2016-03-23 08:43:28 -05:00
Elizabeth Myers
2fc6772ee1 typedef-ify rb_radixtree for consistency. 2016-03-23 08:32:22 -05:00
Elizabeth Myers
4177311e6e Change struct Dictionary(*) to rb_dictionary(_\1).
This cleans things up a slightly and puts the dictionary stuff in its
own namespace.
2016-03-23 08:09:58 -05:00
Elizabeth Myers
2ac4ba969b ircd: shut GCC the fuck up.
No, it can't probably fail... that isn't what that's there for.
2016-03-23 08:07:23 -05:00
Elizabeth Myers
56f84dedf7 DICTIONARY_FOREACH → RB_DICTIONARY_FOREACH
This is in librb and therefore should be prefixed.
2016-03-23 07:45:44 -05:00
Matt Ullman
66769bc1f8 More cleanup 2016-03-23 00:11:26 -04:00
Matt Ullman
e23126c83b Cleanup warnings 2016-03-21 22:28:41 -04:00
William Pitcock
4d383612d4 ircd: log runtime path (mainly as proof of concept for rb_path_to_self()) 2016-03-21 21:14:11 -05:00
Matt Ullman
ad9cbf9e0d s_user: Don't send CHGHOST clients op/voice syncs 2016-03-20 18:59:07 -04:00
William Pitcock
5a5f173daa parse: check IsServer() before firing off a remove_unknowns() call 2016-03-20 06:40:54 -05:00
William Pitcock
4f5056dd83 ircd: fix build on freebsd 2016-03-20 06:22:39 -05:00
William Pitcock
dd92c99b83 modules: fix thinko 2016-03-20 06:01:12 -05:00
William Pitcock
c9108ea073 ircd: modules: findmodule_byname(): also check LT_MODULE_EXT here 2016-03-20 06:00:20 -05:00
William Pitcock
6cb643f4f9 ircd: modules: use LT_MODULE_EXT more consistently 2016-03-20 05:54:48 -05:00
William Pitcock
44f442e3fb ircd: parse: now this type cast for POINTER MATH is just fucking stupid 2016-03-20 04:21:25 -05:00
William Pitcock
09f528c24c ircd: win32 does not need the FD 0,1,2 stuff 2016-03-20 03:10:05 -05:00
William Pitcock
c1bfea7332 ircd: handle some EXIT_FAILURE cases differently on win32 2016-03-20 03:06:14 -05:00
William Pitcock
48c6d0f56c ircd: squelch write(2) warning differently 2016-03-20 03:02:56 -05:00