Skip to content

Commit

Permalink
modules: Rename mod_handlers and split up mod_events.
Browse files Browse the repository at this point in the history
* Rename mod_handlers to mod_menu_handlers, to be more descriptive.
* Split up mod_events into mod_node_callbacks and mod_ip_blocker.
  Previously all the event-based callbacks were in a single module
  (mod_events), but over time, unrelated logic was added in.
  This will allow users to not load mod_ip_blocker if they don't want
  it, without affecting mod_node_callbacks, which is actually somewhat
  essential to normal node operation.
  As part of this, mod_events.conf is renamed to mod_ip_blocker.conf.

These changes are not backwards-compatible, and users may need to:
* Rename mod_events.conf to mod_ip_blocker.conf
* Explicitly load mod_node_callbacks, mod_ip_blocker, and
  mod_menu_handlers if autoload=no in modules.conf.
  • Loading branch information
InterLinked1 committed Nov 3, 2024
1 parent 56007db commit b8534de
Show file tree
Hide file tree
Showing 8 changed files with 444 additions and 304 deletions.
4 changes: 2 additions & 2 deletions configs/mod_events.conf → configs/mod_ip_blocker.conf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
; mod_events.conf - BBS event handlers
; mod_ip_blocker.conf - BBS event handlers

[whitelist]
; List of IP addresses or CIDR ranges to whitelist from autoblocking.
; These IP addresses will not be automatically blocked
; by mod_events if the abuse threshold is reached.
; by mod_ip_blocker if the abuse threshold is reached.
; Key contains the IP/CIDR, the value does not matter and is ignored.
;
; You should add any trusted IP addresses here (e.g. sysop network):
Expand Down
111 changes: 100 additions & 11 deletions configs/modules.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,110 @@ autoload=yes ; By default, all modules are loaded automatically on startup.
; You can explicitly load only the modules you want by using autoload=no.

[modules]
; You can specify modules to preload, for module dependencies that must be met
; before dependent modules load.
; For all operations here, the order of preload, load, and noload does not matter
; (and should not be relied upon).
; You can specify modules to preload, for module dependencies that must be met before dependent modules load.
; For all operations here, the order of preload, load, and noload does not matter (and should not be relied upon).
; require is equivalent to load, but will abort startup if the module fails to load.
; To preload and require a module, specify both directives.
preload = mod_mysql.so ; mod_auth_mysql.so and mod_chanserv.so depend on this module
preload = net_irc.so ; mod_discord.so, mod_chanserv.so, and mod_irc_relay.so depend on this module
preload = mod_irc_client.so ; mod_irc_relay.so depends on this module
; You can specify modules to load or not load here.

; You can specify modules to automatically load or not load at startup here.
; You MUST specify the .so extension in modules.conf (but optional in sysop console)
; Modules can always be explicitly loaded from the sysop console
; using /load <modname>, even if they were not autoloaded.

; Library modules
preload = io_compress.so
preload = io_tls.so
preload = mod_lmdb.so
preload = mod_mysql.so ; mod_auth_mysql.so and mod_chanserv.so depend on this module

; Basic doors
load = door_usermgmt.so
load = door_tutorial.so
load = door_stats.so

; Authentication modules (only load one)
load = mod_auth_mysql.so
noload = mod_auth_static.so ; Development module that should not be used for production systems. Conflicts with mod_auth_mysql.so.
require = mod_sysop.so ; You probably don't want to forget this one if autoload=no. require will force the module to load or abort startup on failure.
load = net_ssh.so ; Always load SSH server

; Modules required for basic node operation
load = mod_menu_handlers.so
load = mod_node_callbacks.so

; Management and utility modules
load = mod_sysop.so ; You probably don't want to forget this one if autoload=no. require will force the module to load or abort startup on failure.
load = mod_version.so
load = mod_ip_blocker.so

; Email and messaging doors
load = door_chat.so
load = door_evergreen.so
load = door_irc.so
load = door_msg.so

; Misc doors
load = door_utilities.so
load = door_ibbs.so

; IRC modules
preload = net_irc.so ; mod_discord.so, mod_chanserv.so, and mod_irc_relay.so depend on this module
load = mod_irc_client.so ; mod_irc_relay.so depends on this module
load = mod_irc_relay.so
load = mod_chanserv.so
load = mod_discord.so
load = mod_slack.so

; Email modules
preload = mod_mail.so
preload = mod_mimeparse.so
load = mod_mail_trash.so
load = mod_mail_events.so
load = mod_mailscript.so
load = mod_oauth.so
load = mod_sendmail.so
load = mod_sieve.so
load = mod_smtp_client.so
load = mod_smtp_delivery_external.so
load = mod_smtp_delivery_local.so
load = mod_smtp_fetchmail.so
load = mod_smtp_filter.so
load = mod_smtp_filter_arc.so
load = mod_smtp_filter_dkim.so
load = mod_smtp_filter_dmarc.so
load = mod_smtp_mailing_lists.so
load = mod_spamassassin.so
load = mod_webmail.so
load = net_imap.so
load = net_nntp.so
load = net_pop3.so
load = net_sieve.so
load = net_smtp.so

; Web server
preload = mod_http.so
load = mod_http_proxy.so
load = net_http.so
load = net_ws.so

; Terminal protocols
load = net_rlogin.so
load = net_ssh.so
load = net_telnet.so
load = net_unix.so

; Misc. network protocols
noload = net_finger.so ; This module exposes user information, so don't load by default.
;noload = net_rlogin.so ; Don't load RLogin server
load = net_ftp.so
load = net_gopher.so
load = net_msp.so

; Asterisk modules
preload = mod_ncurses.so
preload = mod_asterisk_ami.so
load = mod_asterisk_queues.so
load = mod_operator.so

; Test modules
noload = mod_tests.so
noload = mod_test_config.so
noload = mod_test_http.so
noload = mod_test_range.so
4 changes: 2 additions & 2 deletions include/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
*/

#define BBS_MAJOR_VERSION 0
#define BBS_MINOR_VERSION 6
#define BBS_PATCH_VERSION 2
#define BBS_MINOR_VERSION 7
#define BBS_PATCH_VERSION 0
Loading

0 comments on commit b8534de

Please sign in to comment.