diff --git a/docs/conf/codepages/iso-8859-1.example.conf b/docs/conf/codepages/iso-8859-1.example.conf index a9943878b..4dfd05821 100644 --- a/docs/conf/codepages/iso-8859-1.example.conf +++ b/docs/conf/codepages/iso-8859-1.example.conf @@ -39,4 +39,4 @@ # þ => Þ # Include the ASCII rules to avoid duplication. - + diff --git a/docs/conf/codepages/iso-8859-2.example.conf b/docs/conf/codepages/iso-8859-2.example.conf index 9b5457456..49b77cd5b 100644 --- a/docs/conf/codepages/iso-8859-2.example.conf +++ b/docs/conf/codepages/iso-8859-2.example.conf @@ -57,4 +57,4 @@ # ţ => Ţ # Include the ASCII rules to avoid duplication. - + diff --git a/docs/conf/inspircd.example.conf b/docs/conf/inspircd.example.conf index 5a35931d7..432b2dbfc 100644 --- a/docs/conf/inspircd.example.conf +++ b/docs/conf/inspircd.example.conf @@ -228,7 +228,7 @@ # can be done by using # # To enable IRCCloud on your network uncomment this: -# +# # A connect class with set denies connections from the specified host/IP range. +# #-#-#-#-#-#-#-#-#-#- MISCELLANEOUS CONFIGURATION -#-#-#-#-#-#-#-#-#-# # # @@ -503,7 +503,7 @@ # # motd - displayed on connect and when a user executes /MOTD # Modules can also define their own files - + # Example of an executable file include. Note this will be read on rehash, # not when the command is run. @@ -1050,7 +1050,7 @@ # provide almost all the features of InspIRCd. :) # # # # The default does nothing -- we include it for simplicity for you. # -# +# #-#-#-#-#-#-#-#-#-#-#-# SERVICES CONFIGURATION #-#-#-#-#-#-#-#-#-#-#-# # # @@ -1059,13 +1059,13 @@ # exemptions for services pseudoclients: # # # Anope users should uncomment this: -# +# # # Atheme users should uncomment this: -# +# # # Users of other services should uncomment this: -# +# ######################################################################### # # diff --git a/docs/conf/modules.example.conf b/docs/conf/modules.example.conf index abc4ba7db..88dfc4a51 100644 --- a/docs/conf/modules.example.conf +++ b/docs/conf/modules.example.conf @@ -653,11 +653,11 @@ # # # You should include one of the following files to set your codepage: -# -# -# -# -# +# +# +# +# +# # # You can also define a custom codepage. For details on how to do this # please refer to the docs site: @@ -939,13 +939,13 @@ # more of the following example configs for popular DNSBLs: # # # # DroneBL (https://dronebl.org) # -# +# # # # EFnet RBL (https://rbl.efnetrbl.org) # -# +# # # # dan.me.uk Tor exit node DNSBL (https://www.dan.me.uk/dnsbl) # -# +# #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Exempt channel operators module: Provides support for allowing # @@ -1000,7 +1000,7 @@ # specify below the path to the filter.conf file, or define some # # tags. # # # -# +# #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Gateway module: Enables forwarding the real IP address of a user from @@ -1138,7 +1138,7 @@ # If you specify to use the help module, then specify below the path # # to the help.conf file. # # # -# +# #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Help mode module: Provides oper-only user mode `h` (helpop) which @@ -2432,7 +2432,7 @@ # # This file has all the information about server links and services servers. # You *MUST* edit it if you intend to link servers. -# +# #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # SQL authentication module: Allows IRCd connections to be tied into diff --git a/docs/conf/opers.example.conf b/docs/conf/opers.example.conf index b848a4cd6..b184dd9ff 100644 --- a/docs/conf/opers.example.conf +++ b/docs/conf/opers.example.conf @@ -92,7 +92,7 @@ # operator type. This can be viewed with /OPERMOTD or automatically # on login if automotd (see below) is enabled. # Requires the opermotd module to be loaded. - motd="examples/opermotd.example.txt" + motd="&dir.example;/opermotd.example.txt" # automotd: Whether to send the server operator MOTD (see above) # to operators of this type when they log in. diff --git a/docs/conf/services/anope.example.conf b/docs/conf/services/anope.example.conf index e4f003466..630340c67 100644 --- a/docs/conf/services/anope.example.conf +++ b/docs/conf/services/anope.example.conf @@ -2,4 +2,4 @@ # by Anope. See https://www.anope.org for more information on Anope. # This file inherits from the generic config to avoid repetition. - + diff --git a/docs/conf/services/atheme.example.conf b/docs/conf/services/atheme.example.conf index 35ac7b0a3..507ec7c8b 100644 --- a/docs/conf/services/atheme.example.conf +++ b/docs/conf/services/atheme.example.conf @@ -3,7 +3,7 @@ # information on Atheme. # This file inherits from the generic config to avoid repetition. - + # Long hand aliases for services pseudoclients. diff --git a/make/template/config.h b/make/template/config.h index d8ef32f55..3340e2332 100644 --- a/make/template/config.h +++ b/make/template/config.h @@ -34,6 +34,9 @@ /** The default location that config files are stored in. */ #define INSPIRCD_CONFIG_PATH "@CONFIG_DIR@" +/** The default location that example config files are stored in. */ +#define INSPIRCD_EXAMPLE_PATH "@EXAMPLE_DIR@" + /** The default location that data files are stored in. */ #define INSPIRCD_DATA_PATH "@DATA_DIR@" diff --git a/src/configparser.cpp b/src/configparser.cpp index 40ce80f2c..8cdd1f7f5 100644 --- a/src/configparser.cpp +++ b/src/configparser.cpp @@ -492,6 +492,7 @@ ParseStack::ParseStack(ServerConfig* conf) // Directories that were set at build time. { "dir.config", INSPIRCD_CONFIG_PATH }, + { "dir.example", INSPIRCD_EXAMPLE_PATH }, { "dir.data", INSPIRCD_DATA_PATH }, { "dir.log", INSPIRCD_LOG_PATH }, { "dir.module", INSPIRCD_MODULE_PATH },