1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-12 17:14:46 +02:00

Add +b/+e/+I ~inherit:#channel to inherit channel bans from another channel

Several notes:
* This only checks on-JOIN (not on nick change, message, etc)
  for performance reasons
* If the #channel in ~inherit:#channel also contains ~inherit
  entries then those are not processed (no recursion and no looping)
* Only a limited number of ~inherit entries is permitted.
  This will be moved to set:: items in a future commit so you
  can set different amounts for +b/+e/+I ~inherit.
* This is work in progress, UnrealIRCd or the entire world could explode
* Documentation will follow later

Developers:
* Sadly, clean_ban_mask() needed to be changed to have two more
  parameters, 'ban_type' and 'channel' were added at different positions.
  This because the module needs the ban type (EXBTYPE_BAN, EXBTYPE_EXCEPT,
  EXBTYPE_INVEX) and channel because it rejects based on number of
  existing ~inherit entries in the channel... and while is_ok() is called
  for local clients and has all this information, for services clients
  is_ok() is not called so the only way to reject the +beI is through
  xxx_conv_param() which comes from clean_ban_mask().
This commit is contained in:
Bram Matthys
2024-09-07 20:52:01 +02:00
parent e17e11dd73
commit ee1d6818b4
12 changed files with 263 additions and 17 deletions
+6 -2
View File
@@ -268,9 +268,10 @@ DLL_FILES=\
src/modules/extbans/asn.dll \
src/modules/extbans/certfp.dll \
src/modules/extbans/country.dll \
src/modules/extbans/inchannel.dll \
src/modules/extbans/join.dll \
src/modules/extbans/flood.dll \
src/modules/extbans/inchannel.dll \
src/modules/extbans/inherit.dll \
src/modules/extbans/join.dll \
src/modules/extbans/msgbypass.dll \
src/modules/extbans/nickchange.dll \
src/modules/extbans/operclass.dll \
@@ -915,6 +916,9 @@ src/modules/extbans/country.dll: src/modules/extbans/country.c $(INCLUDES)
src/modules/extbans/inchannel.dll: src/modules/extbans/inchannel.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/extbans/inchannel.c /Fesrc/modules/extbans/ /Fosrc/modules/extbans/ /Fdsrc/modules/extbans/inchannel.pdb $(MODLFLAGS)
src/modules/extbans/inherit.dll: src/modules/extbans/inherit.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/extbans/inherit.c /Fesrc/modules/extbans/ /Fosrc/modules/extbans/ /Fdsrc/modules/extbans/inherit.pdb $(MODLFLAGS)
src/modules/extbans/join.dll: src/modules/extbans/join.c $(INCLUDES)
$(CC) $(MODCFLAGS) src/modules/extbans/join.c /Fesrc/modules/extbans/ /Fosrc/modules/extbans/ /Fdsrc/modules/extbans/join.pdb $(MODLFLAGS)