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