Commit graph

  • 184e7083ea
    Move client capability code to corresponding modules k4be 2021-08-24 22:34:39 +02:00
  • a03677023c
    Change WATCH numerics to valid ones k4be 2021-08-24 20:39:36 +02:00
  • e7e82ad493
    Move host-change-related code to chghost.c k4be 2021-08-24 20:37:02 +02:00
  • f4a915bbb7
    Update watch_notification argument name Fix WATCH crash caused by that argument k4be 2021-08-24 20:19:50 +02:00
  • fe51aaf357
    Add wATCH_EVENT defines k4be 2021-08-24 19:58:05 +02:00
  • 502def9401
    Add extended-monitor (work in progress) k4be 2021-08-24 19:42:38 +02:00
  • 3b54cd35b6
    metadata: some code cleanup, normalize names k4be 2021-08-24 15:19:57 +02:00
  • fd02a662ec
    Fix compile error when not using DEBUGMODE Bram Matthys 2021-08-23 16:25:24 +02:00
  • 83e6dafc96
    metadata: change logging to unreal_log k4be 2021-08-23 16:03:12 +02:00
  • d8067594be
    Fix DNS lookup for proxy-forwarded IPs k4be 2021-08-23 12:41:21 +02:00
  • fb0f5ecab3
    Fix hang on METADATA SUB k4be 2021-08-22 23:26:16 +02:00
  • d69b4394e7
    Fix queuing notifications k4be 2021-08-22 21:30:36 +02:00
  • 9a8889f161
    Remove a static variable that was never read k4be 2021-08-22 21:25:06 +02:00
  • d40853b71c
    Add basic metadata module (no moderation) k4be 2021-08-22 21:17:19 +02:00
  • 58cd2d8bfd
    Add some comments and add a redundant check for parameter writing. Better to be safe than to accidentally write OOB. Bram Matthys 2021-08-22 19:43:36 +02:00
  • 49955670d9
    Use do_mode_char_write() at two more places. Bram Matthys 2021-08-22 19:38:18 +02:00
  • 6f62a967fa
    More code cleanups in mode.c: this splits do_mode_char() up between do_mode_char_list_mode() and do_mode_char_member_mode(), which are two quite different things. And rewrite do_mode_char_member_mode() to get rid of switch/case style and the goto. Bram Matthys 2021-08-22 19:33:33 +02:00
  • 52b4a44e94
    Massively rename Cmode.flag to Cmode.letter. (similar to 5a387f9c0b) Bram Matthys 2021-08-22 18:45:13 +02:00
  • 9838378550
    Massive rename of: * channel->mode.extmode to channel->mode.mode * channel->mode.extmodeparams to channel->mode.mode_params Bram Matthys 2021-08-22 18:36:00 +02:00
  • e0504b2e52
    Remove Mode.mode, it now only contains Mode.extmode and Mode.extmodeparams Bram Matthys 2021-08-22 18:33:25 +02:00
  • fafa58f8c8
    Make gcc happy, even though this is a false positive. Bram Matthys 2021-08-22 18:24:31 +02:00
  • 7e4399a2ef
    Some do_mode_char() cleanups, now that it only deals with members/lists. Bram Matthys 2021-08-22 18:23:22 +02:00
  • 783cc3ff5b
    Cmode API: change from Channelmode_Table[<num>] to channelmodes linked list. And now we can easily sort the channel modes too, makes it easier for our test cases. Bram Matthys 2021-08-22 17:57:14 +02:00
  • b3fce25955
    Documentation update k4be 2021-08-22 17:00:59 +02:00
  • 50ae1ca2df
    Proxy validation by IP address. TODO: add optional password too. k4be 2021-08-22 16:46:52 +02:00
  • 96b290536e
    Rename Channelmode_Table.slot to .param_slot since this is only about parameter slot mapping. Bram Matthys 2021-08-22 16:37:18 +02:00
  • e205e14279
    Query DNS for hostname of forwarded users (seems to work) k4be 2021-08-22 15:05:22 +02:00
  • 7ed45c5921
    Make websocket_parse_forwarded_header return a pointer k4be 2021-08-22 14:20:36 +02:00
  • d35a90c80f
    Fix various channel modes showing up as duplicate in 004 and 005. Yeah I forgot we hardcoded these somewhere, now they are gone.. poof! Bram Matthys 2021-08-22 14:06:51 +02:00
  • 39ed0520cc
    Fix compiler warning/crash Bram Matthys 2021-08-22 13:50:02 +02:00
  • aac3c407bf
    I forgot a forward declaration.. Bram Matthys 2021-08-22 13:45:32 +02:00
  • 3a464e34ff
    Some minor reordering Bram Matthys 2021-08-22 13:36:46 +02:00
  • a2cdb8ff89
    Merge branch 'unreal60_dev' of github.com:syzop/unrealircd-next into unreal60_dev k4be 2021-08-22 13:36:06 +02:00
  • be78ecebfc
    Parse "Forwarded:" header from proxy. Not (yet) checking source address nor getting a hostname. k4be 2021-08-22 13:34:54 +02:00
  • 85d7a2556a
    Move list mode requests like "MODE #channel b" to list_mode_request() which uses send_list_mode() and send_user_list_mode() for +beI and +aq respectively. Bram Matthys 2021-08-22 13:32:37 +02:00
  • 5c114d0069
    Cleanup old channel mode stuff, now that all non-list-modes are gone. Eg no longer need to walk through the corechannelmodetable for single param channel modes... Bram Matthys 2021-08-22 13:15:08 +02:00
  • 8a5a0723e9
    Fix the default set::modes-on-join (+nt) not working anymore, since at the time of setting the default settings the channel mode modules are not fully initialized yet. Bram Matthys 2021-08-22 13:12:55 +02:00
  • 1a19de2de9
    Move channel mode +r to module chanmodes/isregistered Bram Matthys 2021-08-22 12:19:07 +02:00
  • 57ec565051
    Move channel mode +t to module chanmodes/topiclimit TODO: move code from "topic" module to here, some hook call. Bram Matthys 2021-08-22 12:09:53 +02:00
  • 6dd539d760
    Move channel mode +m to module chanmodes/moderated (and nearly all the code related to it) Bram Matthys 2021-08-22 12:01:54 +02:00
  • 24f73c28e4
    Move channel mode +l to module chanmodes/limit (and all the code related to it) Bram Matthys 2021-08-22 11:45:08 +02:00
  • 1533c6431e
    Move channel mode +n to module chanmodes/noexternalmsgs (and all the code related to it) Bram Matthys 2021-08-22 11:22:33 +02:00
  • 8066c13876
    Move +s/+p to chanmodes/secret and chanmodes/private. To be honest, the modules don't do much other than handling the mode stuff, but.. we can look at that again later. Bram Matthys 2021-08-22 11:11:26 +02:00
  • 374069914e
    Fix memory leak in find_invex() due to extban recode from a few weeks ago. Bram Matthys 2021-08-22 10:44:29 +02:00
  • 295b3505ef
    Move channel mode +i to module chanmodes/inviteonly Bram Matthys 2021-08-22 10:37:37 +02:00
  • c403a47daf
    Move channel mode +k to module chanmodes/key Bram Matthys 2021-08-22 10:06:51 +02:00
  • 1e8c5da6aa
    Add ERR_INVALIDMODEPARAM which is a bit more informative than ERR_CANNOTCHANGECHANMODE since it makes clear the problem is the parameter and not a permissions issue.. Bram Matthys 2021-08-22 10:05:49 +02:00
  • 021ba807bd
    Fix memory leaks in built-in https client and only build SSL_CTX once. Bram Matthys 2021-08-21 20:29:38 +02:00
  • ec5f9ee6c3
    Add check for missing HTTP/1.X response. Shouldn't happen, but, otherwise the error would be confusing wrt redirects, this is better. Bram Matthys 2021-08-21 18:33:14 +02:00
  • 8344327cb4
    HTTPS client: support Basic authorization Bram Matthys 2021-08-21 16:57:38 +02:00
  • 6f087093df
    Create some more notes regarding the release notes Bram Matthys 2021-08-21 16:36:33 +02:00
  • ccc0b3397e
    For a remote include, use the URL[*] in any error messages instead of the temporary file. That is, ce->file->name contains the URL. Bram Matthys 2021-08-21 16:14:24 +02:00
  • ecc3ffe1e2
    Parse error in remote include must be a fatal error. It is now (again). Bram Matthys 2021-08-21 16:04:28 +02:00
  • 24dec75576
    Rename the current cloaking module to 'oldcloak' Bram Matthys 2021-08-21 14:32:49 +02:00
  • 8dc316bd8d
    Use SHA256 instead of MD5 in add_entropy_configfile() Bram Matthys 2021-08-21 14:28:01 +02:00
  • c821efa477
    Get rid of old remote include stuff in windows gui.c, we don't track this anymore. [skip ci] Bram Matthys 2021-08-21 14:14:03 +02:00
  • 5b90fd0c0d
    Get rid of old MOTD downloading code and several USE_LIBCURL defines that are no longer needed. Bram Matthys 2021-08-21 14:13:24 +02:00
  • 89b9c2ec32
    Deal with HTTP redirects, and add DOWNLOAD_MAX_REDIRECTS to include/config.h which defaults to 2. Make it use this value for both curl and non-curl. Previously (with curl) it was set to 1, and nobody complained... Bram Matthys 2021-08-21 14:03:56 +02:00
  • e28cbb6041
    Differentiate between DNS/connect timeout (15s) and transfer timeout (45s). Already done in curl code, now also in non-curl-code. Bram Matthys 2021-08-21 13:35:44 +02:00
  • fe08d58dbc
    Add SNI support. Verify TLS certificate belongs to the host. (Those were items 7 and 8 on the previously mentioned TODO list) Bram Matthys 2021-08-21 13:30:36 +02:00
  • 6a6f4120ee
    Built-in https client: Deal with Transfer-Encoding: chunked Bram Matthys 2021-08-21 13:22:53 +02:00
  • c9c2106bb9
    Use SHA256 hash for cache/<object> instead of old MD5 Bram Matthys 2021-08-21 09:45:44 +02:00
  • 090fe76739
    URL: Make the curl and non-curl implementation use the same timeouts. These are set in include/config.h to what they already were before: 15 seconds for the connect timeout, 45 for the complete transfer. Bram Matthys 2021-08-21 09:37:14 +02:00
  • c9e98137a4
    Get rid of url.h and stuff the 6 functions there (which were not even declared as extern) in include/h.h like the rest. Bram Matthys 2021-08-21 09:32:17 +02:00
  • 182cc7eab4
    HTTPS client: add support for timeouts Bram Matthys 2021-08-21 09:19:29 +02:00
  • 9fe3b3f4d5
    Use https_cancel() and get rid of goto's. Bram Matthys 2021-08-21 09:09:10 +02:00
  • 2a762ee68b
    Use handle->errorbuf instead of local errorbuf everywhere. Bram Matthys 2021-08-21 08:52:47 +02:00
  • 2c7d2c8f86
    Split url.c into url_curl.c (curl implementation) and url_unreal (the new fallback https-only implementation). Bram Matthys 2021-08-21 08:47:38 +02:00
  • 00f3f300f0
    Put downloads in a list. Bram Matthys 2021-08-21 08:31:30 +02:00
  • 1752844824
    Built in HTTPS support: support http caching (If-Modified-Since, 304) Bram Matthys 2021-08-21 08:24:52 +02:00
  • dcfe0885a6
    Add functions to conver to/from RFC2616 timestamps, as used in HTTP in last modified headers. Bram Matthys 2021-08-21 08:24:22 +02:00
  • d6a074aa34
    Support for remote includes without cURL (https only). This is work in progress. It current lacks a number of features that we would like to have, but most of them are relatively easy now that most of the work has been done: 1) Support for caching based on timestamps, like curl ("not modified") 2) IPv6 support 3) HTTP redirects (with limit) 4) Timeouts for connect and reads (15 / 45 for curl atm) 5) HTTP downgrades 6) Chunked transfer encoding 7) Verify openssl hostname check 8) SNI 9) Ideally some progressbar for large transfers such as the geoip db (for cURL too by the way) Bram Matthys 2021-08-20 19:19:04 +02:00
  • f95e799397
    For failed downloads, where we have a cached copy present, i forgot to read the (cached) remote include file so it did not check if it included another remote include. Bram Matthys 2021-08-19 09:53:31 +02:00
  • 5321dcb81b
    ConfigResource: get rid of rs->flag.type stuff and just use rs->type. Also replace local variables 'inc' with 'rs'. Bram Matthys 2021-08-19 09:37:28 +02:00
  • ae6222e329
    Get rid of errorbuf in ConfigResource as this is not used. Bram Matthys 2021-08-19 09:34:33 +02:00
  • 4e53bf874a
    Make remote includes caching work again. Both on-boot and on-rehash. Bram Matthys 2021-08-19 09:31:13 +02:00
  • 7b3c1165f8
    Make tld::mask use the generic masks that we use everywhere (and hence support multiple masks and server bans matching etc) Bram Matthys 2021-08-18 18:45:23 +02:00
  • e503ad4fd5
    Reorder members in ConfigEntry struct a bit (optimize for L1/L2 cache) Obviously name, value and next should be at the top. Bram Matthys 2021-08-18 18:31:27 +02:00
  • cdff69db7a
    Allow people to include the same file multiple times. This will no longer raise an error and we will simply load the include only once. Bram Matthys 2021-08-18 17:04:45 +02:00
  • a60b9f3176
    Handle duplicate URLs/downloads (only download once) Bram Matthys 2021-08-18 16:43:42 +02:00
  • ce3e23a5d2
    Get rid of unnecessary included_from and included_from_line members in ConfigResource (previously ConfigItem_include). Bram Matthys 2021-08-18 16:31:48 +02:00
  • 0b5fab1617
    Some cleanups in src/url.c and added error message for the very unusual case where curl may fail to create a handle. Bram Matthys 2021-08-18 15:19:51 +02:00
  • d8c3da7698
    Get rid of download_file(), the synchronous version, is no longer used. Bram Matthys 2021-08-18 15:14:14 +02:00
  • 6d56145f60
    Remove URL support from staff module now that main conf.c already does this. And re-enable the module, as it was #if'd out. Bram Matthys 2021-08-18 15:11:37 +02:00
  • e296464b97
    Get rid of update_config_resource() and just set the appropriate values at the four places that used it. Bram Matthys 2021-08-18 15:02:18 +02:00
  • 756fee58cb
    Rename ConfigItem_include to ConfigResource and also use it for non-includes such as other items in the configuration file that are URLs. Bram Matthys 2021-08-18 14:54:41 +02:00
  • d897ecbc86
    Get rid of some if (need_34_upgrade) upgrade_conf_to_34(); stuff We probably want to get rid of that at all? Maybe defer until we know whether we want/need it for U5->U6... Bram Matthys 2021-08-18 13:36:55 +02:00
  • b74d15595b
    Change int rehash() to void request_rehash(), which is a better name as it REQUESTS to rehash the server, but it may not be done immediately. And making it void makes sure nobody relies on some sort of return value which will differ between with vs without remote includes. Bram Matthys 2021-08-18 13:26:37 +02:00
  • 675c1cab55
    Rename loop struct members: * loop.ircd_rehashing -> loop.rehashing * loop.ircd_terminating -> loop.terminating * loop.ircd_booted -> loop.booted * loop.ircd_forked -> loop.forked Bram Matthys 2021-08-18 13:05:41 +02:00
  • f184472781
    Get rid of argument to config_test(), as we have loop.ircd_rehashing for that. Bram Matthys 2021-08-18 13:03:31 +02:00
  • fe2c834080
    Rename lots of config functions (internally used ones, most likely not used by 3rd party authors): * conf_start() -> config_read_start() * conf_check_complete() -> is_config_read_finished() * load_conf() -> config_read_file() * config_test() -> config_test_blocks() * config_run() -> config_run_blocks() * init_conf() -> config_test() * run_configuration() -> config_run() Bram Matthys 2021-08-18 12:57:38 +02:00
  • 7321a66196
    Make failed include loading fatal again. And fix a crash related to that. Bram Matthys 2021-08-18 12:45:31 +02:00
  • 685e0ee073
    In ConfigItem_include include->url now always exists, and src/url.c is now always compiled in, both regardless of cURL support or not. Obviously the cURL functions are not available without cURL and there are now some #ifdef USE_LIBCURL in url.c Bram Matthys 2021-08-18 12:23:57 +02:00
  • f85615518e
    Make rehashing work again Bram Matthys 2021-08-18 12:05:15 +02:00
  • 03423a2eb7
    Get rid of INCLUDE_NOTLOADED and INCLUDE_USED which AFAICT are unnecessary. Get rid of load_includes() which did the marking and unload_notloaded_includes() and unload_loaded_includes() accordingly. There's now one single free_all_includes(). Bram Matthys 2021-08-18 11:52:53 +02:00
  • 9e887ea4e9
    Start with remote includes makeover. First objective is making them asynchronous on start, which is achieved by this 1st commit. Bram Matthys 2021-08-18 11:26:33 +02:00
  • 5154038d59
    Code cleanup: replace "if(" with "if (" Bram Matthys 2021-08-18 09:52:50 +02:00
  • 6058090435
    Use GeoIPResult * everywhere. Any modules who want to fetch it for a client can use geoip_client(client). Bram Matthys 2021-08-17 17:16:14 +02:00
  • 58abc0da5b
    Add moddata_client_get_raw() to get the ModData *. This probably should not be used much as normally you should not rely on structures created by modules in other modules / other code. Bram Matthys 2021-08-17 17:03:00 +02:00
  • 796cac7a63
    geoip: migrate from simple string to returning a GeoIPResult struct. (work in progress, 1/2) Bram Matthys 2021-08-17 16:38:01 +02:00