]> jfr.im git - irc/unrealircd/unrealircd.git/log
irc/unrealircd/unrealircd.git
3 years agoThis is the last commit to 'unreal50', we will use 'unreal52' from now on. origin/unreal50
Bram Matthys [Wed, 2 Jun 2021 13:05:16 +0000 (15:05 +0200)] 
This is the last commit to 'unreal50', we will use 'unreal52' from now on.

3 years agoUpdate curlinstall script for ./configure from cURL 7.77.0 and above.
Bram Matthys [Wed, 2 Jun 2021 12:35:37 +0000 (14:35 +0200)] 
Update curlinstall script for ./configure from cURL 7.77.0 and above.

3 years agoAdd some markup in release notes
Bram Matthys [Sun, 30 May 2021 17:37:51 +0000 (19:37 +0200)] 
Add some markup in release notes
[skip ci]

3 years agoIf no log { } block is present, we used to only log errors to ircd.log.
Bram Matthys [Sun, 30 May 2021 17:32:48 +0000 (19:32 +0200)] 
If no log { } block is present, we used to only log errors to ircd.log.
From now on we simply enable ALL logging to ircd.log, so also connects,
kills, and so on.

3 years agoAdd log::flags "flood" to log flood messages
Bram Matthys [Sun, 30 May 2021 17:30:36 +0000 (19:30 +0200)] 
Add log::flags "flood" to log flood messages

3 years agoGet rid of mempool LOG_DBG which is never used
Bram Matthys [Sun, 30 May 2021 17:27:35 +0000 (19:27 +0200)] 
Get rid of mempool LOG_DBG which is never used

3 years agoRemove this check due to clang complaining. Whatever.
Bram Matthys [Sun, 30 May 2021 17:11:50 +0000 (19:11 +0200)] 
Remove this check due to clang complaining. Whatever.

3 years agoAll violatons of target-flood, nick-flood, join-flood, away-flood,
Bram Matthys [Sun, 30 May 2021 17:09:46 +0000 (19:09 +0200)] 
All violatons of target-flood, nick-flood, join-flood, away-flood,
invite-flood, knock-flood, max-concurrent-conversations are now
reported to opers with the snomask 'f' (flood).

3 years agoUpdate release notes
Bram Matthys [Sun, 30 May 2021 16:49:18 +0000 (18:49 +0200)] 
Update release notes
[skip ci]

3 years agoThe set:anti-flood block has been redone so you can have different limits
Bram Matthys [Sun, 30 May 2021 16:40:03 +0000 (18:40 +0200)] 
The set:anti-flood block has been redone so you can have different limits
for "unknown-users" and "known-users".
As a reminder, by default, "known-users" are users who are identified
to services OR are on an IP that has been connected for over 2 hours
in the past X days.
See https://www.unrealircd.org/docs/FAQ#new-anti-flood-block
for more information on the layout of the new block.

NOTE: This actual feature, the relase notes and the documentation
      are all work in progress.

3 years agoMake pretty_time_val() output like "2m30s" instead of "2 minutes 30 seconds".
Bram Matthys [Sun, 30 May 2021 12:50:27 +0000 (14:50 +0200)] 
Make pretty_time_val() output like "2m30s" instead of "2 minutes 30 seconds".
I think people will understand both and it is currently rather long.
And a bit confusing too with all the spaces, easy to overlook something eg
in /STATS S where it is being used.

3 years agoMake join-flood use the new framework too, well... partially anyway.
Bram Matthys [Fri, 28 May 2021 16:08:07 +0000 (18:08 +0200)] 
Make join-flood use the new framework too, well... partially anyway.

3 years agoCode cleanup: move flood control to generic system
Bram Matthys [Fri, 28 May 2021 15:59:39 +0000 (17:59 +0200)] 
Code cleanup: move flood control to generic system

3 years agoRename FLD_* to CHFDL_* in chanmodes/floodprot.c, so it does
Bram Matthys [Fri, 28 May 2021 13:48:12 +0000 (15:48 +0200)] 
Rename FLD_* to CHFDL_* in chanmodes/floodprot.c, so it does
not clash with future stuff.

3 years agoCode cleanup: at some places "ClientUser" was used instead of "User".
Bram Matthys [Fri, 28 May 2021 13:25:59 +0000 (15:25 +0200)] 
Code cleanup: at some places "ClientUser" was used instead of "User".

3 years agoCode cleanup: this zeroing isn't useful as we already memset.
Bram Matthys [Fri, 28 May 2021 13:25:10 +0000 (15:25 +0200)] 
Code cleanup: this zeroing isn't useful as we already memset.

3 years agoGet rid of duplicate checks for anti-flood.
Bram Matthys [Fri, 28 May 2021 12:50:29 +0000 (14:50 +0200)] 
Get rid of duplicate checks for anti-flood.
Sorry this is too much effort and i think admins should be smart
enough to figure this out themselves.

3 years agoUpdate release notes
Bram Matthys [Fri, 28 May 2021 08:38:32 +0000 (10:38 +0200)] 
Update release notes
[skip ci]

3 years agoAdd "draft/bot" message tag to messages from +B clients.
Bram Matthys [Fri, 28 May 2021 08:36:38 +0000 (10:36 +0200)] 
Add "draft/bot" message tag to messages from +B clients.
As mentioned in https://ircv3.net/specs/extensions/bot-mode

3 years agoFix file header
Bram Matthys [Fri, 28 May 2021 08:07:26 +0000 (10:07 +0200)] 
Fix file header
[skip ci]

3 years agoAdd support for +draft/reply and load the module by default.
Bram Matthys [Fri, 28 May 2021 07:14:40 +0000 (09:14 +0200)] 
Add support for +draft/reply and load the module by default.
See https://ircv3.net/specs/client-tags/reply for the draft.

Can be used by clients to indicate to which message they are writing
a reply. This can be especially useful for bots, to indicate that
a response belongs to a user request, eg a !trigger.

3 years agoUpdate release notes
Bram Matthys [Wed, 26 May 2021 09:27:27 +0000 (11:27 +0200)] 
Update release notes
[skip ci]

3 years agoFix help.conf
Bram Matthys [Wed, 26 May 2021 05:51:43 +0000 (07:51 +0200)] 
Fix help.conf

3 years agoAdd the ability to SPAMFILTER message-tags.
Bram Matthys [Tue, 25 May 2021 18:25:31 +0000 (20:25 +0200)] 
Add the ability to SPAMFILTER message-tags.
The new target type is called 'T' and we match against "name=value"
of each message tag (or just "name" if it is without value).

Example: SPAMFILTER ADD -simple T kill 0 this_is_a_test +typing=active
(No this is not a suggestion :D)

This probably won't be used much at all, but it is good to have the
option available in case there is some massive problem,
especially since more message tags may pop up sooner or later.

Caveat: this is actually a bit slow as we may have to check multiple
message tags for a single line.
If there are zero message-tag spamfilters then we will automatically
short-circuit and save all this CPU, which will be the most common case.

3 years agoImplement Sec-WebSocket-Accept from
Bram Matthys [Mon, 24 May 2021 16:33:55 +0000 (18:33 +0200)] 
Implement Sec-WebSocket-Accept from
https://github.com/ircv3/ircv3-specifications/pull/342

3 years agoMove some string helpers to src/misc.c
Bram Matthys [Mon, 24 May 2021 16:32:57 +0000 (18:32 +0200)] 
Move some string helpers to src/misc.c
skip_whitespace() and read_until()

3 years agoAllow setting set::history::channel::playback-on-join::lines to zero
Bram Matthys [Mon, 24 May 2021 07:48:57 +0000 (09:48 +0200)] 
Allow setting set::history::channel::playback-on-join::lines to zero
in case you want to disable this feature.

Note that clients that are using CHATHISTORY will already no longer
receive history-on-join ("push") since they REQ a CAP that will inhibit
this and they will "pull" the history instead when they want/need to.

So... this option is really only there if you want to disable it for
non-CHATHISTORY-clients.

3 years agoWindows: run db tests
Bram Matthys [Mon, 24 May 2021 07:22:17 +0000 (09:22 +0200)] 
Windows: run db tests
[skip ci]

3 years agoFix crashreporter to show big warning if you have 3rd party modules
Bram Matthys [Mon, 24 May 2021 06:38:07 +0000 (08:38 +0200)] 
Fix crashreporter to show big warning if you have 3rd party modules
loaded. The code to raise this warning was already present but it
was not being shown in many cases (when it actually should).

It now looks like this, if you run ./unrealircd start and previously
crashed AND have any 3rd party mods loaded:

The IRCd has been started now (and is running), but it did crash 1 seconds ago.
Crash report generated in: /home/ircd/unrealircd/tmp/crash.report.core.1621838267.txt

** IMPORTANT **
Your UnrealIRCd crashed and you have 3rd party modules loaded (modules created
by someone other than the UnrealIRCd team). If you installed new 3rd party
module(s) in the past few weeks we suggest to unload these modules and see if
the crash issue dissapears. If so, that module is probably to blame.
If you keep crashing without any 3rd party modules loaded then please do report
it to the UnrealIRCd team.
The reason we ask you to do this is because MORE THAN 95% OF ALL CRASH ISSUES
ARE CAUSED BY 3RD PARTY MODULES and not by an UnrealIRCd bug.

Shall I send a crash report to the UnrealIRCd developers?
NOTE: If the crash is caused by a 3rd party module then UnrealIRCd devs can't fix that.

3 years agoPossibly fix small memory leak.
Bram Matthys [Sun, 23 May 2021 11:59:57 +0000 (13:59 +0200)] 
Possibly fix small memory leak.

3 years agoMake history backend non-PERM so it can be upgraded on the fly.
Bram Matthys [Sun, 23 May 2021 11:55:40 +0000 (13:55 +0200)] 
Make history backend non-PERM so it can be upgraded on the fly.
Tested:
* Rehashing and sending messages before after (multiple times)
* Terminating
* Unloading by commenting out

3 years agoAllow lower set::restrict-commands::xyz::connect-delay values.
Bram Matthys [Sun, 23 May 2021 07:46:33 +0000 (09:46 +0200)] 
Allow lower set::restrict-commands::xyz::connect-delay values.
Suggested by Le_Coyote in https://bugs.unrealircd.org/view.php?id=5873

3 years agoUpdate some URLs
Bram Matthys [Sun, 23 May 2021 07:41:57 +0000 (09:41 +0200)] 
Update some URLs
Suggested by westor in https://github.com/unrealircd/unrealircd/pull/136

3 years agoAdjust +H setting if a channel goes -r and had a high setting
Bram Matthys [Sun, 23 May 2021 07:21:17 +0000 (09:21 +0200)] 
Adjust +H setting if a channel goes -r and had a high setting
that was only allowed for registered channels (+r).

3 years agoUpdate release notes
Bram Matthys [Sat, 22 May 2021 17:29:23 +0000 (19:29 +0200)] 
Update release notes
[skip ci]

3 years agoUpdate module coders section in release notes
Bram Matthys [Sat, 22 May 2021 17:06:49 +0000 (19:06 +0200)] 
Update module coders section in release notes
[skip ci]

3 years agoSet new maximums for channel mode +H. If the channel is +r then the maximum
Bram Matthys [Sat, 22 May 2021 15:40:38 +0000 (17:40 +0200)] 
Set new maximums for channel mode +H. If the channel is +r then the maximum
is now 5000 lines / 31 days. For unregistered it is 200 lines / 31 days.
Previous setting was 200 lines / 7 days for both.

Admins can tweak these settings, see:
https://www.unrealircd.org/docs/Set_block#set::history

More code to deal with corner issues will follow later.

UnrealIRCd module coders [!]:
This also changes the channel mode API conv_param. You can use
the UNREAL_VERSION_TIME >= 202120 condition to detect this.
Eg:
 #if UNREAL_VERSION_TIME < 202120
 int my_conv_param(char *para, Client *client);
 #else
 int my_conv_param(char *para, Client *client, Channel *channel);
 #endif

3 years agoAnnounce CHATHISTORY=xx in 005
Bram Matthys [Sat, 22 May 2021 13:32:29 +0000 (15:32 +0200)] 
Announce CHATHISTORY=xx in 005

3 years agoSilence compiler warning by reordering stuff.
Bram Matthys [Sat, 22 May 2021 13:14:29 +0000 (15:14 +0200)] 
Silence compiler warning by reordering stuff.

3 years agoFix read-after-free
Bram Matthys [Sat, 22 May 2021 12:59:54 +0000 (14:59 +0200)] 
Fix read-after-free

3 years agoChange chanmode +H parameter to show hours and days when needed and
Bram Matthys [Sat, 22 May 2021 12:41:57 +0000 (14:41 +0200)] 
Change chanmode +H parameter to show hours and days when needed and
possible if it rounds off nicely, eg +H 100:7d. Note that the
existing syntax is still accepted, eg +H 20:1440 and +H 20:1440m
are both converted to 20:1d.

With potentially higher time values this change makes the mode
parameter a lot more readable.

Support for translating timevalues is already in UnrealIRCd 5.0.2
and higher, so should be fine for nearly everyone.

3 years agoImplement CHATHISTORY TARGETS...
Bram Matthys [Sat, 22 May 2021 11:36:16 +0000 (13:36 +0200)] 
Implement CHATHISTORY TARGETS...
Except that it still needs to order the result by timestamp,
which it does not do at the moment.

3 years agoAdd CAP draft/chathistory and don't send history-on-join if this
Bram Matthys [Sat, 22 May 2021 10:16:52 +0000 (12:16 +0200)] 
Add CAP draft/chathistory and don't send history-on-join if this
CAP is enabled by a client.

3 years agoImplement CHATHISTORY BETWEEN
Bram Matthys [Sat, 22 May 2021 09:43:19 +0000 (11:43 +0200)] 
Implement CHATHISTORY BETWEEN

3 years agoFix crash on remote CHATHISTORY cmd (by servers/services).
Bram Matthys [Fri, 21 May 2021 05:20:26 +0000 (07:20 +0200)] 
Fix crash on remote CHATHISTORY cmd (by servers/services).

3 years agoUpdate list of donators
Bram Matthys [Wed, 19 May 2021 17:24:18 +0000 (19:24 +0200)] 
Update list of donators

3 years agoAdd initial version of CHATHISTORY command
Bram Matthys [Wed, 19 May 2021 12:30:42 +0000 (14:30 +0200)] 
Add initial version of CHATHISTORY command
from https://ircv3.net/specs/extensions/chathistory

Current status of the module in UnrealIRCd:
* A significant part of this is done and working
* Currently in modules.optional.conf to get test exposure,
  not yet loaded by default.
* CHATHISTORY subcommands implemented: BEFORE, AFTER, LATEST, AROUND
* It does not implement the subcommand "BETWEEN" yet
* It does not announce or recognize the (draft) CAP's yet
* It does not announce the ISUPPORT token CHATHISTORY=xx yet
* Testcases need to be written to validate everything
* There will be bugs, now, and also while implementing the rest
  in the days to come.

3 years agoRemove version check for curl and libssl. Nowadays they have ABI
Bram Matthys [Tue, 18 May 2021 18:35:33 +0000 (20:35 +0200)] 
Remove version check for curl and libssl. Nowadays they have ABI
guarantees so it should all be OK. (And nowadays they probably
are true too :D)

3 years agoRemove warning in release notes on file corruption,
Bram Matthys [Mon, 17 May 2021 14:46:31 +0000 (16:46 +0200)] 
Remove warning in release notes on file corruption,
now that things are more tested. [skip ci]

3 years agoUpdate for DB tests, now finished in test framework.
Bram Matthys [Mon, 17 May 2021 14:35:03 +0000 (16:35 +0200)] 
Update for DB tests, now finished in test framework.

3 years agoAllow secret::password-file to only exist on-boot, so after booting
Bram Matthys [Mon, 17 May 2021 13:18:28 +0000 (15:18 +0200)] 
Allow secret::password-file to only exist on-boot, so after booting
the file is allowed to no longer exist. This so you can do things
like only connecting an USB stick during UnrealIRCd boot and then
pull it out once booted.

3 years agoAdd DB writing/reading tests to BuildBot so it is tested on every commit.
Bram Matthys [Mon, 17 May 2021 10:45:35 +0000 (12:45 +0200)] 
Add DB writing/reading tests to BuildBot so it is tested on every commit.

3 years agoMove hash generation outside cfg() and do it early just to be safe.
Bram Matthys [Mon, 17 May 2021 10:38:43 +0000 (12:38 +0200)] 
Move hash generation outside cfg() and do it early just to be safe.

3 years ago* Make channeldb write the db on terminate
Bram Matthys [Mon, 17 May 2021 09:47:28 +0000 (11:47 +0200)] 
* Make channeldb write the db on terminate
* Fix channel history issues with writing on terminate
* Change tkldb and reputation to only write the db
  on terminate and not on every REHASH anymore

..all this thanks to the new loop.ircd_terminating, so modules can
see the difference between regular rehash and terminating.

3 years agoAdd ModuleSetOptions(modinfo->handle, MOD_OPT_UNLOAD_PRIORITY, priority);
Bram Matthys [Mon, 17 May 2021 09:43:46 +0000 (11:43 +0200)] 
Add ModuleSetOptions(modinfo->handle, MOD_OPT_UNLOAD_PRIORITY, priority);
so modules can indicate if they wish to be unloaded before or after others.
This is used by the channel and history modules so they can save their
databases before the chanmodes modules are unloaded.

Also, made ModuleSetOptions() a void function. I don't think anyone
used the returned value and it now no longer is strictly bitmask add/del
so returning an unsigned int would be a tad confusing.

3 years agoIn AddListItemPrio() explicitly set item->priority to prio.
Bram Matthys [Mon, 17 May 2021 09:39:45 +0000 (11:39 +0200)] 
In AddListItemPrio() explicitly set item->priority to prio.

3 years agoon DelListItem set prev/next to NULL on the item itself (not the list)
Bram Matthys [Mon, 17 May 2021 09:31:55 +0000 (11:31 +0200)] 
on DelListItem set prev/next to NULL on the item itself (not the list)

3 years agoSet loop.ircd_terminating when IRCd is terminating (signal 15, /DIE, etc)
Bram Matthys [Mon, 17 May 2021 09:08:54 +0000 (11:08 +0200)] 
Set loop.ircd_terminating when IRCd is terminating (signal 15, /DIE, etc)

3 years agoGive UnrealIRCd 10 seconds to terminate insteads of just 1, now that
Bram Matthys [Mon, 17 May 2021 07:02:04 +0000 (09:02 +0200)] 
Give UnrealIRCd 10 seconds to terminate insteads of just 1, now that
we may have more database writing to do on terminate.

Actually 10 seconds would be really long, but 2-3 seconds may be
quite realistic if you have lots of TKLs, permanent channels,
reputation entries (users), etc.

Oh yeah, and I really hate writing PORTABLE shell code...

3 years agoFlush any dirty history log files to disk on terminate (eg: ./unrealircd stop)
Bram Matthys [Mon, 17 May 2021 06:47:39 +0000 (08:47 +0200)] 
Flush any dirty history log files to disk on terminate (eg: ./unrealircd stop)

3 years agoDon't call hbm_delete_db() if not running in persistent mode.
Bram Matthys [Mon, 17 May 2021 06:10:51 +0000 (08:10 +0200)] 
Don't call hbm_delete_db() if not running in persistent mode.

3 years agoCompile fixes for Windows
Bram Matthys [Sun, 16 May 2021 17:13:03 +0000 (19:13 +0200)] 
Compile fixes for Windows

3 years agoAdd CAP unrealircd.org/history-backend which declares the policy/
Bram Matthys [Sun, 16 May 2021 15:49:39 +0000 (17:49 +0200)] 
Add CAP unrealircd.org/history-backend which declares the policy/
configuration on how history is stored (in memory and/or on disk).
This is similar to other disclosing policies like
unrealircd.org/link-security and unrealircd.org/plaintext-policy.
The reason for this cap (and similarly the other caps) is that
the user can make an informed decision on whether it finds the
policy/safety/privacy of an acceptable level or not.

Fixes for turning persist on/off on the fly (REHASH)

Make release notes a bit more clear.

3 years agoWrite some early release notes.
Bram Matthys [Sun, 16 May 2021 15:26:35 +0000 (17:26 +0200)] 
Write some early release notes.
[skip ci]

3 years agoPersistent channel history: prevent mixing of .db files from elsewhere.
Bram Matthys [Sun, 16 May 2021 15:25:36 +0000 (17:25 +0200)] 
Persistent channel history: prevent mixing of .db files from elsewhere.

3 years agoDelete persitent history immediately when channel goes -P.
Bram Matthys [Sun, 16 May 2021 15:18:52 +0000 (17:18 +0200)] 
Delete persitent history immediately when channel goes -P.
And also handle -P+P.

3 years agoGet rid of various warnings/errors due to recent work.
Bram Matthys [Sun, 16 May 2021 14:57:01 +0000 (16:57 +0200)] 
Get rid of various warnings/errors due to recent work.

3 years agoUnrealDB history: Use SHA256 with pre- and post- hashsecret
Bram Matthys [Sat, 15 May 2021 18:53:12 +0000 (20:53 +0200)] 
UnrealDB history: Use SHA256 with pre- and post- hashsecret
for the file names, instead of MD5.

3 years agoAdd sha256hash() function for convenience.
Bram Matthys [Sat, 15 May 2021 18:48:04 +0000 (20:48 +0200)] 
Add sha256hash() function for convenience.

3 years agoAdd support for secret::password-prompt (entering on console)
Bram Matthys [Sat, 15 May 2021 16:52:01 +0000 (18:52 +0200)] 
Add support for secret::password-prompt (entering on console)
This is one of the 3 currently supported methods.
Documentation will follow later.

3 years agoMove running_interactively() from crashreport.c to misc.c
Bram Matthys [Sat, 15 May 2021 16:28:21 +0000 (18:28 +0200)] 
Move running_interactively() from crashreport.c to misc.c

3 years agoBail out sooner, otherwise confusing.
Bram Matthys [Sat, 15 May 2021 16:28:03 +0000 (18:28 +0200)] 
Bail out sooner, otherwise confusing.

3 years agoAdd support for persistent channel history, if the channel is +P and +H.
Bram Matthys [Sat, 15 May 2021 13:43:07 +0000 (15:43 +0200)] 
Add support for persistent channel history, if the channel is +P and +H.
This is not enabled by default and requires additional configuration,
documentation will follow later.

3 years agoInclude dirent.h by default.
Bram Matthys [Sat, 15 May 2021 13:42:34 +0000 (15:42 +0200)] 
Include dirent.h by default.

3 years agoMod API: Add CONFIG_SET_HISTORY_CHANNEL so chanmodes/history
Bram Matthys [Sat, 15 May 2021 13:39:58 +0000 (15:39 +0200)] 
Mod API: Add CONFIG_SET_HISTORY_CHANNEL so chanmodes/history
can delegate configuration to history_backend_mem.

3 years agoMove strtolower_safe() from antirandom to support.c
Bram Matthys [Sat, 15 May 2021 13:38:57 +0000 (15:38 +0200)] 
Move strtolower_safe() from antirandom to support.c

3 years agoUnrealDB: Oops, previous commit broke unrealdb_write_str() w/NULL strings.
Bram Matthys [Wed, 5 May 2021 17:20:33 +0000 (19:20 +0200)] 
UnrealDB: Oops, previous commit broke unrealdb_write_str() w/NULL strings.

3 years agoMake UnrealDB big-endian-proof. Rather rare, but you never know
Bram Matthys [Wed, 5 May 2021 16:59:09 +0000 (18:59 +0200)] 
Make UnrealDB big-endian-proof. Rather rare, but you never know
on what hardware people end up running UnrealIRCd.

Also (unrelated) add a check for >64kb strings in unrealdb_write_str()
and return an API error. That too is unlikely to ever happen, but..
better be correct.

3 years agoWindows: Ignore compiler warning C6029 in unrealdb.c as it is a false positive.
Bram Matthys [Wed, 5 May 2021 11:44:33 +0000 (13:44 +0200)] 
Windows: Ignore compiler warning C6029 in unrealdb.c as it is a false positive.

src/unrealdb.c(462): error C2220: warning treated as error - no 'object' file generated
src\unrealdb.c(379) : warning C6029: Possible buffer overrun in call to 'fread':  use of unchecked value 'c'.

[..fread of c->config->saltlen..]
if (c->config->saltlen > 1024)
{
        unrealdb_set_error(c, UNREALDB_ERROR_HEADER, "Header is corrupt (saltlen=%d)", (int)c->config->saltlen);
        goto unrealdb_open_fail; /* Something must be wrong, this makes no sense. */
}
c->config->salt = safe_alloc(c->config->saltlen);
if (fread(c->config->salt, 1, c->config->saltlen, c->fd) != c->config->saltlen)

VS2019 doesn't understand that this is safe.

3 years agoFix Windows BuildBot
Bram Matthys [Wed, 5 May 2021 09:23:42 +0000 (11:23 +0200)] 
Fix Windows BuildBot
[skip ci]

3 years agoWindows compile fixes for unrealdb and libsodium.
Bram Matthys [Wed, 5 May 2021 08:49:15 +0000 (10:49 +0200)] 
Windows compile fixes for unrealdb and libsodium.

3 years agoAdd libsodium to Windows build
Bram Matthys [Wed, 5 May 2021 07:48:17 +0000 (09:48 +0200)] 
Add libsodium to Windows build
[skip ci]

3 years agoDocument UnrealDB API and get rid of unrealdb_write_data/unrealdb_read_data.
Bram Matthys [Tue, 4 May 2021 08:47:03 +0000 (10:47 +0200)] 
Document UnrealDB API and get rid of unrealdb_write_data/unrealdb_read_data.
API users must use specific size/type functions instead, otherwise it is
simply too dangerous / too easy to overlook issues.

3 years agoUnrealDB: check for write errors in all conditions (not just some)
Bram Matthys [Tue, 4 May 2021 07:07:37 +0000 (09:07 +0200)] 
UnrealDB: check for write errors in all conditions (not just some)
And set the error message/code properly. Didn't set it before because of
'c' being freed, but we have unrealdb_get_error_code() and
unrealdb_get_error_string() now that can (and should) still be used
in such cases.

3 years agoUnrealDB: Fix for short read / final end of file (for unencrypted files)
Bram Matthys [Tue, 4 May 2021 07:01:04 +0000 (09:01 +0200)] 
UnrealDB: Fix for short read / final end of file (for unencrypted files)

3 years agoUnrealDB: Fix reading final end of file (crypto-side)
Bram Matthys [Tue, 4 May 2021 06:55:08 +0000 (08:55 +0200)] 
UnrealDB: Fix reading final end of file (crypto-side)

3 years agoVarious small UnrealDB fixes
Bram Matthys [Tue, 4 May 2021 06:36:45 +0000 (08:36 +0200)] 
Various small UnrealDB fixes

3 years agoFix bug with unrealdb caching
Bram Matthys [Mon, 3 May 2021 16:25:59 +0000 (18:25 +0200)] 
Fix bug with unrealdb caching

3 years agoUpdate tkldb to use UnrealDB functions
Bram Matthys [Mon, 3 May 2021 16:06:05 +0000 (18:06 +0200)] 
Update tkldb to use UnrealDB functions

3 years agoFix unrealdb reading due to last-minute change earlier today
Bram Matthys [Mon, 3 May 2021 16:04:56 +0000 (18:04 +0200)] 
Fix unrealdb reading due to last-minute change earlier today

3 years agoAdd unrealdb_write_char() / unrealdb_read_char()
Bram Matthys [Mon, 3 May 2021 15:48:23 +0000 (17:48 +0200)] 
Add unrealdb_write_char() / unrealdb_read_char()

3 years agoMake the "UnrealIRCd 4 is no longer supported" section a bit shorter
Bram Matthys [Mon, 3 May 2021 13:33:41 +0000 (15:33 +0200)] 
Make the "UnrealIRCd 4 is no longer supported" section a bit shorter
in the release notes.
[skip ci]

3 years agoSet version to 5.0.10-git with disclaimer not to use it yet.
Bram Matthys [Mon, 3 May 2021 13:25:30 +0000 (15:25 +0200)] 
Set version to 5.0.10-git with disclaimer not to use it yet.

3 years agoUse UnrealDB functions in channeldb.
Bram Matthys [Mon, 3 May 2021 13:15:25 +0000 (15:15 +0200)] 
Use UnrealDB functions in channeldb.

3 years agoAdd UnrealDB reading capability to reputation module.
Bram Matthys [Mon, 3 May 2021 13:14:56 +0000 (15:14 +0200)] 
Add UnrealDB reading capability to reputation module.
We still write the old format, unless encryption is enabled.

3 years agoAdd unrealdb and secrets API. Documentation and more information will
Bram Matthys [Mon, 3 May 2021 13:07:10 +0000 (15:07 +0200)] 
Add unrealdb and secrets API. Documentation and more information will
follow in later commits.

3 years agoFix extended server ban ~a:accname not working for shun and also
Bram Matthys [Sat, 17 Apr 2021 12:37:44 +0000 (14:37 +0200)] 
Fix extended server ban ~a:accname not working for shun and also
not always kicking in on *line either.
We now check for shuns/*lines in user_account_login(), so upon
SASL or NS IDENTIFY etc. This also means that the client could
now be killed in that function, so callers should take extra
care and take that into account. We check for IsDead() in our
calls now (if it's our client anyway).

Hopefully this doesn't break anything.........

3 years agoModule coders: Update HOOKTYPE_LOCAL_NICKCHANGE and HOOKTYPE_REMOTE_NICKCHANGE.
Bram Matthys [Sat, 17 Apr 2021 08:34:33 +0000 (10:34 +0200)] 
Module coders: Update HOOKTYPE_LOCAL_NICKCHANGE and HOOKTYPE_REMOTE_NICKCHANGE.
I forgot to include message tags earlier, so this is a breaking change:
-int hooktype_local_nickchange(Client *client, char *newnick);
-int hooktype_remote_nickchange(Client *client, char *newnick);
+int hooktype_local_nickchange(Client *client, MessageTag *mtags, char *newnick);
+int hooktype_remote_nickchange(Client *client, MessageTag *mtags, char *newnick);

Be sure to update your hooks!
You can use something like: #if UNREAL_VERSION_TIME>=202115

3 years agoOptimize libsodium for current CPU (just like libargon2 does)
Bram Matthys [Sat, 10 Apr 2021 10:38:20 +0000 (12:38 +0200)] 
Optimize libsodium for current CPU (just like libargon2 does)
Is about 5x speed improvement in practice.

3 years agoAdd c-ares and libsodium version output to boot screen and /VERSION.
Bram Matthys [Fri, 9 Apr 2021 17:30:53 +0000 (19:30 +0200)] 
Add c-ares and libsodium version output to boot screen and /VERSION.
OpenSSL, PCRE2 and cURL were already there.