1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-28 06:56:39 +02:00
Commit Graph

32 Commits

Author SHA1 Message Date
Bram Matthys 9685d1e052 Fix module manager: if 1 upgrade failed, the remaining were not upgraded.
Reported by k4be in https://bugs.unrealircd.org/view.php?id=6352
2023-11-29 09:08:55 +01:00
Bram Matthys 98c264aabf Fix some more warnings, rather minor.
[skip ci]
2023-11-26 18:48:09 +01:00
Bram Matthys 7d024f8086 URL API: add request->connect_timeout & request->transfer_timeout
... in case you want to do fine-tuning.

Defaults to DOWNLOAD_CONNECT_TIMEOUT (15 seconds) and
DOWNLOAD_TRANSFER_TIMEOUT (20 seconds).

For example, the module manager uses a shorter timeout of 7 and 20.
(that was already the case, but now it uses the generic api so
 it needed an option to set it to those values)
2023-11-24 14:38:20 +01:00
Bram Matthys 36323f4294 Replace modulemanager HTTPS code with the generic URL code.
We now have a synchronous_http_request() which can be used for that
(NOTE: that function is NOT for use in unrealircd modules)
2023-11-24 13:22:55 +01:00
Bram Matthys 35e5d99e32 './unrealircd module upgrade' only showed output for one module upgrade,
even when multiple modules were upgraded.

Actually not sure about the cause and how this is possible, but running
'make install' only once at the end is the solution, which is something
that should be done that way anyway.

Reported by westor in https://bugs.unrealircd.org/view.php?id=5919
2023-09-09 10:40:29 +02:00
Bram Matthys 4b23596b4c Code cleanup: some strncmp -> str_starts_with* replaces (less chance of mistakes) 2023-06-17 17:50:37 +02:00
Bram Matthys 2a98802d09 Fix compile warning due to latest additions. 2023-03-17 11:06:12 +01:00
Bram Matthys 9a08e39bca Fix modulemanager not working on FreeBSD (./unrealircd module install ...)
and other systems where 'make' was not GNU Make.
It now uses the same detection mechanism as in ./Config, which
should be known to work.

Reported by Valware and rj1 in https://bugs.unrealircd.org/view.php?id=6195
2023-03-17 10:44:10 +01:00
Bram Matthys b154591a58 Some source files indicated the license was "GPLv2", which was meant to
be (and is now clarified to be) "GPLv2 or later".
Reported by libsys in https://bugs.unrealircd.org/view.php?id=6099
2022-05-11 06:41:11 +02:00
Bram Matthys 7c988e04e0 Make self-test of "./unrealircd module" check if ./Config has been ran.
That is: it checks if the Makefile is there to avoid a mysterious
"No rule to make target 'custommodule'" error message.
2022-05-04 19:19:11 +02:00
Bram Matthys 71da780490 Module manager: stop on compile failure (fix return value) and also fix
some text (coming from a too broad mass replace).
2022-05-04 18:27:54 +02:00
Bram Matthys 9a9b318bfb Add a way to filter in ./unrealircd module generate-repository
so we can generate modules.list better.
2021-11-10 11:36:21 +01:00
Bram Matthys 5dc6411419 Const const const. This completes the work in h.h. 2021-09-11 10:21:54 +02:00
Bram Matthys f085173d46 More const char * stuff... mostly in conf.c but also elsewhere. 2021-09-10 15:01:23 +02:00
Bram Matthys d648cd0729 Use strlncpy() everywhere where we previously used strlncat() with a empty
buffer (due to the lack of strlncpy before...).
2021-09-10 11:26:36 +02:00
k4be da497f0a7a Delete CheckNull defines from modules now that it's defined in h.h 2021-08-26 18:12:56 +02:00
Bram Matthys 756fee58cb Rename ConfigItem_include to ConfigResource and also use it for non-includes
such as other items in the configuration file that are URLs.
2021-08-18 14:54:41 +02:00
Bram Matthys 532a9becda Massive renames of SSL/TLS and SSL to TLS. People should know the term by now :D 2021-08-10 09:07:32 +02:00
Bram Matthys 61ccd94466 Newlog: convert tls.c to use new log system 2021-08-09 14:41:35 +02:00
Bram Matthys c22207c4ca Drop cf_ prefix from ConfigFile and ce_ prefix from ConfigEntry structs.
Also rename them to describe better what they do.

ConfigFile:
cf_filename -> filename
cf_next -> next
cf_entries -> items

ConfigEntry:
ce_fileptr -> file
ce_varlinenum -> line_number
ce_fileposstart -> file_position_start
ce_fileposend -> file_position_end
ce_sectlinenum -> section_linenumber
ce_varname -> name
ce_vardata -> value
ce_cond -> conditional_config
ce_entries -> items
ce_next -> next
ce_prevlevel -> parent

Also add doxygen docs for both structs.
2021-08-06 17:50:45 +02:00
k4be 3a9e4f98ac Add option for notifying chanops about invitations by normal users.
Normally, channel operators are only notified when another chanop
invites someone to their channel - as this would allow the user to
join the channel later if it becomes invite-only. This is still
the default behaviour. But now, it can be configured to notify
operators about any invitation done to their channel, eitner by
another op or by normal user. This will allow them to see whether
someone floods others with invitations to their channels.
Enable the option with set::normal-user-invite-notification yes;
2021-07-17 18:07:02 +02:00
Bram Matthys 95cfafcd51 Include dirent.h by default. 2021-05-15 15:42:34 +02:00
Bram Matthys 7002139fad Add self-test to module manager for those who rm -rf their source directory. 2020-11-28 11:31:31 +01:00
Bram Matthys 07753d112e Update for previous commit. See https://github.com/unrealircd/unrealircd/pull/87 2020-01-05 10:00:34 +01:00
k4bek4be cdea885b32 For ./unrealircd module parse-c-file use real line counts within the C file instead of within the special block 2020-01-05 09:57:29 +01:00
Bram Matthys c215a3621a Use SNI in modulemanager. Not needed for the default one, but if you add
custom ones you might need it.
2019-12-28 18:50:03 +01:00
Bram Matthys 910f2ad383 Module manager: more error details when it fails to fetch a repository. 2019-12-28 18:05:22 +01:00
Bram Matthys 8c95a8f119 Don't forget to mention ./unrealircd module uninstall... 2019-11-14 17:34:19 +01:00
Bram Matthys 8fb125f588 Add some connect and read timeouts to the module manager when
checking repositories and downloading C files (this was a TODO item).

Give a clear hard error if ALL repositories failed
(failed to connect, download or parse).

Make a few commands work regardless of repository status.
In fact, these don't connect to repositories at all since they
don't need to. Thus, these commands are always available:
./unrealircd module [uninstall|generate-repository|parse-c-file]
of which only 'uninstall' is of importance for end-users.

Finally, make parse-c-file print a better error in case the file
could not be opened. Note that this command is only there for
module developers and repository managers, not end-users.
2019-11-04 10:52:51 +01:00
Bram Matthys 449f69485f Fix some memory leaks in ./unrealircd module.
Not terribly important at the moment, but still...
2019-11-02 08:14:25 +01:00
Bram Matthys 7bf51f36a6 Fix column alignment in './unrealircd module list' 2019-11-01 17:25:36 +01:00
Bram Matthys dfa83aa6e5 Add module manager. See https://www.unrealircd.org/docs/Module_manager
Also update release notes and some unrelated changes.
BIG commits. Lots of work. Requires more testing.
2019-11-01 12:57:12 +01:00