William Pitcock
e55a9d6abc
modules: serious cleanups
2016-06-18 00:52:16 -05:00
William Pitcock
92dad4831d
modules: cleanups
2016-06-18 00:38:40 -05:00
William Pitcock
8e30e3def4
messages: fix format string warning reported by latest clang
2016-06-17 23:39:19 -05:00
Aaron Jones
aa7b99eb77
restart: functions that call exit(3) should be marked noreturn
2016-06-01 20:54:12 +00:00
Aaron Jones
df3db5d99b
ircd: functions that call exit(3) should be marked noreturn
2016-06-01 20:54:12 +00:00
Aaron Jones
341560ecf2
getopt: a function that calls exit(3) should be marked noreturn
2016-06-01 20:54:12 +00:00
Simon Arlott
da20854e83
random_ping: stop producing negative values that become 16 chars
2016-05-02 21:14:16 +01:00
Simon Arlott
f018ed844d
certfp: Move method name/prefix strings to a separate header file
2016-04-26 20:33:18 +01:00
Simon Arlott
5adde7a4ed
getopt: don't modify argv as it breaks restart()
2016-04-25 23:32:18 +01:00
Simon Arlott
762468f85d
authd: wait until the ssl connection is "open" before reading
...
It's useful to allow authd to run in parallel with ssl negotiation,
but if the ssld connection has plaintext data ready for reading
there's a race condition between authd calling read_packet() and
ssl_process_certfp() storing the certificate fingerprint. This
scenario would be bad for a server connecting because fingerprint
verification will fail.
Allow either operation to complete first, but wait until
ssl_process_open_fd() calls the ssl open callback before calling
read_packet().
2016-04-25 21:43:21 +01:00
Simon Arlott
53789fddda
sslproc: simplify ssl open callback
...
Don't use the librb callback type as we're always passing client_p.
Provide a return value so that the connect handler can exit_client()
and the accept handler can opt to use the default dead handler.
2016-04-25 21:12:44 +01:00
Simon Arlott
f7b0c4b3d8
sslproc: use global ServerInfo configuration
...
There's no need to pass information around that sslproc already has access
to, so use ServerInfo directly. Remove the extra NULL checks as these are
already performed before setting ircd_ssl_ok = true.
2016-04-25 19:20:45 +01:00
Simon Arlott
d4214e9445
ircd: server connection configuration
...
Fix the server connection configuration so that it can simultaneously
handle a hostname/IPv4/IPv6 for connecting and a hostname/IPv4/IPv6
for binding. Maintains backwards compatibility for matching a hostname
with a mask.
Multiple host/vhost entries can be specified and the last value for
each address family is stored. Hostnames that resolve automatically
overwrite the IP address.
Server connections can now be made to either IPv4 or IPv6 at random
as well as preferring a specific address family.
2016-04-24 17:06:24 +01:00
Simon Arlott
4fbb736202
ssld: add a callback when the connection is opened
...
This allows us to wait until we have the fingerprint information before
continuing with a server connect process.
2016-04-24 11:48:35 +01:00
Simon Arlott
3085734104
m_stats: display certificate fingerprint in STATS C
2016-04-24 01:06:51 +01:00
Elizabeth Myers
7445ece1d1
Revert "Implement the netsplit batch type."
...
This needs more work, see
https://github.com/ircv3/ircv3-specifications/issues/253
This reverts commit 2373891299
.
2016-04-16 11:05:00 -05:00
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
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
Mantas Mikulėnas
9d07a42d7a
m_sasl: rate-limit SASL REAUTH usage
2016-04-11 21:45:10 +03:00
Mantas Mikulėnas
37289346cd
m_sasl: temporarily reject clients after many failed attempts
2016-04-11 20:02:09 +03:00
Elizabeth Myers
ce58d2dc61
Remove extraneous whitespace [ci skip]
2016-04-10 09:23:14 -05:00
Elizabeth Myers
154dc91ef0
Wrap up authd preclient stuff in its own struct
2016-04-10 09:20:51 -05:00
Elizabeth Myers
4eafa9e62f
ipv4_from_ipv6: move to librb
2016-04-08 03:49:23 -05:00
Elizabeth Myers
5a22e9259b
Fix overzealotry in flags fixing.
...
These flags are for oper confs, not for client flags.
2016-04-07 07:48:50 -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
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
a559032938
Partially update a comment
2016-04-06 07:28:30 -05:00
Elizabeth Myers
d4fdeec0d8
s_conf: s_bsd's been gone for a long time... lol
2016-04-06 06:48:59 -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
aa483e55bd
bool-ify modules stuff
2016-04-03 01:51:45 -05:00
Elizabeth Myers
3d2fc110e3
authproc: add more API's for opm management
2016-04-02 19:45:27 -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
6d0fafec99
authd: minor cleanups
2016-04-02 04:51:11 -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
b1a577f224
ircd/authd: cleanups
2016-04-02 01:05:21 -05:00
Elizabeth Myers
34f16c467d
authd: fix API boo boo
2016-04-01 02:56:03 -05:00
Elizabeth Myers
4f6119cd40
authd: add API for setting OPM listeners
2016-04-01 02:43:01 -05: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
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
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
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
William Pitcock
4d8cfacd95
ircd: start staging for relocatable paths
2016-03-24 18:45:28 -05:00
Matt Ullman
a383180a0a
chmode: Move add_id() to a boolean
2016-03-24 14:37:52 -04:00
Matt Ullman
3b9507d0e9
channel: Move flood_attack_channel() to a boolean
2016-03-24 02:25:26 -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
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
82236a2a65
IRCD_BUFSIZE is redundant with BUFSIZE, so kill it.
2016-03-23 09:22:55 -05:00
Elizabeth Myers
affc871dcb
common: don't even attempt to define NULL.
...
stddef.h includes it, ISO C mandates NULL be in it, and if any platforms
don't have it, *tough shit*.
2016-03-23 09:13:31 -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
Matt Ullman
66769bc1f8
More cleanup
2016-03-23 00:11:26 -04:00
William Pitcock
4e376fff55
include: hostmask: use GET_SS_FAMILY()
2016-03-20 01:55:31 -05:00
William Pitcock
85368a13d3
ircd: rewrite SOCKET_ERROR as I_SOCKET_ERROR
2016-03-20 01:44:00 -05:00
William Pitcock
4f73990245
stdinc: more cleanups
2016-03-20 01:19:07 -05:00
William Pitcock
76ebf6c489
authd: initial pass at win32 porting
2016-03-20 01:16:41 -05:00
Elizabeth Myers
9b8e9eb321
config.h delenda est
2016-03-19 19:14:26 -05:00
William Pitcock
bfc44622c8
ircd: do not shadow internal openssl symbol "ssl_ok" (yeah, i know)
2016-03-19 00:57:32 -05:00
Elizabeth Myers
1d89c9e945
Remove unnecessary autotools cruft and other detritus
2016-03-18 15:13:11 -05:00
Elizabeth Myers
cca418c9b7
Add --enable-ignore-bogus-ts flag.
...
This hoists the option out of config.h.
2016-03-18 15:02:59 -05:00
Elizabeth Myers
0e99e13a71
configure: add ENABLE_OPER_CHGHOST flag
2016-03-18 14:57:08 -05:00
Elizabeth Myers
f79f3e6a95
config.h: update a tad
2016-03-18 14:43:50 -05:00
Elizabeth Myers
068c6c4a2b
dns: use a dictionary for query storage
2016-03-13 03:23:41 -05:00
Elizabeth Myers
50f842125a
authd: crap, C was taken already, rename reload to H.
2016-03-10 08:07:29 -06:00
Elizabeth Myers
6445c1cf0b
rehash: don't restart authd for DNS reloads
...
This could lead to pretty nasty things, like losing DNS (and in the
future, ident) queries. That's a Bad Thing™.
2016-03-09 03:46:04 -06:00
Elizabeth Myers
503727d1ee
More bool conversions
2016-03-09 02:19:31 -06:00
Elizabeth Myers
1b916de505
More bool conversions [ci skip]
2016-03-09 02:10:21 -06:00
Elizabeth Myers
8fbc1152bb
Remove dead variable "cold_start" that no longer exists [ci skip]
2016-03-09 02:01:42 -06:00
Elizabeth Myers
f66f0baa67
More bool conversions
2016-03-09 02:00:40 -06:00
Elizabeth Myers
550e851c5e
Merge branch 'master' of github.com:charybdis-ircd/charybdis into elizafox-cleanups
2016-03-09 01:41:10 -06:00
Elizabeth Myers
3c7d6fcce7
Message handlers should return void.
...
Also fix up some return values and stuff to use bool (or void if
nothing). I just did it whilst I was here.
According to jilles, the return value used to signify whether or not the
client had exited. This was error-prone and was fixed a long, long time
ago, but the return value was left int for historical reasons.
Since the return type is not used (and has no clear use case anyway),
it's safe to just get rid of it.
2016-03-09 01:37:03 -06:00
Elizabeth Myers
eeabf33a7c
Move module description headers to the top
...
This is cleaner.
Note this was broken out of a much larger piece of work I did, so if
there's any problems, I apologise!
2016-03-09 01:29:41 -06:00
William Pitcock
ea111ea544
ircd: further cleanup of YES/NO
2016-03-08 13:52:48 -06:00
Elizabeth Myers
6287d57fa9
s_user: clean up return types and can YES/NO.
2016-03-08 05:06:29 -06:00
Elizabeth Myers
07554369bd
Detect stdbool.h and add conformant shims if it isn't available
...
Charybdis requires C99 already, so it's high time we start using
stdbool. I've converted a few pieces of code already.
A lot of the old code that uses YES/NO should probably be updated too
because that's fucking hideous.
2016-03-08 04:54:04 -06:00
Elizabeth Myers
55799c6b4d
dns: prune worthless function.
2016-03-08 03:25:21 -06:00
Elizabeth Myers
8a26cd1973
dns: clean up awful hacks.
...
We now have a resolver cache which we init on startup.
2016-03-08 03:22:25 -06:00
Elizabeth Myers
394b8dde17
authd: allow querying the list of DNS servers.
...
This was an asston of pain, and it still feels "dirty" as it introduces
an async call where there normally wouldn't be one. Better
implementation more than welcome.
2016-03-08 02:53:25 -06:00
Elizabeth Myers
7e6b5384b3
Convert 2.8 style ToUpper/ToLower names to irctoupper/irctolower
2016-03-07 19:04:24 -06:00
Elizabeth Myers
81204be809
Add ircd serials to AV2.
2016-03-07 18:10:22 -06:00
Elizabeth Myers
749d697c98
Fix generation of serno.h
...
Due to reversed conditionals, it wasn't being generated properly.
This also actually fixes its generation in librb by just copying the
Charybdis version. Unbundlers will want to take note of this.
2016-03-07 17:15:39 -06:00
Max Teufel
54d8925ed4
extensions: add umode_noctcp extension
2016-03-07 18:48:14 +01:00
Elizabeth Myers
638d286293
Change some RATBOX_FOO defines to CHARYBDIS_FOO.
2016-03-07 05:01:31 -06:00
William Pitcock
b7e4fcb7a7
modules: AV2: use unsigned int for capability IDs instead of signed int
2016-03-07 00:13:54 -06:00
Elizabeth Myers
978b723252
modules: show module provenance in modlist
2016-03-06 23:21:08 -06:00
Elizabeth Myers
216d70e91d
modules: tag origin at load time.
2016-03-06 18:57:05 -06:00
Elizabeth Myers
c63aeb44e9
modules: add origin field to V2
2016-03-06 17:52:49 -06:00
Elizabeth Myers
2ab24be6f9
modules: show descriptions in list
2016-03-06 17:26:30 -06:00
Elizabeth Myers
0eb7d9c02c
modules: add description field
2016-03-06 17:14:31 -06:00
Elizabeth Myers
7b075a7610
modules: whoops, forgot one tiny thing
2016-03-06 17:04:02 -06:00
Elizabeth Myers
8e9c6a7590
modules: add new MAPI V2
...
MAPI V1 is still supported for legacy modules, but it is highly
recommended to update to MAPI V2. It includes support for capability
tables, module descriptions, and implicit versions.
2016-03-06 16:53:03 -06:00
Elizabeth Myers
a4bf26dd34
Move irc_* data structures to librb.
...
This makes the base ircd less cluttered up with data structures that can
go elsewhere.
2016-03-06 14:17:19 -06:00
Elizabeth Myers
fe037171d6
Change all leftover libratbox stuff to librb.
2016-03-06 03:49:27 -06:00
Elizabeth Myers
5f5b18684d
config.h.dist: forgot one...
2016-03-06 03:00:42 -06:00
Elizabeth Myers
cbeab4bc34
Remove $Id tags from everything.
...
These are obsolete and none have changed since 10 years gao...
2016-03-06 02:47:27 -06:00
Elizabeth Myers
1d91de8100
Remove old .indent.pro files
...
These have been unused since dinosaurs roamed the earth and are mostly
smelly old Hybrid relics.
2016-03-05 21:21:36 -06:00
William Pitcock
38ffccf8c3
cap: allow modules to return client-specific responses for capability inquiries
2016-03-05 18:56:36 -06:00
William Pitcock
9ea48ec30a
remove presupplied autotools files
2016-03-05 17:47:48 -06:00
Elizabeth Myers
7416e480b0
parse: export cmd_dict for use elsewhere.
2016-03-05 01:05:26 -06:00
Elizabeth Myers
e8f1c19e7b
parse: get rid of report_messages
...
It is a function with a single usage, that is used only for one specific
stats command on one line.
2016-03-05 00:55:33 -06:00
Simon Arlott
e9ffc3c153
ssld: provide version in stats S output
2016-03-03 22:14:50 +00:00
William Pitcock
ddf62b10f9
m_cap: add support for CAP LS 302
2016-02-28 01:13:08 -06:00
William Pitcock
193d4db30c
sasl: transfer ownership of 'sasl' capability to m_sasl module
2016-02-28 00:29:26 -06:00
William Pitcock
be2ce24c42
send: implement echo-message
2016-02-27 02:48:37 -06:00
William Pitcock
0416a2cc86
starttls: take ownership of 'tls' capability
2016-02-27 01:45:40 -06:00
William Pitcock
32df5e96a6
cap: substantial rewrite leveraging the ircd capabilities framework for client caps
2016-02-27 01:41:36 -06:00
William Pitcock
ba83226733
capability: move some previously private structures to public API
2016-02-27 00:46:49 -06:00
William Pitcock
486cd34415
ircd: chase capability API changes
2016-02-27 00:01:54 -06:00
William Pitcock
63b9db9675
capability: allow attaching capability-owner data to a capability token, to enable extended data for client capabilities
2016-02-26 23:55:43 -06:00
William Pitcock
71c875fb9a
msgbuf: allow for an explicit target to be defined
2016-02-20 17:59:00 -06:00
William Pitcock
48a2b7c182
hook: allow hook_data to have non-const arguments, add hook_cdata for arguments that must be treated const
2016-02-20 17:44:13 -06:00
William Pitcock
ddedc60398
cap: register the account-tag capability
2016-02-20 17:26:35 -06:00
William Pitcock
4f8ababae0
send: implement linebuf_put_msgbuf() and msgbuf_build_from(), which build the core of the ircv3.2 tags support for outbound messages
2016-02-20 15:50:12 -06:00
William Pitcock
33085472a2
msgbuf: make msgbuf_unparse_prefix() public
2016-02-20 14:46:09 -06:00
William Pitcock
c678fbc08b
ircd: remove broken USE_IODEBUG_HOOKS knob and related code
2016-02-20 12:02:49 -06:00
William Pitcock
4a13e3f1da
msgbuf: add some message building code
2016-02-20 11:21:12 -06:00
William Pitcock
d84acbceca
newconf: move SSL/TLS deprecation message from ERROR severity to WARNING severity
2016-02-19 17:11:25 -06:00
William Pitcock
7baa37a9ef
msg: remove last vestiges of the fakelag system. charybdis has never supported fakelag.
2016-02-19 16:43:39 -06:00
Antoine Beaupré
a393a68a0e
make build reproducible
...
we do this by removing the uname usage everywhere: it is not actually
used at runtime at all.
we keep the timestamp, because it is actually used in user_welcome()
but allow it to be overriden.
ideally, that timestamp would be completely removed, but I am not sure
what to put in its place, or if it would break some mysterious RFC (or
client!) if we remove that announcement.
2016-02-16 00:37:20 -05:00
William Pitcock
d670fe5271
msgbuf: msgbuf_append_tag(): add support for attaching a specific capability bit
2016-02-13 00:19:23 -06:00
William Pitcock
b4993fe8c3
msgbuf: pull in s_assert
2016-02-12 12:12:30 -06:00
William Pitcock
920e4849f1
msgbuf: fix AFP() macro
2016-02-12 11:56:15 -06:00
William Pitcock
9d5170247e
msgbuf: attach capabilities mask to each tag for sending
...
this will be used with a bloom filter to speed up the 1-to-many case
2016-02-11 19:50:47 -06:00
William Pitcock
4a84a763cd
ircd: change MessageHandler to include a MsgBuf pointer at the front for tag access
2016-02-10 20:13:44 -06:00
Simon Arlott
eb1b303d56
ircd: support restarting ssld processes
...
Add REHASH SSLD (admins only) that starts new sslds and marks the
existing ones as inactive until all their clients disconnect.
Very useful whenever the SSL library has a vulnerability because
new connections can use a new version of the library without
disconnecting existing clients/servers.
Add STATS S (admins only) to list ssld processes, status, and client
count.
2016-02-10 19:03:30 -06:00
William Pitcock
269dd686b3
msgbuf: improve parse logic
2016-02-10 00:46:32 -06:00
William Pitcock
a8e69f5dfc
msgbuf: implement msgbuf_parse()
2016-02-10 00:08:58 -06:00
William Pitcock
88b427b61d
msgbuf: add lowlevel interface for building MsgBuf objects
2016-02-09 23:19:13 -06:00
William Pitcock
b830b64106
include: add msgbuf.h for future msgbuf api
2016-02-09 23:08:35 -06:00
William Pitcock
cc6ce2d689
ircd: hash: remove some detritus
2016-01-23 11:44:08 -05:00
William Pitcock
b47f8a4fda
ircd: import modified version of ratbox 3.1 whowas code
2016-01-23 11:16:34 -05:00
William Pitcock
912cae0c9c
Revert "ircd: rework sendq limits a bit."
...
This reverts commit 9a5958119c
.
2016-01-20 22:27:33 -05:00
William Pitcock
999fab778c
Revert "LIST: use new sendq system to reimplement SAFELIST differently."
...
This reverts commit e835592cfc
.
2016-01-20 22:26:55 -05:00
William Pitcock
704697b6b6
ircd: radixtree: allow irc_radixtree_elem_find() to find a fuzzy match instead of an exact match
2016-01-20 22:10:35 -05:00
William Pitcock
0d9a72de21
ircd: radixtree: add irc_radixtree_foreach_start_from() which uses irc_radixtree_elem_find() to find the starting point
2016-01-20 21:02:03 -05:00
William Pitcock
71c955336e
ircd: add general::hide_opers_in_whois to simulate ircd-seven operhide
2016-01-15 13:38:40 -06:00
William Pitcock
4d21f1e8e0
extensions/helpops: new module, implementing a helpops system.
...
if loaded, this module takes over /stats p, and displays people who are umode +H.
to get umode +H, one must have the "usermode:helpops" permission.
2016-01-14 08:08:40 -06:00
William Pitcock
ea2d270096
STATS: allow modules to override normal stats requests
2016-01-14 06:57:04 -06:00
William Pitcock
3ee43bcf29
ircd: get_channel_access(): do not derive channel pointer from membership
2016-01-13 22:16:44 -06:00
William Pitcock
14482679ce
ircd: channel: implement an option to strip color codes from channel topics
2016-01-13 17:05:41 -06:00
William Pitcock
be29ec793d
ircd: import hidden channel modes framework, from ircd-seven
...
This allows for modules to define channel modes which are only visible to opers.
2016-01-13 16:34:27 -06:00
William Pitcock
15feac531c
ircd: implement support for remote module load/unload/etc commands
2016-01-12 00:37:54 -06:00
William Pitcock
cc7ae51cdc
Allow remote DIE and RESTART (from ircd-seven)
2016-01-12 00:04:54 -06:00
William Pitcock
a4721f5e9f
ircd: implement EXTENDCHANS, based on ircd-seven (with some improvements from chatircd)
2016-01-11 23:32:23 -06:00
William Pitcock
fe749d3709
ircd: implement GRANT subsystem based on ircd-seven
2016-01-11 23:02:03 -06:00
William Pitcock
b870a5f8e9
extensions/override: display mode-change string in override messages
2016-01-11 22:40:32 -06:00
William Pitcock
7abb4a4f0d
parse: add missing semicolon
2016-01-11 22:31:19 -06:00
William Pitcock
e4603e3d27
parse: implement reconstruct_parv()
2016-01-11 22:28:55 -06:00
William Pitcock
9b74b99268
ircd: hash: channels are no longer a hashtable
2016-01-09 23:47:50 -06:00
William Pitcock
730b914c17
LIST: more cleanups
2016-01-09 23:34:52 -06:00
William Pitcock
9a5958119c
ircd: rework sendq limits a bit.
...
The sendq limit is now soft, now we halt processing if a sendq is exceeded, until it is sufficiently drained.
This allows us to implement SAFELIST and other floody commands without hacks.
2016-01-09 23:14:04 -06:00
William Pitcock
bb4ac31447
ircd: hash: use an irc_radixtree for client names
2016-01-09 05:30:13 -06:00
William Pitcock
3eeccbe3ce
ircd: hash: use an irc_radixtree for IDs
2016-01-09 05:13:10 -06:00
William Pitcock
46be39faab
ircd: hash: use an irc_radixtree for storing resv's
2016-01-09 04:59:02 -06:00
William Pitcock
5c7c7d65c2
ircd: hash: client connection id hashtables are now dictionaries keyed by uint32
2016-01-09 04:25:41 -06:00
William Pitcock
45dfdf46c8
ircd: irc_dictionary: allow storage of non-string types as keys
2016-01-09 04:09:40 -06:00
William Pitcock
21d5a11cb8
ircd: irc_dictionary: also show dictionary stats
2016-01-09 01:34:37 -06:00
William Pitcock
99b461bb2f
ircd: ensure irc_dictionary users have names, for stats tracking.
2016-01-09 01:22:11 -06:00
William Pitcock
db891ac3ca
ircd: irc_radixtree: add irc_radixtree_irccasecanon and irc_radixtree_strcasecanon helpers
2016-01-09 01:00:55 -06:00
William Pitcock
325cc939b7
ircd: irc_radixtree: add some convenience functions for tracking radix tree stats
2016-01-09 00:54:57 -06:00
William Pitcock
8e6ba6f9ce
ircd: add irc_radixtree, which is like irc_dictionary but uses a radix tree as the backing store
2016-01-09 00:44:39 -06:00
William Pitcock
e575ed5193
libratbox: disable the block allocator, but keep it as a stub for now
2016-01-08 07:16:23 -06:00
William Pitcock
1eeb046930
ircd: remove internal resolver, no longer used
2016-01-08 06:39:51 -06:00
William Pitcock
1d02144f8b
ircd: move DNS resolution over to authd
2016-01-08 06:31:08 -06:00
Aaron Jones
d8c4154da2
Fix LTDL conditional, remove some unnecessary and/or ugly configure tests
2016-01-07 17:15:55 +00:00
William Pitcock
fb7d74efef
ircd/authd: split out authd lifecycle functions from actual DNS functions
2016-01-06 04:41:57 -06:00
William Pitcock
7d2852b4d1
dns: new WIP client which queries authd for DNS records, not yet in use
2016-01-06 04:28:34 -06:00
William Pitcock
d610d3f344
config.h: fix SPATH
2016-01-06 02:00:12 -06:00
William Pitcock
2a19fc3f57
general: remove last vestiges of static modules support (this hasn't ever actually worked...)
2016-01-06 01:28:20 -06:00
William Pitcock
f272e7abc7
modules: use libltdl to load the modules
2016-01-05 21:39:09 -06:00
William Pitcock
c52df12552
buildsystem: convert to automake + libtool
2016-01-05 21:20:25 -06:00
William Pitcock
9e07c8f70b
whois: add a hook allowing for ShowChannel() behaviour to be overridden for channel visibility
2016-01-05 18:45:07 -06:00
Juuso Lapinlampi
6eb0267a90
messages.h: Remove 900-902 IRCv3.1 SASL trailing period
...
The IRCv3.1 SASL specification [1] has been updated today, and brings a
level of consistency with the trailing periods (or the lack of).
This implements the change made in
ircv3/ircv3-specifications@6d2ca77ffd .
[1]: http://ircv3.net/specs/extensions/sasl-3.1.html
2015-12-30 12:51:48 +02:00
Juuso Lapinlampi
e0160ec5a4
messages.h: Standardize 256 (RPL_ADMINME) with RFC 1459
...
RPL_ADMINME is a response the client receives using the ADMIN command.
Charybdis used to implement a non-standard version of this.
The RFC 1459 standard [1] says in section "6.2 Command responses.":
256 RPL_ADMINME
"<server> :Administrative info"
This commit corrects the behavior to follow the standard.
[1]: https://tools.ietf.org/html/rfc1459
2015-12-28 21:19:47 -06:00
William Pitcock
0817ad4cd0
messages.h: fix numeric 320
2015-12-28 01:36:40 -06:00
William Pitcock
72ad5c04fe
whois: list active operator block and privset when appropriate
2015-12-28 01:33:09 -06:00
William Pitcock
d513218a9e
LIST: allow channel display threshold to be configured ( closes #109 )
2015-12-26 22:23:28 -06:00
William Pitcock
2f9687c48c
channel: cache duplicate calls to is_banned() and is_quieted()
2015-12-13 08:13:52 -06:00
Jilles Tjoelker
2d28539c68
Reduce clean_nick() code duplication further.
...
Side effect: hurt and monitor now allow nicks starting with a digit.
2015-12-13 00:22:21 +01:00
William Pitcock
72dee03d50
clean up some code duplication when checking nicks for validity
2015-12-12 08:41:09 -06:00
William Pitcock
c1725bda3c
ssl: allow cipher list to be overridden ( closes #67 )
2015-12-12 07:50:48 -06:00
William Pitcock
b5b4a0e79b
client: use sequential connection ids for ssld connections in ssld RPC, instead of the file descriptor
...
this avoids race conditions when a file descriptor is reused and an ssld worker has not acked that the previous
connection was closed, which results in the new client being kicked.
2015-12-12 05:20:51 -06:00
William Pitcock
63eb8567cb
implement configurable channel modes ( closes #31 )
...
While functionally compatible with the implementation in ElementalIRCd, our approach is different,
specifically pre-calculating the bitmask at config load time. This is more efficient, and allows us
to report errors as part of the configuration phase.
2015-12-11 15:36:53 -06:00
William Pitcock
bac8c4829f
config.h.dist: resync with config.h ( closes #14 )
2015-12-11 12:14:34 -06:00
William Pitcock
427a8d5dbb
WHOIS: use cipher string if available
2015-12-11 08:20:11 -06:00
William Pitcock
ebe33dbfab
sslproc: set Client.localClient.cipher_string if sent by ssld
2015-12-11 08:19:50 -06:00
William Pitcock
196740c42b
sslproc: likewise
2015-12-10 23:44:31 -06:00
William Pitcock
7801d174d7
Revert "extban: implement helper functions for stackable extbans (part 1) (ref #74 )"
...
This reverts commit 304bd0d095
.
2015-12-10 02:19:21 -06:00
William Pitcock
304bd0d095
extban: implement helper functions for stackable extbans (part 1) (ref #74 )
2015-12-10 01:33:30 -06:00
William Pitcock
202d496644
override: only engage override code if we're needing to authorize a WRITE to a channel's state ( closes #65 )
2015-12-10 01:00:32 -06:00
William Pitcock
13d8f0edba
allow certfp method to be configured
2015-12-07 01:49:30 -06:00
William Pitcock
4a5330bb4d
cap: implement ircv3.2 chghost cap
2015-11-19 22:53:55 -06:00
William Pitcock
583f064fef
send: add negation argument to sendto_common_channels_local() and friends
2015-11-19 22:43:45 -06:00
Andrew Wilcox
5f8fb56d02
Revert "remove MONITOR for now pending a complete rewrite"
...
This reverts commit 87fa262fec
.
2015-10-15 17:31:55 -05:00
William Pitcock
87fa262fec
remove MONITOR for now pending a complete rewrite
2015-10-15 09:39:48 -05:00
William Pitcock
d09bde15a1
monitor: additional cleanup pointed out by mr_flea
2015-10-11 19:32:31 -05:00
William Pitcock
d5f856c68e
monitor: fix the resource leak properly, unlike the moronic elemental-ircd developers
2015-10-11 18:48:53 -05:00
Jilles Tjoelker
2125182293
Remove the unneeded username parameter to register_local_user().
2015-09-13 22:59:03 +02:00
Elizabeth Myers
34c10ca8b7
Relocate report_Klines to proper home
...
This function is not used anywhere else but m_stats, so should be put
there.
2015-08-08 17:25:29 -05:00
Jail Bird
29c92cf95f
Spring cleaning redux:
...
- Implemented changes suggested by Jilles
- Remove some unused parameters in functions
- Remove some unused ssl procs
- 63-bit time_t support in TS deltas
- const char * vs char * cleanup
- struct alignment (void *) casts
- signed vs unsigned fixes
- bad memset() call
- Bad LT_MAIN in libratbox
- char -> unsigned char casts for isdigit/isspace/etc calls
Thanks Jilles!
2015-04-20 00:55:20 -05:00
Aaron Jones
c9b5cd623b
Remove network_desc configuration option, never actually used anywhere
2015-03-26 14:46:54 -05:00
William Pitcock
bb2a50509a
config: further EGD removal
2015-03-01 01:06:58 -06:00
William Pitcock
984d80c988
cap-notify: add sendto_local_clients_with_capability() (ref #84 )
2015-03-01 00:44:34 -06:00
William Pitcock
13de708352
cap-notify: add cap-notify cap
2015-03-01 00:26:23 -06:00
Max Teufel
1b54aa5c3b
src/channel: add support for IRCv3.2 userhost-in-names
2015-02-28 01:06:38 -06:00
William Pitcock
6e3d57dc6b
cap: remove SASL_REAUTH capability
2015-02-28 01:01:08 -06:00
William Pitcock
74bae4c6ff
remove references to LIBPATH ( closes #26 ).
2015-02-24 20:25:34 -06:00
William Pitcock
95cce5f358
Revert "m_invite: add support for CAP invite-notify"
...
This reverts commit 93eb76cc32
.
2015-02-16 17:50:51 -06:00
Max Teufel
93eb76cc32
m_invite: add support for CAP invite-notify
...
Specification:
<https://github.com/ircv3/ircv3-specifications/blob/master/extensions/invite-notify-3.2.md >
2015-02-16 15:40:34 -06:00
William Pitcock
c6bc97fdcd
m_sasl: move some struct members around for sasl-reauth
2015-02-16 15:39:36 -06:00
William Pitcock
ef3ab8e3a5
cap: allow clients to do sasl reauth if they requested sasl and sasl-reauth (ref ircv3/ircv3#103 ).
2015-02-15 17:11:28 -06:00
Max Teufel
7d33cce8ef
m_sasl: add configuration option for the nick of the SASL agent
...
This allows multiple improvements to m_sasl. With this change, the SASL
authentication gets aborted immediately when services are offline.
Additionally, we send the SASL ENCAP messages directly to the specified
SASL agent.
2015-02-14 20:31:25 +01:00
Jilles Tjoelker
483987a464
Explicitly pass the current time to deactivate_conf().
...
Some places depend on the ban not being destroyed.
2014-09-21 15:02:43 +02:00
Jilles Tjoelker
0f8db0552e
channel: Remove write-only field.
2014-05-29 17:41:35 +02:00
Jilles Tjoelker
51452a370b
channel: Stop pretending to support per-mode server capabilities.
...
After a change for dynamic server capabilities, the code to send out mode
changes was changed to use the capabilities belonging to the last mode
being sent out. This does not make sense; therefore, just use no
capabilities and remove supporting infrastructure.
2014-05-29 17:40:16 +02:00
Jilles Tjoelker
72ae8a1f7b
Merge branch 'patch-1' of https://github.com/auscompgeek/charybdis
2014-05-29 15:42:47 +02:00
Mantas Mikulėnas
c72f15bcf5
m_version: remove spaces from version string
...
"to make it machine parseable again", as in ircd-seven commit 03b2176b88a1.
2014-05-06 16:28:23 +03:00
auscompgeek
bd96349c86
strip_colour: Strip '\x0F' (^O, formatting off)
...
Reported by ssbr on freenode:
chmode +c doesn't strip ^O, which turns off all previous formatting.
This can cause clients that internally use mIRC formatting to render messages weirdly,
e.g. highlighted messages in HexChat: <https://i.imgur.com/eDX8Aif.png >.
2014-04-17 13:12:11 +10:00
Keith Buck
55abcbb20a
Remove trailing whitespace from all .c and .h files.
...
3134 bytes were removed.
2014-03-03 04:25:47 +00:00
Keith Buck
dceac3e4fb
conf parsing: Fix memory leaks and clean up code a bit.
...
Charybdis currently leaks about 45-50k per configuration parse,
including every rehash. This change plugs these leaks by properly
iterating through all conf_parm_t structures to seek all strings that
should be freed and also by freeing the conf_parm_t structures
themselves.
These leaks have been present since the original rewrite of the
configuration parsing system in ircd-ratbox r11953.
Additionally, this change also cleans up and documents the parsing code
a bit.
2014-02-28 17:35:51 +00:00
Jilles Tjoelker
26c6ac3dc7
Simplify module path list, removing strcpy use.
2014-02-23 23:47:27 +01:00
Jilles Tjoelker
77910830e3
Fix various printf arg types.
2014-02-23 23:01:59 +01:00
Jilles Tjoelker
a9f1281448
modlist: Fix address display on 64-bit systems.
2014-02-23 22:55:40 +01:00
Rylee Elise Fowler
1870e06ad3
autotools: fix typo relating to ban db
2014-01-31 11:03:54 -05:00
Keith Buck
7f3382fe98
Remove duplicate default-value code.
...
Default values for default_floodcount and default_ident_timeout are set
in s_conf.c. Remove code that checks for missing values in ircd.c.
Additionally, reset default_ident_timeout to 5 if an invalid value (i.e.
0) is provided.
2013-10-29 09:32:28 +00:00
Jilles Tjoelker
364e59f82a
whowas: Use the normal rules for IP visibility.
...
Add the flags (auth{} spoof, dynamic spoof) to struct Whowas and add a
show_ip_whowas().
Normal users now see IPs of unspoofed users, and remote opers can see IPs
behind dynamic spoofs. Also, general::hide_spoof_ips is now applied when
the IP is shown, not when the client exits.
2013-09-14 12:26:32 +02:00
Jilles Tjoelker
2635cc8089
Fix parameter name in header file for show_ip_conf().
2013-09-14 12:26:24 +02:00
Keith Buck
77d3d2dbaf
Remove s_assert definition from ircd_defs.h and add it to its own header.
...
s_assert requires some higher-level functionality that shouldn't be
present in ircd_defs.h. ircd_defs.h is used by ssld, which has no notion
of logging or sending IRC messages. Additionally, some of the headers
s_assert depends on result in conflicting definitions in ssld.c.
This change also fixes the compile when using --enable-assert=soft.
2013-09-10 06:10:14 +00:00
Elizabeth Myers
3c93d380e0
Add support for multiple forms of blacklist queries using matches.
...
It supports both literal and last octet matches from the dnsbl.
If matches is not present, the old behaviour is used.
2013-04-20 20:49:11 -05:00
Elizabeth Myers
9d745dbd21
Implement kill-cancelling hook.
...
With this comes an example module to block the killing of services.
NOTE: this will not cancel remote kills. Those are still accepted, per
the TS 6 specification.
2013-04-20 01:07:55 -05:00
William Pitcock
6f7b36d5d0
Mostly enable support for checking format strings with -Wformat.
...
Basically derived from Ratbox 3.1.
2013-02-21 05:46:04 -06:00
William Pitcock
3dae60ef47
cache: use rb_strdup() instead of a static buffer for cache lines.
...
BUFSIZE limitation is retained as there is no need to remove it, as all lines must be smaller than it
due to RFC1459 message requirements.
2013-01-15 16:24:33 -06:00
Jilles Tjoelker
22cae20f02
server: Make sure CAP_CAP and CAP_TS6 are non-zero.
...
A zero CAP_CAP caused duplicate CAPAB to go undetected, allowing a
mismatch between what is sent out via ENCAP GCAP and what applies locally.
A zero CAP_TS6 allowed server connections without SID (with a valid
connect block).
2012-12-18 17:03:59 +01:00
William Pitcock
1cf9ef50cd
numeric: add 744 (ERR_TOPICLOCK) to list so we don't step on inspircd
2012-10-13 17:50:12 +00:00
Keith Buck
5bd79c2c56
res.c: Try other servers if errors or corrupt replies are encountered.
...
Currently, the resolver treats SERVFAIL, NOTIMP, and REFUSED queries the
same as NXDOMAIN, but this really should not be the case. Instead, if
the DNS server errors on our request or provides an invalid request, try
another server.
Also, count DNS server errors in addition to timeouts and avoid these
undesirable servers.
2012-10-09 05:58:02 +00:00
William Pitcock
c4e81ae9e9
m_starttls: handle error condition with ERR_STARTTLS (691) numeric per tls-3.2 specification
2012-09-22 19:31:55 -05:00
William Pitcock
538d4d6188
m_cap: add 'tls' core capability
2012-09-22 14:15:45 -05:00
William Pitcock
3e54d7bfb0
Define RPL_STARTTLS.
2012-09-22 14:04:57 -05:00
Keith Buck
7d60375446
Add new conf_read_start and conf_read_end hooks.
2012-05-21 20:22:07 +00:00