Bram Matthys
1498f1e716
Rename directories from 'win32' to 'windows'
2019-08-11 17:40:08 +02:00
Bram Matthys
25687c2bed
New efuncs: tkl_ip_hash() and tkl_ip_hash_type(), for the rmtkl module.
2019-08-11 14:48:07 +02:00
Bram Matthys
c50f65c5bf
Update two small FIXME's (nothing worth mentioning)
2019-08-10 14:09:00 +02:00
i
8c11ebd0e7
Make allow {} block always continue when there were no password or wrong password was specified.
2019-07-18 18:47:05 +03:00
i
d22a2a20f0
Make usermode +T block channel CTCP's as well.
2019-07-14 19:01:31 +03:00
Bram Matthys
806256e9c2
Move generate_batch_id() to core. Use chathistory BATCH type, if supported.
2019-07-13 15:25:56 +02:00
Bram Matthys
0cda60301d
Add set::broadcast-channel-messages [auto|always|never]:
...
This determines when UnrealIRCd will use broadcast instead of multicast
for delivering channel messages to servers.
The default is 'auto' which uses multicast but switches to broadcast
when channel mode +H is set. This is what people should normally use.
If you set it to 'never' then +H will not work properly if there are
servers with 0 users on them.
2019-07-13 07:59:12 +02:00
i
ca094f0a75
New set::ping-warning option (how fast the server should reply to PING before sending a warning to opers).
2019-07-11 16:47:02 +03:00
i
60ebc1375e
Support channel status prefixes for SAJOIN.
2019-07-10 17:42:46 +03:00
Bram Matthys
d09b9d53a4
Make SSL/TLS mandatory for UnrealIRCd to run. Previously you could get
...
around this by simply having no certs etc. I doubt anyone used it and
that was not a recommended configuration.
(More to come)
2019-07-09 20:06:11 +02:00
Bram Matthys
79bd78c0f3
Make it so UnrealIRCd has full control over the SSL/TLS versions in use
...
and not just the operating system.
This makes us use SSL_CTX_set_min_proto_version(), which unfortunately is
a less fine-grained control for disabling specific SSL/TLS versions.
However, after that we use SSL_CTX_set_options with SSL_OP_NO_xxx.
The latter is deprecated though. Will revisit this change before U5 release..
2019-07-07 10:22:29 +02:00
Bram Matthys
3b3f63b990
Add HAVE_EXPLICIT_BZERO. Fix compile problems on Debian and other older
...
systems without explicit_bzero. Current usage is only in the PRNG which
is not very important anyway. We can re-visit later by attempting to
provide a fallback portable version, but from what I've seen this is
pretty ugly.
2019-07-07 09:18:34 +02:00
Bram Matthys
b605b7fd86
Use delayed module unloading not only for modules with moddata but also
...
for modules which have extended channelmodes with parameters,
since they have the same problem.
2019-06-29 09:10:18 +02:00
Bram Matthys
fbf4946777
Update tkldb to use new LoadPersistentInt/SavePersistentInt functions.
...
And before that, I fixed these functions so they actually work :D
2019-06-29 08:44:12 +02:00
Bram Matthys
5182c664d1
Easier API for just-commited persistent variables. Example:
...
LoadPersistentPointer(modinfo, removefld_list, floodprot_free_removefld_list);
SavePersistentPointer(modinfo, removefld_list);
The above example was for a pointer, there are also functions for int and long,
which are even more simple:
LoadPersistentInt(modinfo, somevar)
SavePersistentInt(modinfo, somevar)
and
LoadPersistentLong(modinfo, somevar)
SavePersistentLong(modinfo, somevar)
both are untested, but will be tested soon...
2019-06-28 22:08:45 +02:00
Bram Matthys
0920967cc4
New module_load_variable / module_save_variable functions
...
and made floodprot to use these functions.
TODO: 1) Different functions for pointer/int/long, 2) macro?
2019-06-28 21:02:29 +02:00
Bram Matthys
2a7fc8042d
Add new moddata types: MODDATA_LOCALVAR and MODDATA_GLOBALVAR. Untested.
...
Code using it will soon follow (and then it will be tested :D)
2019-06-28 18:35:37 +02:00
Bram Matthys
38e9c100d4
Get rid of include/threads.h (unused)
2019-06-26 17:27:45 +02:00
Bram Matthys
a2510a5dca
Delete sock.h, isn't even used anymore.
...
[skip ci]
2019-06-26 17:25:34 +02:00
Bram Matthys
70cca778cd
Test compile w/o sock.h
2019-06-26 17:19:10 +02:00
Bram Matthys
c673e5bbc6
Get rid of now meaningless include/hash.h
2019-06-26 17:17:20 +02:00
Bram Matthys
8e44d4d5ab
Get rid of weird NullChn, which is now just NULL :D
2019-06-26 17:13:45 +02:00
Bram Matthys
ded4a65a60
u_int16_t -> uint16_t and u_int32_t -> uint32_t, remove typedefs for
...
these types and others, that should no longer be needed thanks to
stdint.h.
2019-06-26 17:06:46 +02:00
Bram Matthys
709c84fff9
Remove stupid hash table layer for channels that only eats 256k+ extra
...
memory and causes unnecessary slowdown. Stupid ->hits and ->links.
And get rid of "return (xyz)", must be "return xyz" :D
2019-06-26 16:56:17 +02:00
Bram Matthys
f1b0b6b76e
Make throttling code (connect-flood) use SipHash and increase the
...
hash table size from 1019 to 8192 to have fewer collisions.
2019-06-26 16:46:28 +02:00
Bram Matthys
d5395848b7
Double the size of hash tables to reduce collisions.
2019-06-26 16:16:56 +02:00
Bram Matthys
f6eac29592
hash_nick_name -> hash_client_name, hash_find_nickserver -> hash_find_nickatserver
...
Both were confusing :)
2019-06-26 13:45:55 +02:00
Bram Matthys
d5b643ceee
Rewrite hash table code to use SipHash (more to follow)
2019-06-26 13:24:02 +02:00
Bram Matthys
c507db9005
Get rid of Windows compile warning regarding abort().
2019-06-23 08:57:39 +02:00
Bram Matthys
7875fc9d7d
Compile fixes for Windows due to cleanup from yesterday.
2019-06-23 08:03:33 +02:00
Bram Matthys
7161f33311
Code cleanup: make src/*.c use the generic #include "unrealircd.h" file
...
(with only a few exceptions)
Now, we'll find out later if Windows still compiles, I guess ;)
2019-06-22 21:18:08 +02:00
Bram Matthys
e8ff5d77c7
Remove weird option set::snomask-on-connect. Doubt anyone uses it.
2019-06-22 19:36:54 +02:00
Bram Matthys
f9b589d0c6
Remove almost 1000 lines, all functions that are (now) unused.
...
Also, drop support for snomasks to non-ircops (TODO: more)
2019-06-22 19:32:11 +02:00
Bram Matthys
e03c8135a9
CHFL_CHANPROT -> CHFL_CHANADMIN, is_chanprot -> is_chanadmin
...
These are just remnants of the past, when +a was called channel protection.
It is called channel admin since as long as I can remember, and in 90%
of the code and documentation it is called that way.
2019-06-22 17:32:57 +02:00
Bram Matthys
cf29aa8feb
Replace various 90% identical functions with some macro's instead.
2019-06-22 17:29:03 +02:00
Bram Matthys
05202dd2a4
Move can_send() function from core to m_message.
2019-06-22 16:03:06 +02:00
Bram Matthys
bf4d96e991
can_send() now returns 0 (false) or 1 (true), rather than magic values.
...
Also, the HOOKTYPE_CAN_SEND prototype changed so you can communicate
the error message in a flexible way, similar to what I just did
with extbans.
2019-06-22 15:57:32 +02:00
Bram Matthys
be49ef0bb8
More extban API changes... fun...
2019-06-22 15:11:16 +02:00
Bram Matthys
086d370704
Change extban API: pass 'msg' in BANCHK_MSG and (new) BANCHK_LEAVE_MSG.
2019-06-17 20:19:34 +02:00
Bram Matthys
1cfebcf05e
Add new set::part_instead_of_quit_on_comment_change to convert QUIT to PART
...
in case of a change in the quit comment, such as color stripping / blocking.
The default is 'no', but some users may like this to be 'yes' so things like
+S only affect the channel and not the quit for all channels.
This hereby also lays the groundwork for some next commits of 'i' :)
The configuration item name may still change if I think of a better one....
2019-06-17 08:20:42 +02:00
Bram Matthys
7b42c252ea
Some documentation updates, nothing important
...
[skip ci]
2019-06-16 10:08:50 +02:00
Bram Matthys
bd785a9309
Some initial work for the upcoming TKL 'e'/'E'/TKL_EXCEPT type.
2019-06-16 08:42:41 +02:00
Bram Matthys
18ae7b8925
Document *ALL* functions in m_tkl and remove efuncs that are no longer
...
needed: tkl_expire and tkl_check_expire, which are now self-contained
in the m_tkl module.
2019-06-16 08:35:56 +02:00
Bram Matthys
b102e79f8e
Use check_banned() from s_bsd too, less duplicate code.
2019-06-15 18:44:33 +02:00
Bram Matthys
24726d533d
Make the require authentication { } block use the TKL layer.
...
Remove CONF_BAN_UNAUTHENTICATED.
2019-06-15 18:31:06 +02:00
Bram Matthys
8e6302d003
Rip out CONF_BAN_NICK, CONF_BAN_IP, CONF_BAN_USER, now that they are moved
...
to the TKL layer.
2019-06-15 18:18:19 +02:00
Bram Matthys
97fc19591c
Add support for tkline->flag TKL_FLAG_CONFIG: item from configuration
...
file that cannot be deleted via commands such as /KLINE -...
And transform some ban XX entries to use the TKL system
TODO: test & rip out the old stuff
2019-06-15 18:08:43 +02:00
Bram Matthys
a40cd9fae4
Rename dospamfilter() to run_spamfilter(), which is more meaningful.
2019-06-15 17:43:34 +02:00
Bram Matthys
876fda63ec
Export tkl_type_string via efuncs (actually, the name may change...)
2019-06-15 17:06:41 +02:00
Bram Matthys
7542cdeaca
Cleanup of m_tkl part 1. New tkl_chartotype (the reverse of tkl_typetochar).
...
Move stripcrlf() to core instead of at 3 places, rename calls of iCstrip()
to that. Hopefully I didn't break anything.. :D
2019-06-15 16:56:34 +02:00