summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/conf/censor.conf.example2
-rw-r--r--docs/conf/filter.conf.example6
-rw-r--r--docs/conf/helpop-full.conf.example12
-rw-r--r--docs/conf/helpop.conf.example2
-rw-r--r--docs/conf/inspircd.conf.example29
-rw-r--r--docs/conf/links.conf.example6
-rw-r--r--docs/conf/modules.conf.example506
-rw-r--r--docs/conf/modules/charybdis.conf.example144
-rw-r--r--docs/conf/modules/unrealircd.conf.example234
-rw-r--r--docs/conf/opers.conf.example19
-rw-r--r--include/channels.h6
-rw-r--r--include/inspircd.h5
-rw-r--r--include/inspsocket.h119
-rw-r--r--include/iohook.h3
-rw-r--r--include/modules.h7
-rw-r--r--include/modules/ldap.h47
-rw-r--r--include/modules/ssl.h25
-rwxr-xr-xmake/calcdep.pl2
-rw-r--r--make/template/inspircd6
-rwxr-xr-xmake/unit-cc.pl6
-rw-r--r--src/channels.cpp73
-rw-r--r--src/configreader.cpp1
-rw-r--r--src/coremods/core_channel/cmd_names.cpp69
-rw-r--r--src/coremods/core_channel/cmd_topic.cpp9
-rw-r--r--src/coremods/core_channel/core_channel.cpp19
-rw-r--r--src/coremods/core_channel/core_channel.h14
-rw-r--r--src/coremods/core_oper/cmd_die.cpp30
-rw-r--r--src/coremods/core_oper/cmd_restart.cpp2
-rw-r--r--src/coremods/core_oper/core_oper.h5
-rw-r--r--src/coremods/core_stats.cpp5
-rw-r--r--src/helperfuncs.cpp19
-rw-r--r--src/inspircd.cpp5
-rw-r--r--src/inspsocket.cpp74
-rw-r--r--src/modmanager_dynamic.cpp7
-rw-r--r--src/modmanager_static.cpp3
-rw-r--r--src/modules.cpp14
-rw-r--r--src/modules/extra/m_ldap.cpp647
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp132
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp25
-rw-r--r--src/modules/m_alias.cpp18
-rw-r--r--src/modules/m_callerid.cpp6
-rw-r--r--src/modules/m_close.cpp4
-rw-r--r--src/modules/m_hidechans.cpp14
-rw-r--r--src/modules/m_hideoper.cpp11
-rw-r--r--src/modules/m_jumpserver.cpp4
-rw-r--r--src/modules/m_nationalchars.cpp4
-rw-r--r--src/modules/m_services_account.cpp8
-rw-r--r--src/modules/m_servprotect.cpp7
-rw-r--r--src/modules/m_silence.cpp10
-rw-r--r--src/modules/m_spanningtree/nick.cpp2
-rw-r--r--src/modules/m_spanningtree/nickcollide.cpp6
-rw-r--r--src/modules/m_spanningtree/uid.cpp4
-rw-r--r--src/modules/m_spanningtree/utils.cpp1
-rw-r--r--src/modules/m_spanningtree/utils.h2
-rw-r--r--src/server.cpp1
-rw-r--r--src/usermanager.cpp16
56 files changed, 1374 insertions, 1083 deletions
diff --git a/docs/conf/censor.conf.example b/docs/conf/censor.conf.example
index ea9e08147..23924d14b 100644
--- a/docs/conf/censor.conf.example
+++ b/docs/conf/censor.conf.example
@@ -1,4 +1,4 @@
-# Configuration file for m_censor.so
+# Configuration file for the censor module
# The tags for this module are formatted as follows:
#
diff --git a/docs/conf/filter.conf.example b/docs/conf/filter.conf.example
index ef7f50588..cc72fe9a2 100644
--- a/docs/conf/filter.conf.example
+++ b/docs/conf/filter.conf.example
@@ -1,4 +1,4 @@
-# Configuration file for m_filter.so
+# Configuration file for the filter module
# The tags for this module are formatted as follows:
#
@@ -46,13 +46,13 @@
# expression. For example, to indicate numbers, use \\d and not \d. This does not
# apply when adding a regular expression over irc with the /FILTER command.
-# Example filters for m_filter:
+# Example filters:
#
# <keyword pattern="*qwerty*" reason="You qwertied!" action="block" flags="pn">
# <keyword pattern="*killmenow*" reason="As you request." action="kill" flags="*">
# <keyword pattern="*blah*" reason="Dont blah!" action="gline" duration="1d6h" flags="-">
-# An example regexp filter for m_filter_pcre:
+# An example regexp filter:
#
# <keyword pattern="^blah.*?$" reason="Dont blah!" action="gline" duration="1d6h" flags="pnPq">
diff --git a/docs/conf/helpop-full.conf.example b/docs/conf/helpop-full.conf.example
index 4f93aa90b..2d55d186a 100644
--- a/docs/conf/helpop-full.conf.example
+++ b/docs/conf/helpop-full.conf.example
@@ -661,30 +661,30 @@ Disconnects the server matching the given server mask from this server.">
Lists currently loaded modules, their memory offsets, version numbers,
and flags. If you are not an operator, you will see reduced detail.">
-<helpop key="loadmodule" value="/LOADMODULE <filename.so>
+<helpop key="loadmodule" value="/LOADMODULE <modname>
Loads the specified module into the local server.">
-<helpop key="unloadmodule" value="/UNLOADMODULE <filename.so>
+<helpop key="unloadmodule" value="/UNLOADMODULE <modname>
Unloads a module from the local server. The module cannot have the
static flag set (see the output of /MODULES).">
-<helpop key="reloadmodule" value="/RELOADMODULE <filename.so>
+<helpop key="reloadmodule" value="/RELOADMODULE <modname>
Unloads and reloads a module on the local server. This module cannot
have the static flag set (see the output of /MODULES).">
-<helpop key="gloadmodule" value="/GLOADMODULE <filename.so>
+<helpop key="gloadmodule" value="/GLOADMODULE <modname>
Loads the specified module on all linked servers.">
-<helpop key="gunloadmodule" value="/GUNLOADMODULE <filename.so>
+<helpop key="gunloadmodule" value="/GUNLOADMODULE <modname>
Unloads a module from all linked servers. The module cannot have the
static flag set (see the output of /MODULES).">
-<helpop key="greloadmodule" value="/GRELOADMODULE <filename.so>
+<helpop key="greloadmodule" value="/GRELOADMODULE <modname>
Unloads and reloads a module on all linked servers. This module cannot
have the static flag set (see the output of /MODULES).">
diff --git a/docs/conf/helpop.conf.example b/docs/conf/helpop.conf.example
index 27bd71358..f912e7019 100644
--- a/docs/conf/helpop.conf.example
+++ b/docs/conf/helpop.conf.example
@@ -1,4 +1,4 @@
-# Sample configuration file for m_helpop.so
+# Sample configuration file for the helpop module.
# You can either copy this into your conf folder and set up the module to use it,
# or you can customize the responses for your network and/or add more.
#
diff --git a/docs/conf/inspircd.conf.example b/docs/conf/inspircd.conf.example
index 123ebfd31..de2b5ee68 100644
--- a/docs/conf/inspircd.conf.example
+++ b/docs/conf/inspircd.conf.example
@@ -132,7 +132,7 @@
# |_| \_\___|\__,_|\__,_| |_| |_| |_|_|___/ |____/|_|\__(_) #
# #
# If you want to link servers to InspIRCd you must load the #
-# m_spanningtree.so module! Please see the modules list for #
+# spanningtree module! Please see the modules list for #
# information on how to load this module! If you do not load this #
# module, server ports will NOT work! #
@@ -176,7 +176,7 @@
# link-compatible and can be used alongside each other
# on each end of the link without any significant issues.
# Supported SSL types are: "openssl" and "gnutls".
-# You must load m_ssl_openssl for OpenSSL or m_ssl_gnutls for GnuTLS.
+# You must load the ssl_openssl module for OpenSSL or ssl_gnutls for GnuTLS.
<bind address="" port="7000,7001" type="servers">
<bind address="1.2.3.4" port="7005" type="servers" ssl="openssl">
@@ -191,9 +191,9 @@
<power
# hash: what hash these passwords are hashed with.
- # Requires the module for selected hash (m_md5.so, m_sha256.so
- # or m_ripemd160.so) be loaded and the password hashing module
- # (m_password_hash.so) loaded.
+ # Requires the module for selected hash (md5, sha256, or
+ # ripemd160) be loaded and the password hashing module
+ # (password_hash) loaded.
# Options here are: "md5", "sha256" and "ripemd160", or one of
# these prefixed with "hmac-", e.g.: "hmac-sha256".
# Optional, but recommended. Create hashed passwords with:
@@ -251,9 +251,8 @@
allow="203.0.113.*"
# hash: what hash this password is hashed with. requires the module
- # for selected hash (m_md5.so, m_sha256.so or m_ripemd160.so) be
- # loaded and the password hashing module (m_password_hash.so)
- # loaded. Options here are: "md5", "sha256" and "ripemd160".
+ # for selected hash (md5, sha256 or ripemd160) be loaded and the
+ # password hashing module (password_hash) loaded.
# Optional, but recommended. Create hashed passwords with:
# /mkpasswd <hash> <password>
#hash="sha256"
@@ -285,7 +284,7 @@
resolvehostnames="yes"
# usednsbl: Defines whether or not users in this class are subject to DNSBL. Default is yes.
- # This setting only has effect when m_dnsbl is loaded.
+ # This setting only has effect when the dnsbl module is loaded.
#usednsbl="yes"
# useident: Defines if users in this class MUST respond to a ident query or not.
@@ -295,15 +294,15 @@
limit="5000"
# modes: Usermodes that are set on users in this block on connect.
- # Enabling this option requires that the m_conn_umodes module be loaded.
+ # Enabling this option requires that the conn_umodes module be loaded.
# This entry is highly recommended to use for/with IP Cloaking/masking.
- # For the example to work, this also requires that the m_cloaking
+ # For the example to work, this also requires that the "cloaking"
# module be loaded as well.
modes="+x"
# requireident, requiressl, requireaccount: require that users of this
# block have a valid ident response, use SSL, or have authenticated.
- # Requires m_ident, m_sslinfo, or m_services_account respectively.
+ # Requires ident, sslinfo, or the services_account module, respectively.
requiressl="on"
# NOTE: For requireaccount, you must complete the signon prior to full
# connection. Currently, this is only possible by using SASL
@@ -402,9 +401,9 @@
limit="5000"
# modes: Usermodes that are set on users in this block on connect.
- # Enabling this option requires that the m_conn_umodes module be loaded.
+ # Enabling this option requires that the conn_umodes module be loaded.
# This entry is highly recommended to use for/with IP Cloaking/masking.
- # For the example to work, this also requires that the m_cloaking
+ # For the example to work, this also requires that the cloaking
# module be loaded as well.
modes="+x">
@@ -820,7 +819,7 @@
# - OPER - succesful and failed oper attempts
# - KILL - kill related messages
# - snomask - server notices (*all* snomasks will be logged)
-# - FILTER - messages related to filter matches (m_filter)
+# - FILTER - messages related to filter matches (filter module)
# - CONFIG - configuration related messages
# - COMMAND - die and restart messages, and messages related to unknown user types
# - SOCKET - socket engine informational/error messages
diff --git a/docs/conf/links.conf.example b/docs/conf/links.conf.example
index 0b8b23438..90849ede2 100644
--- a/docs/conf/links.conf.example
+++ b/docs/conf/links.conf.example
@@ -10,7 +10,7 @@
# |_| \_\___|\__,_|\__,_| |_| |_| |_|_|___/ |____/|_|\__(_) #
# #
# If you want to link servers to InspIRCd you must load the #
-# m_spanningtree.so module! #
+# spanningtree module! #
# #
# #
@@ -40,8 +40,8 @@
# making an outbound connection to the server. Options are: "openssl"
# and "gnutls" (they are compatible with each other).
#
- # You will need to load the m_ssl_openssl.so module for OpenSSL,
- # m_ssl_gnutls.so for GnuTLS. The server port that you connect to
+ # You will need to load the ssl_openssl module for OpenSSL,
+ # or ssl_gnutls for GnuTLS. The server port that you connect to
# must be capable of accepting this type of connection.
ssl="gnutls"
diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example
index 93cf07ee2..40dfadbe7 100644
--- a/docs/conf/modules.conf.example
+++ b/docs/conf/modules.conf.example
@@ -19,8 +19,8 @@
# | _ < __/ (_| | (_| | | | | | | | \__ \ | |_) | | |_|_| #
# |_| \_\___|\__,_|\__,_| |_| |_| |_|_|___/ |____/|_|\__(_) #
# #
-# To link servers to InspIRCd, you MUST load the m_spanningtree #
-# module. If you don't do this, server links will NOT work at all. #
+# To link servers to InspIRCd, you MUST load the spanningtree module. #
+# If you don't do this, server links will NOT work at all. #
# This is by design, to allow for the implementation of other linking #
# protocols in modules in the future. This module is at the bottom of #
# this file. #
@@ -31,38 +31,38 @@
# cryptographic uses and security.
#
# IMPORTANT:
-# Other modules such as m_cloaking.so and m_password_hash.so may rely on
+# Other modules such as cloaking and password_hash may rely on
# this module being loaded to function.
#
-#<module name="m_md5.so">
+#<module name="md5">
#
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SHA256 module: Allows other modules to generate SHA256 hashes,
# usually for cryptographic uses and security.
#
# IMPORTANT:
-# Other modules such as m_password_hash.so may rely on this module being
-# loaded to function. Certain modules such as m_spanningtree.so will
+# Other modules such as password_hash may rely on this module being
+# loaded to function. Certain modules such as spanningtree will
# function without this module but when it is loaded their features will
# be enhanced (for example the addition of HMAC authentication).
#
-#<module name="m_sha256.so">
+#<module name="sha256">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# RIPEMD160 module: Allows other modules to generate RIPEMD160 hashes,
# usually for cryptographic uses and security.
#
# IMPORTANT:
# Other modules may rely on this module being loaded to function.
-#<module name="m_ripemd160.so">
+#<module name="ripemd160">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Abbreviation module: Provides the ability to abbreviate commands a-la
# BBC BASIC keywords.
-#<module name="m_abbreviation.so">
+#<module name="abbreviation">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Alias module: Allows you to define server-side command aliases.
-#<module name="m_alias.so">
+#<module name="alias">
#
# Set the 'prefix' for in-channel aliases (fantasy commands) to the
# specified character. If not set, the default is "!".
@@ -72,9 +72,9 @@
#
#-#-#-#-#-#-#-#-#-#-#- ALIAS DEFINITIONS -#-#-#-#-#-#-#-#-#-#-#-#-#-#
# #
-# If you have the m_alias.so module loaded, you may also define #
-# aliases as shown below. They are commonly used to provide shortcut #
-# commands to services, however they are not limited to just this use.#
+# If you have the alias module loaded, you may also define aliases as #
+# shown below. They are commonly used to provide shortcut commands to #
+# services, however they are not limited to just this use. #
# An alias tag requires the following values to be defined in it: #
# #
# text - The text to detect as the actual command line. #
@@ -180,18 +180,18 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Allowinvite module: Gives channel mode +A to allow all users to use
# /INVITE, and extban A to deny invite from specific masks.
-#<module name="m_allowinvite.so">
+#<module name="allowinvite">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Alltime module: Shows time on all connected servers at once.
# This module is oper-only and provides /ALLTIME.
# To use, ALLTIME must be in one of your oper class blocks.
-#<module name="m_alltime.so">
+#<module name="alltime">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Auditorium module: Adds channel mode +u which makes everyone else
# except you in the channel invisible, used for large meetings etc.
-#<module name="m_auditorium.so">
+#<module name="auditorium">
#
# Auditorium settings:
#
@@ -215,21 +215,21 @@
# Another useful combination is with SSL client certificate
# fingerprints: +w h:z:72db600734bb9546c1bdd02377bc21d2a9690d48 will
# give halfop to the user(s) having the given certificate.
-#<module name="m_autoop.so">
+#<module name="autoop">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Ban except module: Adds support for channel ban exceptions (+e).
-#<module name="m_banexception.so">
+#<module name="banexception">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Ban redirection module: Allows bans which redirect to a specified
# channel. e.g. +b nick!ident@host#channelbanneduserissentto
-#<module name="m_banredirect.so">
+#<module name="banredirect">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# bcrypt module: Allows other modules to generate bcrypt hashes,
# usually for cryptographic uses and security.
-#<module name="m_bcrypt.so">
+#<module name="bcrypt">
#
# rounds: Defines how many rounds the bcrypt function will run when
# generating new hashes.
@@ -237,12 +237,12 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Block amsg module: Attempt to block all usage of /amsg and /ame.
-#<module name="m_blockamsg.so">
+#<module name="blockamsg">
#
#-#-#-#-#-#-#-#-#-#-#- BLOCKAMSG CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# #
-# If you have the m_blockamsg.so module loaded, you can configure it #
-# with the <blockamsg> tag: #
+# If you have the blockamsg module loaded, you can configure it with #
+# the <blockamsg> tag: #
# #
# delay - How many seconds between two messages to force #
# them to be recognised as unrelated. #
@@ -254,7 +254,7 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Block CAPS module: Adds channel mode +B, blocks all-CAPS messages.
-#<module name="m_blockcaps.so">
+#<module name="blockcaps">
#
#-#-#-#-#-#-#-#-#-#-#- BLOCKCAPS CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# #
@@ -274,17 +274,17 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Block color module: Blocking color-coded messages with chan mode +c.
-#<module name="m_blockcolor.so">
+#<module name="blockcolor">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Botmode module: Adds the user mode +B. If set on a user, it will
# show that the user is a bot in /WHOIS.
-#<module name="m_botmode.so">
+#<module name="botmode">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# CallerID module: Adds usermode +g which activates hybrid-style
# callerid: block all private messages unless you /ACCEPT first.
-#<module name="m_callerid.so">
+#<module name="callerid">
#
#-#-#-#-#-#-#-#-#-#-#- CALLERID CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# maxaccepts - Maximum number of entries a user can add to his #
@@ -304,23 +304,23 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# CAP module: Provides the CAP negotiation mechanism required by the
-# m_sasl, m_namesx, m_uhnames, and m_ircv3 modules.
-# It is also recommended for the STARTTLS support in m_starttls.
-#<module name="m_cap.so">
+# sasl, namesx, uhnames, and ircv3 modules.
+# It is also recommended for STARTTLS support in the starttls module.
+#<module name="cap">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# CBAN module: Lets you disallow channels from being used at runtime.
# This module is oper-only and provides /CBAN.
# To use, CBAN must be in one of your oper class blocks.
-#<module name="m_cban.so">
+#<module name="cban">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Censor module: Adds channel and user mode +G.
-#<module name="m_censor.so">
+#<module name="censor">
#
#-#-#-#-#-#-#-#-#-#-#- CENSOR CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
-# Optional - If you specify to use the m_censor module, then you must #
+# Optional - If you specify to use the censor module, then you must #
# specify some censor tags. See also: #
# http://wiki.inspircd.org/Modules/censor #
#
@@ -330,11 +330,11 @@
# CGI:IRC module: Adds support for automatic host changing in CGI:IRC
# (http://cgiirc.sourceforge.net).
# Adds snomask +w for monitoring CGI:IRC connections.
-#<module name="m_cgiirc.so">
+#<module name="cgiirc">
#
#-#-#-#-#-#-#-#-#-#-#-# CGIIRC CONFIGURATION #-#-#-#-#-#-#-#-#-#-#-#-#
#
-# Optional - If you specify to use m_cgiirc, then you must specify one
+# Optional - If you specify to use cgiirc, then you must specify one
# or more cgihost tags which indicate authorised CGI:IRC servers which
# will be connecting to your network, and an optional cgiirc tag.
# For more information see: http://wiki.inspircd.org/Modules/cgiirc
@@ -371,12 +371,12 @@
# Channel create module: Adds snomask +j, which will notify opers of
# any new channels that are created.
# This module is oper-only.
-#<module name="m_chancreate.so">
+#<module name="chancreate">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Channel filter module: Allows channel-op defined message filtering
# using simple string matches (channel mode +g).
-#<module name="m_chanfilter.so">
+#<module name="chanfilter">
#
# If hidemask is set to yes, the user will not be shown the mask when
# his/her message is blocked.
@@ -387,7 +387,7 @@
# joining a channel with +H 'X:T' set; 'T' is the maximum time to keep
# lines in the history buffer. Designed so that the new user knows what
# the current topic of conversation is when joining the channel.
-#<module name="m_chanhistory.so">
+#<module name="chanhistory">
#
# Set the maximum number of lines allowed to be stored per channel below.
# This is the hard limit for 'X'.
@@ -403,7 +403,7 @@
# The "channel" field is where you want the messages to go, "snomasks"
# is what snomasks you want to be sent to that channel. Multiple tags
# are allowed.
-#<module name="m_chanlog.so">
+#<module name="chanlog">
#<chanlog snomasks="AOcC" channel="#opers">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
@@ -411,7 +411,7 @@
# characters in the channel name such as bold, colorcodes, etc. which
# can be quite annoying and allow users to on occasion have a channel
# that looks like the name of another channel on the network.
-#<module name="m_channames.so">
+#<module name="channames">
<channames
# denyrange: characters or range of characters to deny in channel
@@ -425,7 +425,7 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Channelban: Implements extended ban j:, which stops anyone already
# in a channel matching a ban like +b j:#channel*mask from joining.
-#<module name="m_channelban.so">
+#<module name="channelban">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Check module: Adds the /CHECK command.
@@ -433,7 +433,7 @@
# IP addresses and hosts.
# This module is oper-only.
# To use, CHECK must be in one of your oper class blocks.
-#<module name="m_check.so">
+#<module name="check">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# CHGHOST module: Adds the /CHGHOST command.
@@ -442,7 +442,7 @@
# NOTE: Services will not be able to set vhosts on users if this module
# isn't loaded. If you're planning on running services, you probably
# want to load this.
-#<module name="m_chghost.so">
+#<module name="chghost">
#
#-#-#-#-#-#-#-#-# /CHGHOST - /SETHOST CONFIGURATION #-#-#-#-#-#-#-#-#
# Optional - If you want to use special chars for hostnames you can #
@@ -457,30 +457,30 @@
# CHGIDENT module: Adds the /CHGIDENT command.
# This module is oper-only.
# To use, CHGIDENT must be in one of your oper class blocks.
-#<module name="m_chgident.so">
+#<module name="chgident">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# CHGNAME module: Adds the /CHGNAME command.
# This module is oper-only.
# To use, CHGNAME must be in one of your oper class blocks.
-#<module name="m_chgname.so">
+#<module name="chgname">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Clear chan module: Allows opers to masskick, masskill or mass-G/ZLine
# all users on a channel using /CLEARCHAN.
-#<module name="m_clearchan.so">
+#<module name="clearchan">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Cloaking module: Adds usermode +x and cloaking support.
-# Relies on the module m_md5.so being loaded.
-# To cloak users when they connect, load m_conn_umodes and set
+# Relies on the md5 module being loaded.
+# To cloak users when they connect, load the conn_umodes module and set
# <connect:modes> to include the +x mode. The example <connect> tag
-# shows this. See the m_conn_umodes module for more information.
-#<module name="m_cloaking.so">
+# shows this. See the conn_umodes module for more information.
+#<module name="cloaking">
#
#-#-#-#-#-#-#-#-#-#-#- CLOAKING CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
-# To use m_cloaking, you must define a cloak key, and optionally a #
+# To use cloaking, you must define a cloak key, and optionally a #
# cloak prefix as shown below. The cloak key must be shared across #
# the network for correct cloaking. #
# #
@@ -505,7 +505,7 @@
# Close module: Allows an oper to close all unregistered connections.
# This module is oper-only and provides the /CLOSE command.
# To use, CLOSE must be in one of your oper class blocks.
-#<module name="m_close.so">
+#<module name="close">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Clones module: Adds an oper command /CLONES for detecting cloned
@@ -513,25 +513,25 @@
# issued, use with care.
# This module is oper-only.
# To use, CLONES must be in one of your oper class blocks.
-#<module name="m_clones.so">
+#<module name="clones">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Common channels module: Adds user mode +c, which, when set, requires
# that users must share a common channel with you to PRIVMSG or NOTICE
# you.
-#<module name="m_commonchans.so">
+#<module name="commonchans">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Auto join on connect module: Allows you to force users to join one
# or more channels automatically upon connecting to the server, or
# join them in case they aren't on any channels after being online
# for X seconds.
-#<module name="m_conn_join.so">
+#<module name="conn_join">
#
#-#-#-#-#-#-#-#-#-#-#-#- CONNJOIN CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
#
-# If you have m_conn_join.so loaded, you can configure it using the
-# following values, or set autojoin="#chat,#help" in <connect> blocks.
+# If you have the conn_join module loaded, you can configure it below
+# or set autojoin="#chat,#help" in <connect> blocks.
#
# Join users immediately after connection to #one #two and #three.
#<autojoin channel="#one,#two,#three">
@@ -542,18 +542,18 @@
# Set modes on connect module: When this module is loaded <connect>
# blocks may have an optional modes="" value, which contains modes to
# add or remove from users when they connect to the server.
-#<module name="m_conn_umodes.so">
+#<module name="conn_umodes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Wait for PONG on connect module: Send a PING to all connecting users
# and don't let them connect until they reply with a PONG.
# This is useful to stop certain kinds of bots and proxies.
-#<module name="m_conn_waitpong.so">
+#<module name="conn_waitpong">
#
#-#-#-#-#-#-#-#-#-#-#- WAITPONG CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# #
-# If you have the m_conn_waitpong.so module loaded, configure it with #
-# the <waitpong> tag: #
+# If you have the conn_waitpong module loaded, configure it with the #
+# <waitpong> tag: #
# #
# sendsnotice - Whether to send a helpful notice to users on #
# connect telling them how to connect, should #
@@ -567,13 +567,13 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Channel cycle module: Adds the /CYCLE command which is a server-side
# /HOP that bypasses restrictive modes.
-#<module name="m_cycle.so">
+#<module name="cycle">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Connectban: Provides IP connection throttling. Any IP range that
# connects too many times (configurable) in an hour is Z-Lined for a
# (configurable) duration, and their count resets to 0.
-#<module name="m_connectban.so">
+#<module name="connectban">
#
# ipv4cidr and ipv6cidr allow you to turn the comparison from
# individual IP addresses (32 and 128 bits) into CIDR masks, to allow
@@ -588,7 +588,7 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Connection throttle module.
-#<module name="m_connflood.so">
+#<module name="connflood">
#
#-#-#-#-#-#-#-#-#-#-#- CONNTHROTTLE CONFIGURATION -#-#-#-#-#-#-#-#-#-#
# seconds, maxconns - Amount of connections per <seconds>.
@@ -608,7 +608,7 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Custom prefixes: Allows for channel prefixes to be added.
-#<module name="m_customprefix.so">
+#<module name="customprefix">
#
# name The name of the mode, must be unique from other modes.
# letter The letter used for this mode. Required.
@@ -623,19 +623,19 @@
#<customprefix name="halfop" letter="h" prefix="%" rank="20000" ranktoset="30000">
#<customprefix name="halfvoice" letter="V" prefix="-" rank="1" ranktoset="20000">
#
-# Do /RELOADMODULE m_customprefix.so after changing the settings of this module.
+# Do /RELOADMODULE customprefix after changing the settings of this module.
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Custom title module: Adds the /TITLE command which allows for trusted
# users to gain a custom whois line and an optional vhost can be
# specified.
-#<module name="m_customtitle.so">
+#<module name="customtitle">
#
#-#-#-#-#-#-#-#-#-#- CUSTOM TITLE CONFIGURATION -#-#-#-#-#-#-#-#-#-#
# name - The username used to identify.
# password - The password used to identify.
# hash - The hash for the specific user's password (optional).
-# m_password_hash.so and a hashing module must be loaded
+# password_hash and a hashing module must be loaded
# for this to work.
# host - Allowed hostmask (optional).
# title - Title shown in whois.
@@ -647,7 +647,7 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# DCCALLOW module: Adds the /DCCALLOW command.
-#<module name="m_dccallow.so">
+#<module name="dccallow">
#
#-#-#-#-#-#-#-#-#-#-#- DCCALLOW CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# blockchat - Whether to block DCC CHAT as well as DCC SEND.
@@ -668,7 +668,7 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Deaf module: Adds support for the usermode +d - deaf to channel
# messages and channel notices.
-#<module name="m_deaf.so">
+#<module name="deaf">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Delay join module: Adds the channel mode +D which delays all JOIN
@@ -676,24 +676,24 @@
# speaking, their quit or part message will not be shown to the channel
# which helps cut down noise on large channels in a more friendly way
# than the auditorium mode. Only channel ops may set the +D mode.
-#<module name="m_delayjoin.so">
+#<module name="delayjoin">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Delay message module: Adds the channel mode +d which disallows a user
# from talking in the channel unless they've been joined for X seconds.
# Settable using /MODE #chan +d 30
-#<module name="m_delaymsg.so">
+#<module name="delaymsg">
# Set allownotice to no to disallow NOTICEs too. Defaults to yes.
#<delaymsg allownotice="no">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Deny channels module: Deny channels from being used by users.
-#<module name="m_denychans.so">
+#<module name="denychans">
#
#-#-#-#-#-#-#-#-#-#-#- DENYCHAN DEFINITIONS -#-#-#-#-#-#-#-#-#-#-#-#
# #
-# If you have the m_denychans.so module loaded, you need to specify #
-# the channels to deny: #
+# If you have the denychans module loaded, you need to specify the #
+# channels to deny: #
# #
# name - The channel name to deny (glob masks are ok). #
# allowopers - If operators are allowed to override the deny. #
@@ -712,14 +712,14 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Devoice module: Let users devoice themselves using /DEVOICE #chan.
-#<module name="m_devoice.so">
+#<module name="devoice">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# DNS blacklist module: Provides support for looking up IPs on one or #
# more blacklists. #
-#<module name="m_dnsbl.so"> #
+#<module name="dnsbl"> #
# #
-# For configuration options please see the wiki page for m_dnsbl at #
+# For configuration options please see the wiki page for dnsbl at #
# http://wiki.inspircd.org/Modules/dnsbl #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
@@ -727,24 +727,24 @@
# channel operators to be exempt from some channel modes. Supported #
# modes are blockcaps, noctcp, blockcolor, nickflood, flood, censor, #
# filter, regmoderated, nonick, nonotice, and stripcolor. #
-#<module name="m_exemptchanops.so"> #
+#<module name="exemptchanops"> #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Filter module: Provides message filtering, similar to SPAMFILTER. #
-#<module name="m_filter.so">
+#<module name="filter">
# #
-# This module depends upon a regex provider such as m_regex_pcre or #
-# m_regex_glob to function. You must specify which of these you want #
-# m_filter to use via the tag below. #
+# This module depends upon a regex provider such as regex_pcre or #
+# regex_glob to function. You must specify which of these you want #
+# the filter module to use via the tag below. #
# #
# Valid engines are: #
# #
-# glob - Glob patterns, provided via m_regex_glob. #
-# pcre - PCRE regexps, provided via m_regex_pcre, needs libpcre. #
-# tre - TRE regexps, provided via m_regex_tre, requires libtre. #
-# posix - POSIX regexps, provided via m_regex_posix, not available #
+# glob - Glob patterns, provided via regex_glob. #
+# pcre - PCRE regexps, provided via regex_pcre, needs libpcre. #
+# tre - TRE regexps, provided via regex_tre, requires libtre. #
+# posix - POSIX regexps, provided via regex_posix, not available #
# on Windows, no dependencies on other operating systems. #
-# stdlib - stdlib regexps, provided via m_regex_stdlib, see comment #
+# stdlib - stdlib regexps, provided via regex_stdlib, see comment #
# at the <module> tag for info on availability. #
# #
#<filteropts engine="glob"> #
@@ -757,7 +757,7 @@
#
#-#-#-#-#-#-#-#-#-#-#- FILTER CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
-# Optional - If you specify to use the m_filter module, then #
+# Optional - If you specify to use the filter module, then #
# specify below the path to the filter.conf file, or define some #
# <filter> tags. #
# #
@@ -769,12 +769,12 @@
# allowing all IPs to connect to all plaintext IRC ports #
#<bind address="" port="8430" type="flashpolicyd"> #
#<flashpolicyd timeout="5" file=""> #
-#<module name="m_flashpolicyd.so"> #
+#<module name="flashpolicyd"> #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Gecos ban: Implements extended ban 'r', which stops anyone matching
# a mask like +b r:*realname?here* from joining a channel.
-#<module name="m_gecosban.so">
+#<module name="gecosban">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# GeoIP module: Allows the server admin to match users by country code.
@@ -784,7 +784,7 @@
# This module requires GeoIP to be installed on your system,
# use your package manager to find the appropriate packages
# or check the InspIRCd wiki page for this module.
-#<module name="m_geoip.so">
+#<module name="geoip">
#
# The actual allow/ban actions are done by connect classes, not by the
# GeoIP module. An example connect class to ban people from russia or
@@ -802,7 +802,7 @@
# Globops module: Provides the /GLOBOPS command and snomask +g.
# This module is oper-only.
# To use, GLOBOPS must be in one of your oper class blocks.
-#<module name="m_globops.so">
+#<module name="globops">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Global load module: Allows loading and unloading of modules network-
@@ -811,23 +811,23 @@
# and /GRELOADMODULE.
# To use, GLOADMODULE, GUNLOADMODULE and GRELOADMODULE
# must be in one of your oper class blocks.
-#<module name="m_globalload.so">
+#<module name="globalload">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# HELPOP module: Provides the /HELPOP command
-#<module name="m_helpop.so">
+#<module name="helpop">
#
#-#-#-#-#-#-#-#-#-#-#-#- HELPOP CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# #
-# If you specify to use the m_helpop.so module, then specify below #
-# the path to the helpop.conf file. #
+# If you specify to use the helpop module, then specify below the #
+# path to the helpop.conf file. #
# #
#<include file="examples/inspircd.helpop-full.example">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Hide chans module: Allows users to hide their channels list from non-
# opers by setting user mode +I on themselves.
-#<module name="m_hidechans.so">
+#<module name="hidechans">
#
# This mode can optionally prevent opers from seeing channels on a +I
# user, for more privacy if set to true.
@@ -837,7 +837,7 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Hide list module: Allows for hiding the list of listmodes from users
# who do not have sufficient channel rank.
-#<module name="m_hidelist.so">
+#<module name="hidelist">
#
# Each <hidelist> tag configures one listmode to hide.
# mode: Name of the listmode to hide.
@@ -859,11 +859,11 @@
# Hide oper module: Allows opers to hide their oper status from non-
# opers by setting user mode +H on themselves.
# This module is oper-only.
-#<module name="m_hideoper.so">
+#<module name="hideoper">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Hostchange module: Allows a different style of cloaking.
-#<module name="m_hostchange.so">
+#<module name="hostchange">
#
#-#-#-#-#-#-#-#-#-#-#- HOSTCHANGE CONFIGURATION -#-#-#-#-#-#-#-#-#-#
# #
@@ -878,31 +878,31 @@
# hostcycle: If loaded, when a user gets a host or ident set, it will
# cycle them in all their channels. If not loaded it will simply change
# their host/ident without cycling them.
-#<module name="m_hostcycle.so">
+#<module name="hostcycle">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# httpd module: Provides HTTP server support for InspIRCd.
-#<module name="m_httpd.so">
+#<module name="httpd">
#
#-#-#-#-#-#-#-#-#-#-#-#- HTTPD CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
#
-# If you choose to use the m_httpd.so module, then you will need to add
+# If you choose to use the httpd module, then you will need to add
# a <bind> tag with type "httpd", and load at least one of the other
-# m_httpd_* modules to provide pages to display.
+# httpd_* modules to provide pages to display.
#
# You can adjust the timeout for HTTP connections below. All HTTP
# connections will be closed after (roughly) this many seconds.
#<httpd timeout="20">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
-# HTTP ACL module: Provides access control lists for m_httpd dependent
+# HTTP ACL module: Provides access control lists for httpd dependent
# modules. Use this module to restrict pages by IP address and by
# password.
-#<module name="m_httpd_acl.so">
+#<module name="httpd_acl">
#
#-#-#-#-#-#-#-#-#-#-#-#- HTTPD ACL CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
#
-# Restrict access to the m_httpd_stats module to all but the local
+# Restrict access to the httpd_stats module to all but the local
# network and when the correct password is specified:
# <httpdacl path="/stats*" types="password,whitelist"
# username="secrets" password="mypasshere" whitelist="127.0.0.*,10.*">
@@ -912,27 +912,27 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# HTTP config module: Allows the configuration of the server to be
-# viewed over HTTP. Requires m_httpd.so to be loaded for it to function.
-#<module name="m_httpd_config.so">
+# viewed over HTTP. Requires httpd to be loaded for it to function.
+#<module name="httpd_config">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# HTTP stats module: Provides basic stats pages over HTTP.
-# Requires m_httpd.so to be loaded for it to function.
-#<module name="m_httpd_stats.so">
+# Requires httpd to be loaded for it to function.
+#<module name="httpd_stats">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Ident: Provides RFC 1413 ident lookup support.
# When this module is loaded <connect:allow> tags may have an optional
# useident="yes|no" boolean value, determining whether or not to lookup
# ident on users matching that connect tag.
-#<module name="m_ident.so">
+#<module name="ident">
#
#-#-#-#-#-#-#-#-#-#-#-#- IDENT CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# #
-# Optional - If you are using the m_ident.so module, then you can #
-# specify the timeout for ident lookups here. If not defined, it will #
-# default to 5 seconds. This is a non-blocking timeout which holds #
-# the user in a 'connecting' state until the lookup is complete. #
+# Optional - If you are using the ident module, then you can specify #
+# the timeout for ident lookups here. If not defined, it will default #
+# to 5 seconds. This is a non-blocking timeout which holds the user #
+# in a 'connecting' state until the lookup is complete. #
# The bind value indicates which IP to bind outbound requests to. #
# nolookupprefix: If on, the idents of users being in a connect class #
# with ident lookups disabled (i.e. <connect useident="off">) will be #
@@ -944,7 +944,7 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Invite exception module: Adds support for channel invite exceptions
# (+I).
-#<module name="m_inviteexception.so">
+#<module name="inviteexception">
# bypasskey: If this is enabled, exceptions will bypass +k as well as +i
#<inviteexception bypasskey="yes">
@@ -953,22 +953,22 @@
# extended-join, away-notify and account-notify. These are optional
# enhancements to the client-to-server protocol. An extension is only
# active for a client when the client specifically requests it, so this
-# module needs m_cap to work.
+# module needs the cap module to work.
#
# Further information on these extensions can be found at the IRCv3
# working group website:
# http://ircv3.org/extensions/
#
-#<module name="m_ircv3.so">
+#<module name="ircv3">
# The following block can be used to control which extensions are
-# enabled. Note that extended-join can be incompatible with m_delayjoin
+# enabled. Note that extended-join can be incompatible with delayjoin
# and host cycling.
#<ircv3 accountnotify="on" awaynotify="on" extendedjoin="on">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Join flood module: Adds support for join flood protection +j X:Y.
# Closes the channel for 60 seconds if X users join in Y seconds.
-#<module name="m_joinflood.so">
+#<module name="joinflood">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Jump server module: Adds support for the RPL_REDIR numeric.
@@ -976,15 +976,15 @@
# To use, JUMPSERVER must be in one of your oper class blocks.
# If your server is redirecting new clients and you get disconnected,
# do a REHASH from shell to open up again.
-#<module name="m_jumpserver.so">
+#<module name="jumpserver">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Anti auto rejoin: Adds support for prevention of auto-rejoin (+J).
-#<module name="m_kicknorejoin.so">
+#<module name="kicknorejoin">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Knock module: Adds the /KNOCK command and channel mode +K.
-#<module name="m_knock.so">
+#<module name="knock">
#
# This setting specifies what to do when someone successfully /KNOCKs.
# If set to "notice", then a NOTICE will be sent to the channel.
@@ -1002,7 +1002,7 @@
# ./configure --enable-extras=m_ldap.cpp
# and run make install, then uncomment this module to enable it.
#
-#<module name="m_ldap.so">
+#<module name="ldap">
#<database module="ldap" id="ldapdb" server="ldap://localhost" binddn="cn=Manager,dc=inspircd,dc=org" bindauth="mysecretpass" searchscope="subtree">
# The server parameter indicates the LDAP server to connect to. The #
# ldap:// style scheme before the hostname proper is MANDATORY. #
@@ -1019,7 +1019,7 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# LDAP authentication module: Adds the ability to authenticate users #
# via LDAP. #
-#<module name="m_ldapauth.so">
+#<module name="ldapauth">
# #
# Configuration: #
# #
@@ -1072,7 +1072,7 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# LDAP oper configuration module: Adds the ability to authenticate #
# opers via LDAP. #
-#<module name="m_ldapoper.so">
+#<module name="ldapoper">
# #
# Configuration: #
# #
@@ -1081,8 +1081,8 @@
# attribute="uid">
# #
# Available configuration items are identical to the same items in #
-# m_ldapauth above (except for the verbose setting, that is only #
-# supported in m_ldapauth). #
+# ldapauth above (except for the verbose setting, that is only #
+# supported in ldapauth). #
# Please always specify a password in your <oper> tags even if the #
# opers are to be authenticated via LDAP, so in case this module is #
# not loaded the oper accounts are still protected by a password. #
@@ -1096,29 +1096,29 @@
# If your server is locked and you get disconnected, do a REHASH from #
# shell to open up again. #
# This module is oper-only.
-#<module name="m_lockserv.so">
+#<module name="lockserv">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Map hiding module: replaces /MAP and /LINKS output to users with a #
# message to see a website, set by maphide="http://test.org/map" in #
# the <security> tag, instead. #
-#<module name="m_maphide.so">
+#<module name="maphide">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Message flood module: Adds message/notice flood protection via
# channel mode +f.
-#<module name="m_messageflood.so">
+#<module name="messageflood">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# MLOCK module: Adds support for server-side enforcement of services
# side MLOCKs. Basically, this module suppresses any mode change that
# would likely be immediately bounced by services.
-#<module name="m_mlock.so">
+#<module name="mlock">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Modenotice module: Adds the /MODENOTICE command that allows opers to
# send notices to all users having the given user mode(s) set.
-#<module name="m_modenotice.so">
+#<module name="modenotice">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# MsSQL module: Allows other SQL modules to access MS SQL Server
@@ -1126,11 +1126,11 @@
# This module is in extras. Re-run configure with:
# ./configure --enable-extras=m_mssql.cpp
# and run make install, then uncomment this module to enable it.
-#<module name="m_mssql.so">
+#<module name="mssql">
#
#-#-#-#-#-#-#-#-#-#-#-#- SQL CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#-#
# #
-# m_mssql.so is more complex than described here, see wiki for more #
+# mssql is more complex than described here, see the wiki for more #
# info http://wiki.inspircd.org/Modules/mssql #
#
#<database module="mssql" name="db" user="user" pass="pass" host="localhost" id="db1">
@@ -1141,12 +1141,12 @@
# This module is in extras. Re-run configure with:
# ./configure --enable-extras=m_mysql.cpp
# and run make install, then uncomment this module to enable it.
-#<module name="m_mysql.so">
+#<module name="mysql">
#
#-#-#-#-#-#-#-#-#-#-#-#- SQL CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#-#
# #
-# m_mysql.so is more complex than described here, see the wiki for #
-# more: http://wiki.inspircd.org/Modules/mysql #
+# mysql is more complex than described here, see the wiki for more #
+# info: http://wiki.inspircd.org/Modules/mysql #
#
#<database module="mysql" name="mydb" user="myuser" pass="mypass" host="localhost" id="my_database2">
@@ -1155,19 +1155,19 @@
# modes via long-form mode names via +Z and the /PROP command.
# For example, to set a ban, do /mode #channel +Z ban=foo!bar@baz or
# /PROP #channel ban=foo!bar@baz
-#<module name="m_namedmodes.so">
+#<module name="namedmodes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# NAMESX module: Provides support for the NAMESX extension which allows
# clients to see all the prefixes set on a user without getting confused.
# This is supported by mIRC, x-chat, klient, and maybe more.
-#<module name="m_namesx.so">
+#<module name="namesx">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# National characters module:
# 1) Allows using national characters in nicknames.
# 2) Allows using custom (national) casemapping over the network.
-#<module name="m_nationalchars.so">
+#<module name="nationalchars">
#
# file - filename of existing file in "locales" directory
# casemapping - custom value for 005 numeric (if you want it to be
@@ -1178,47 +1178,47 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Nickchange flood protection module: Provides channel mode +F X:Y
# which allows up to X nick changes in Y seconds.
-#<module name="m_nickflood.so">
+#<module name="nickflood">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Nicklock module: Let opers change a user's nick and then stop that
# user from changing their nick again until unlocked.
# This module is oper-only.
# To use, NICKLOCK and NICKUNLOCK must be in one of your oper class blocks.
-#<module name="m_nicklock.so">
+#<module name="nicklock">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# No CTCP module: Adds the channel mode +C to block CTCPs and extban
# 'C' to block CTCPs sent by specific users.
-#<module name="m_noctcp.so">
+#<module name="noctcp">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# No kicks module: Adds the +Q channel mode and the Q: extban to deny
# certain users from kicking.
-#<module name="m_nokicks.so">
+#<module name="nokicks">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# No nicks module: Adds the +N channel mode, as well as the 'N' extban.
# +N stops all users from changing their nick, the N extban stops
# anyone from matching a +b N:nick!user@host mask from changing their
# nick.
-#<module name="m_nonicks.so">
+#<module name="nonicks">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# No part message module: Adds extban 'p' to block part messages from #
# matching users. #
-#<module name="m_nopartmsg.so">
+#<module name="nopartmsg">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# No notice module: Adds the channel mode +T and the extban 'T' to
# block specific users from noticing the channel.
-#<module name="m_nonotice.so">
+#<module name="nonotice">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Network business join module:
# Allows an oper to join a channel using /OJOIN, giving them +Y on the
# channel which makes them immune to kick/deop/etc.
-#<module name="m_ojoin.so">
+#<module name="ojoin">
#
# Specify the prefix that +Y will grant here.
# Leave 'prefix' empty if you do not wish +Y to grant a prefix.
@@ -1233,16 +1233,17 @@
# /mode #channel +iI O:* is equivalent to channel mode +O, but you
# may also set +iI O:AdminTypeOnly to only allow admins.
# Modes +I and +e work in a similar fashion.
-#<module name="m_operchans.so">
+#<module name="operchans">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Oper join module: Auto-joins opers to a channel upon oper-up.
-# This module is oper-only. For the user equivalent, see m_conn_join.
-#<module name="m_operjoin.so">
+# This module is oper-only. For the user equivalent, see the conn_join
+# module.
+#<module name="operjoin">
#
#-#-#-#-#-#-#-#-#-#-# OPERJOIN CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# #
-# If you are using the m_operjoin.so module, specify options here: #
+# If you are using the operjoin module, specify options here: #
# #
# channel - The channel name to join, can also be a comma #
# separated list e.g. "#channel1,#channel2". #
@@ -1262,7 +1263,7 @@
# type "m_operlog" at default loglevel), and optionally to the 'r'
# snomask.
# This module is oper-only.
-#<module name="m_operlog.so">
+#<module name="operlog">
#
# If the following option is on then all oper commands will be sent to
# the snomask 'r'. The default is off.
@@ -1276,7 +1277,7 @@
#
# Load this module if you want all your IRC operators to have channel
# operator powers.
-#<module name="m_operprefix.so">
+#<module name="operprefix">
#
# You may additionally customise the prefix character.
#<operprefix prefix="!">
@@ -1285,11 +1286,11 @@
# Oper MOTD module: Provides support for separate message of the day
# on oper-up.
# This module is oper-only.
-#<module name="m_opermotd.so">
+#<module name="opermotd">
#
#-#-#-#-#-#-#-#-#-#-# OPERMOTD CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# #
-# If you are using the m_opermotd.so module, specify the motd here. #
+# If you are using the opermotd module, specify the motd here. #
# #
# onoper - If on, the message is sent on /OPER, otherwise it's #
# only sent when /OPERMOTD is used. #
@@ -1303,11 +1304,11 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Override module: Adds support for oper override.
# This module is oper-only.
-#<module name="m_override.so">
+#<module name="override">
#
#-#-#-#-#-#-#-#-#-#-# OVERRIDE CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# #
-# m_override.so is too complex it describe here, see the wiki: #
+# override is too complex it describe here, see the wiki: #
# http://wiki.inspircd.org/Modules/override #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
@@ -1315,21 +1316,22 @@
# being taken by lower level opers against higher level opers.
# Specify the level as the 'level' parameter of the <type> tag.
# This module is oper-only.
-#<module name="m_operlevels.so">
+#<module name="operlevels">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Oper modes module: Allows you to specify modes to add/remove on oper.
# Specify the modes as the 'modes' parameter of the <type> tag
# and/or as the 'modes' parameter of the <oper> tag.
-# This module is oper-only. For the user equivalent, see m_conn_umodes.
-#<module name="m_opermodes.so">
+# This module is oper-only. For the user equivalent, see the
+# conn_umodes module.
+#<module name="opermodes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Password forwarding module: Forwards a password users can send on
# connect to the specified client below. The client is usually NickServ
# and this module is usually used to authenticate users with NickServ
# using their connect password.
-#<module name="m_passforward.so">
+#<module name="passforward">
<passforward
# nick: nick to forward connect passwords to.
@@ -1347,8 +1349,8 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Password hash module: Allows hashed passwords to be used.
-# To be useful, a hashing module like m_sha256.so also needs to be loaded.
-#<module name="m_password_hash.so">
+# To be useful, a hashing module like sha256 also needs to be loaded.
+#<module name="password_hash">
#
#-#-#-#-#-#-#-#-#-# PASSWORD HASH CONFIGURATION #-#-#-#-#-#-#-#-#-#-#-#
#
@@ -1372,7 +1374,7 @@
# PBKDF2 module: Allows other modules to generate PBKDF2 hashes,
# usually for cryptographic uses and security.
# This module relies on other hash providers (e.g. SHA256).
-#<module name="m_pbkdf2.so">
+#<module name="pbkdf2">
#
# iterations: Iterations the hashing function runs when generating new
# hashes.
@@ -1389,9 +1391,9 @@
# channels -may- need support from your Services package to function
# properly with them. This adds channel mode +P.
# This module is oper-only.
-#<module name="m_permchannels.so">
+#<module name="permchannels">
#
-# If you like, m_permchannels can write a config file of permanent channels
+# If you like, this module can write a config file of permanent channels
# whenever +P is set, unset, or the topic/modes on a +P channel is changed.
# If you want to do this, set the filename below, and uncomment the include.
#
@@ -1410,11 +1412,11 @@
# This module is in extras. Re-run configure with:
# ./configure --enable-extras=m_pgsql.cpp
# and run make install, then uncomment this module to enable it.
-#<module name="m_pgsql.so">
+#<module name="pgsql">
#
#-#-#-#-#-#-#-#-#-#-#-#- SQL CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#-#
# #
-# m_pgsql.so is more complex than described here, see the wiki for #
+# pgsql is more complex than described here, see the wiki for #
# more: http://wiki.inspircd.org/Modules/pgsql #
#
#<database module="pgsql" name="mydb" user="myuser" pass="mypass" host="localhost" id="my_database" ssl="no">
@@ -1422,18 +1424,18 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Muteban: Implements extended ban 'm', which stops anyone matching
# a mask like +b m:nick!user@host from speaking on channel.
-#<module name="m_muteban.so">
+#<module name="muteban">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Random quote module: Provides a random quote on connect.
# NOTE: Some of these may mimic fatal errors and confuse users and
# opers alike - BEWARE!
-#<module name="m_randquote.so">
+#<module name="randquote">
#
#-#-#-#-#-#-#-#-#-#- RANDOMQUOTES CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# #
-# Optional - If you specify to use the m_randquote.so module, then #
-# specify below the path to the quotes file. #
+# Optional - If you specify to use the randquote module, then specify #
+# below the path to the quotes file. #
# #
#<randquote file="quotes.txt">
@@ -1447,37 +1449,37 @@
# This also breaks linking to servers that do not have the option. #
# This defaults to false for the 2.0 version, it will be enabled in #
# all the future versions. #
-#<module name="m_redirect.so">
+#<module name="redirect">
#<redirect antiredirect="true">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Regular expression provider for glob or wildcard (?/*) matching.
-# You must have at least 1 provider loaded to use m_filter or m_rline
+# You must have at least 1 provider loaded to use the filter or rline
# modules. This module has no additional requirements, as it uses the
# matching already present in InspIRCd core.
-#<module name="m_regex_glob.so">
+#<module name="regex_glob">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Regular expression provider for PCRE (Perl-Compatible Regular
# Expressions). You need libpcre installed to compile and load this
-# module. You must have at least 1 provider loaded to use m_filter or
-# m_rline.
-#<module name="m_regex_pcre.so">
+# module. You must have at least 1 provider loaded to use the filter or
+# rline modules.
+#<module name="regex_pcre">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Regular Expression Provider for RE2 Regular Expressions.
# You need libre2 installed and in your include/library paths in order
# to compile and load this module.
-#<module name="m_regex_re2.so">
+#<module name="regex_re2">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Regular expression provider for POSIX regular expressions.
# You shouldn't need any additional libraries on a POSIX-compatible
# system (i.e.: any Linux, BSD, but not Windows). You must have at
-# least 1 provider loaded to use m_filter or m_rline.
+# least 1 provider loaded to use filter or rline.
# On POSIX-compliant systems, regex syntax can be found by using the
# command: 'man 7 regex'.
-#<module name="m_regex_posix.so">
+#<module name="regex_posix">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Regular expression provider for C++11 std::regex regular expressions.
@@ -1487,7 +1489,7 @@
# You should verify that std::regex is supported by your setup before
# using this module, as it may compile normally but won't do anything
# on some implementations.
-#<module name="m_regex_stdlib.so">
+#<module name="regex_stdlib">
#
# Specify the regular expression engine to use here. Valid settings are
# bre, ere, awk, grep, egrep, ecmascript (default if not specified).
@@ -1499,7 +1501,7 @@
# if you are most familiar with the syntax of /SPAMFILTER from there,
# this is the provider you want. You need libtre installed in order
# to compile and load this module.
-#<module name="m_regex_tre.so">
+#<module name="regex_tre">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Registered users only channel creation module. If enabled, only
@@ -1507,12 +1509,12 @@
#
# You probably *DO NOT* want to load this module on a public network.
#
-#<module name="m_regonlycreate.so">
+#<module name="regonlycreate">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Remove module: Adds the /REMOVE command which is a peaceful
# alternative to /KICK.
-#<module name="m_remove.so">
+#<module name="remove">
#
# supportnokicks: If true, /REMOVE is not allowed on channels where the
# nokicks (+Q) mode is set. Defaults to false.
@@ -1538,25 +1540,25 @@
# before they are checked, resulting in less CPU usage. Increasing this beyond 512
# doesn't have any effect, as the maximum length of a message on IRC cannot exceed that.
#<repeat maxbacklog="20" maxlines="20" maxdistance="50" maxsecs="0" size="512">
-#<module name="m_repeat.so">
+#<module name="repeat">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Restricted channels module: Allows only opers to create channels.
#
# You probably *DO NOT* want to load this module on a public network.
#
-#<module name="m_restrictchans.so">
+#<module name="restrictchans">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Restrict message module: Allows users to only message opers.
#
# You probably *DO NOT* want to load this module on a public network.
#
-#<module name="m_restrictmsg.so">
+#<module name="restrictmsg">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# R-Line module: Ban users through regular expression patterns.
-#<module name="m_rline.so">
+#<module name="rline">
#
#-#-#-#-#-#-#-#-#-#-#-#- RLINE CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#-#
#
@@ -1566,7 +1568,7 @@
# Also, this is where you set what Regular Expression engine is to be
# used. If you ever change it while running, all of your R-Lines will
# be wiped. This is the regex engine used by all R-Lines set, and
-# m_regex_<engine>.so must be loaded, or rline will be non-functional
+# regex_<engine> must be loaded, or rline will be non-functional
# until you load it or change the engine to one that is loaded.
#
#<rline matchonnickchange="yes" engine="pcre">
@@ -1584,7 +1586,7 @@
# Allows channel mods to remove list modes en masse.
# Syntax: /rmode <channel> <mode> [pattern]
# E.g. '/rmode #Channel b m:*' will remove all mute-extbans on the channel.
-#<module name="m_rmode.so">
+#<module name="rmode">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SAJOIN module: Adds the /SAJOIN command which forcibly joins a user
@@ -1593,14 +1595,14 @@
# To use, SAJOIN must be in one of your oper class blocks.
# Opers need the users/sajoin-others priv to be able to /SAJOIN users
# other than themselves.
-#<module name="m_sajoin.so">
+#<module name="sajoin">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SAKICK module: Adds the /SAKICK command which kicks a user from the
# given channel.
# This module is oper-only.
# To use, SAKICK must be in one of your oper class blocks.
-#<module name="m_sakick.so">
+#<module name="sakick">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SAMODE module: Adds the /SAMODE command which allows server operators
@@ -1608,45 +1610,45 @@
# channel priviliges. Also allows changing user modes for any user.
# This module is oper-only.
# To use, SAMODE must be in one of your oper class blocks.
-#<module name="m_samode.so">
+#<module name="samode">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SANICK module: Adds the /SANICK command which allows opers to change
# users' nicks.
# This module is oper-only.
# To use, SANICK must be in one of your oper class blocks.
-#<module name="m_sanick.so">
+#<module name="sanick">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SAPART module: Adds the /SAPART command which forcibly parts a user
# from a channel.
# This module is oper-only.
# To use, SAPART must be in one of your oper class blocks.
-#<module name="m_sapart.so">
+#<module name="sapart">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SAQUIT module: Adds the /SAQUIT command which forcibly quits a user.
# This module is oper-only.
# To use, SAQUIT must be in one of your oper class blocks.
-#<module name="m_saquit.so">
+#<module name="saquit">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SATOPIC module: Adds the /SATOPIC command which allows changing the
# topic on a channel without requiring any channel priviliges.
# This module is oper-only.
# To use, SATOPIC must be in one of your oper class blocks.
-#<module name="m_satopic.so">
+#<module name="satopic">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SASL authentication module: Provides support for IRC Authentication
-# Layer via AUTHENTICATE. Note: You also need to have m_cap.so loaded
+# Layer via AUTHENTICATE. Note: You also need to have cap loaded
# for SASL to work.
-#<module name="m_sasl.so">
+#<module name="sasl">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Secure list module: Prevent /LIST in the first minute of connection,
# crippling most spambots and trojan spreader bots.
-#<module name="m_securelist.so">
+#<module name="securelist">
#
#-#-#-#-#-#-#-#-#-# SECURELIST CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#-#
# #
@@ -1666,19 +1668,19 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Servprotect module: Provides support for Austhex style +k /
# UnrealIRCD +S services mode.
-#<module name="m_servprotect.so">
+#<module name="servprotect">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# See nicks module: Adds snomask +n and +N which show local and remote
# nick changes.
# This module is oper-only.
-#<module name="m_seenicks.so">
+#<module name="seenicks">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Set idle module: Adds a command for opers to change their idle time.
# This module is oper-only.
# To use, SETIDLE must be in one of your oper class blocks.
-#<module name="m_setidle.so">
+#<module name="setidle">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Services support module: Adds several usermodes such as +R and +M.
@@ -1693,36 +1695,36 @@
# +b R: (stop matching account names from joining)
# +b U:n!u@h (blocks matching unregistered users)
#
-#<module name="m_services_account.so">
+#<module name="services_account">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Sethost module: Adds the /SETHOST command.
# This module is oper-only.
# To use, SETHOST must be in one of your oper class blocks.
-# See m_chghost for how to customise valid chars for hostnames.
-#<module name="m_sethost.so">
+# See the chghost module for how to customise valid chars for hostnames.
+#<module name="sethost">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Setident module: Adds the /SETIDENT command.
# This module is oper-only.
# To use, SETIDENT must be in one of your oper class blocks.
-#<module name="m_setident.so">
+#<module name="setident">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SETNAME module: Adds the /SETNAME command.
-#<module name="m_setname.so">
+#<module name="setname">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Serverban: Implements extended ban 's', which stops anyone connected
# to a server matching a mask like +b s:server.mask.here from joining.
-#<module name="m_serverban.so">
+#<module name="serverban">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Showfile: Provides support for showing a text file to users when #
# they enter a command. #
# This module adds one command for each <showfile> tag that shows the #
# given file to the user as a series of messages or numerics. #
-#<module name="m_showfile.so"> #
+#<module name="showfile"> #
# #
#-#-#-#-#-#-#-#-#-#-# SHOWFILE CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#-#
# #
@@ -1758,7 +1760,7 @@
# Show whois module: Adds the +W usermode which allows opers to see
# when they are /WHOIS'd.
# This module is oper-only by default.
-#<module name="m_showwhois.so">
+#<module name="showwhois">
#
# If you wish, you may also let users set this mode. Only opers with the
# users/auspex priv will see real hosts of people, though.
@@ -1773,7 +1775,7 @@
# executing all except configured commands.
# This module is oper-only.
# To use, SHUN must be in one of your oper class blocks.
-#<module name="m_shun.so">
+#<module name="shun">
#
# You may also configure which commands you wish a user to be able to
# perform when shunned. It should be noted that if a shunned user
@@ -1790,25 +1792,25 @@
# channel mode +z and the 'z' extban which matches SSL client
# certificate fingerprints.
# Does not do anything useful without a working SSL module (see below).
-#<module name="m_sslmodes.so">
+#<module name="sslmodes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# GnuTLS SSL module: Adds support for SSL connections using GnuTLS,
# if enabled. You must answer 'yes' in ./configure when asked or
# manually symlink the source for this module from the directory
# src/modules/extra, if you want to enable this, or it will not load.
-#<module name="m_ssl_gnutls.so">
+#<module name="ssl_gnutls">
#
#-#-#-#-#-#-#-#-#-#-#- GNUTLS CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
-# m_ssl_gnutls.so is too complex to describe here, see the wiki: #
+# ssl_gnutls is too complex to describe here, see the wiki: #
# http://wiki.inspircd.org/Modules/ssl_gnutls #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SSL info module: Allows users to retrieve information about other
# users' peer SSL certificates and keys. This can be used by client
-# scripts to validate users. For this to work, one of m_ssl_gnutls.so
-# or m_ssl_openssl.so must be loaded. This module also adds the
+# scripts to validate users. For this to work, one of ssl_gnutls
+# or ssl_openssl must be loaded. This module also adds the
# "* <user> is using a secure connection" whois line, the ability for
# opers to use SSL cert fingerprints to verify their identity and the
# ability to force opers to use SSL connections in order to oper up.
@@ -1817,29 +1819,29 @@
# For how to use the oper features, please see the first example <oper> tag
# in opers.conf.example.
#
-#<module name="m_sslinfo.so">
+#<module name="sslinfo">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# OpenSSL SSL module: Adds support for SSL connections using OpenSSL,
# if enabled. You must answer 'yes' in ./configure when asked or symlink
# the source for this module from the directory src/modules/extra, if
# you want to enable this, or it will not load.
-#<module name="m_ssl_openssl.so">
+#<module name="ssl_openssl">
#
#-#-#-#-#-#-#-#-#-#-#- OPENSSL CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
-# m_ssl_openssl.so is too complex to describe here, see the wiki: #
+# ssl_openssl is too complex to describe here, see the wiki: #
# http://wiki.inspircd.org/Modules/ssl_openssl #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Strip color module: Adds channel mode +S that strips mIRC color
# codes from all messages sent to the channel.
-#<module name="m_stripcolor.so">
+#<module name="stripcolor">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Silence module: Adds support for the /SILENCE command, which allows
# users to have a server-side ignore list for their client.
-#<module name="m_silence.so">
+#<module name="silence">
#
# Set the maximum number of entries allowed on a user's silence list.
#<silence maxentries="32"
@@ -1854,12 +1856,12 @@
# ./configure --enable-extras=m_sqlite.cpp
# and run make install, then uncomment this module to enable it. #
#
-#<module name="m_sqlite3.so">
+#<module name="sqlite3">
#
#-#-#-#-#-#-#-#-#-#-#-#- SQL CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#-#
# #
-# m_sqlite.so is more complex than described here, see the wiki for #
-# more: http://wiki.inspircd.org/Modules/sqlite3 #
+# sqlite is more complex than described here, see the wiki for more #
+# info: http://wiki.inspircd.org/Modules/sqlite3 #
#
#<database module="sqlite" hostname="/full/path/to/database.db" id="anytext">
@@ -1870,11 +1872,11 @@
# ./configure --enable-extras=m_sqlauth.cpp
# and run make install, then uncomment this module to enable it.
#
-#<module name="m_sqlauth.so">
+#<module name="sqlauth">
#
#-#-#-#-#-#-#-#-#-#-#- SQLAUTH CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
-# m_sqlauth.so is too complex to describe here, see the wiki: #
+# sqlauth is too complex to describe here, see the wiki: #
# http://wiki.inspircd.org/Modules/sqlauth #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
@@ -1883,7 +1885,7 @@
# ./configure --enable-extras=m_sqloper.cpp
# and run make install, then uncomment this module to enable it.
#
-#<module name="m_sqloper.so">
+#<module name="sqloper">
#
#-#-#-#-#-#-#-#-#-#-#- SQLOPER CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
@@ -1897,13 +1899,13 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# StartTLS module: Implements STARTTLS, which allows clients #
# connected to non SSL enabled ports to enable SSL, if a proper SSL #
-# module is loaded (either m_ssl_gnutls or m_ssl_openssl). #
-#<module name="m_starttls.so">
+# module is loaded (either ssl_gnutls or ssl_openssl). #
+#<module name="starttls">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SVSHold module: Implements SVSHOLD. Like Q:Lines, but can only be #
# added/removed by Services. #
-#<module name="m_svshold.so">
+#<module name="svshold">
# SVSHOLD does not generate server notices by default, you can turn
# notices on by uncommenting the next line.
#<svshold silent="false">
@@ -1912,29 +1914,29 @@
# SWHOIS module: Allows you to add arbitrary lines to user WHOIS.
# This module is oper-only.
# To use, SWHOIS must be in one of your oper class blocks.
-#<module name="m_swhois.so">
+#<module name="swhois">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Test module: Enable this to create a command useful in testing
# flood control. To avoid accidental use on live networks, the server
# name must contain ".test" to load the module
-#<module name="m_testnet.so">
+#<module name="testnet">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Timed bans module: Adds timed channel bans with the /TBAN command.
-#<module name="m_timedbans.so">
+#<module name="timedbans">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Test line module: Adds the /TLINE command, used to test how many
# users a /GLINE or /ZLINE etc. would match.
# This module is oper-only.
# To use, TLINE must be in one of your oper class blocks.
-#<module name="m_tline.so">
+#<module name="tline">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Topiclock module: implements server-side topic locking to achieve deeper
# integration with services packages.
-#<module name="m_topiclock.so">
+#<module name="topiclock">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# UHNAMES support module: Adds support for the IRCX style UHNAMES
@@ -1942,23 +1944,23 @@
# each user, saving clients from doing a WHO on the channel.
# If a client does not support UHNAMES it will not enable it, this will
# not break incompatible clients.
-#<module name="m_uhnames.so">
+#<module name="uhnames">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Uninvite module: Adds the /UNINVITE command which lets users remove
# pending invites from channels without waiting for the user to join.
-#<module name="m_uninvite.so">
+#<module name="uninvite">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Userip module: Adds the /USERIP command.
# Allows users to query their own IP, also allows opers to query the IP
# of anyone else.
-#<module name="m_userip.so">
+#<module name="userip">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Vhost module: Adds the VHOST command which allows for adding virtual
# hosts which are accessible using a username and password in the config.
-#<module name="m_vhost.so">
+#<module name="vhost">
#
#-#-#-#-#-#-#-#-#-#-#- VHOST CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#-#
# #
@@ -1967,8 +1969,8 @@
# pass - Password for the vhost. #
# #
# hash - The hash for the specific user (optional) #
-# m_password_hash.so and a hashing module must be loaded #
-# for this to work. #
+# password_hash and a hashing module must be loaded for #
+# this to work. #
# #
# host - Vhost to set. #
#
@@ -1978,7 +1980,7 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Watch module: Adds the WATCH command, which is used by clients to
# maintain notify lists.
-#<module name="m_watch.so">
+#<module name="watch">
#
# Set the maximum number of entries on a user's watch list below.
#<watch maxentries="32">
@@ -1989,7 +1991,7 @@
# for two reasons: it keeps bans so users may not evade them, and on
# bigger networks, server connections will take less time as there will
# be a lot less bans to apply - as most of them will already be there.
-#<module name="m_xline_db.so">
+#<module name="xline_db">
# Specify the filename for the xline database here.
#<xlinedb filename="data/xline.db">
@@ -2001,8 +2003,8 @@
# | _ < __/ (_| | (_| | | | | | | | \__ \ | |_) | | |_|_| #
# |_| \_\___|\__,_|\__,_| |_| |_| |_|_|___/ |____/|_|\__(_) #
# #
-# To link servers to InspIRCd, you MUST load the m_spanningtree #
-# module. If you don't do this, server links will NOT work at all. #
+# To link servers to InspIRCd, you MUST load the spanningtree module. #
+# If you don't do this, server links will NOT work at all. #
# This is by design, to allow for the implementation of other linking #
# protocols in modules in the future. #
@@ -2011,4 +2013,4 @@
# tree protocol (see the READ THIS BIT section above).
# You will almost always want to load this.
#
-#<module name="m_spanningtree.so">
+#<module name="spanningtree">
diff --git a/docs/conf/modules/charybdis.conf.example b/docs/conf/modules/charybdis.conf.example
index 4143a378f..6f8171b41 100644
--- a/docs/conf/modules/charybdis.conf.example
+++ b/docs/conf/modules/charybdis.conf.example
@@ -1,6 +1,6 @@
-<module name="m_md5.so">
-<module name="m_sha256.so">
-<module name="m_alias.so">
+<module name="md5">
+<module name="sha256">
+<module name="alias">
<alias text="NICKSERV" replace="PRIVMSG NickServ :$2-" requires="NickServ" uline="yes">
<alias text="CHANSERV" replace="PRIVMSG ChanServ :$2-" requires="ChanServ" uline="yes">
<alias text="OPERSERV" replace="PRIVMSG OperServ :$2-" requires="OperServ" uline="yes" operonly="yes">
@@ -15,26 +15,26 @@
<alias text="MS" replace="PRIVMSG MemoServ :$2-" requires="MemoServ" uline="yes">
<alias text="ID" replace="PRIVMSG NickServ :IDENTIFY $2" requires="NickServ" uline="yes">
-<module name="m_banexception.so">
-<module name="m_banredirect.so">
-<module name="m_blockcolor.so">
-<module name="m_callerid.so">
+<module name="banexception">
+<module name="banredirect">
+<module name="blockcolor">
+<module name="callerid">
<callerid maxaccepts="16"
operoverride="no"
tracknick="no"
cooldown="60">
-<module name="m_cap.so">
-<module name="m_cban.so">
+<module name="cap">
+<module name="cban">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# CGI:IRC module: Adds support for automatic host changing in CGI:IRC
# (http://cgiirc.sourceforge.net).
-#<module name="m_cgiirc.so">
+#<module name="cgiirc">
#
#-#-#-#-#-#-#-#-#-#-#-# CGIIRC CONFIGURATION #-#-#-#-#-#-#-#-#-#-#-#-#
#
-# Optional - If you specify to use m_cgiirc, then you must specify one
+# Optional - If you specify to use cgiirc, then you must specify one
# or more cgihost tags which indicate authorised CGI:IRC servers which
# will be connecting to your network, and an optional cgiirc tag.
# For more information see: http://wiki.inspircd.org/Modules/cgiirc
@@ -68,13 +68,13 @@
# sessions maximum.
#
-<module name="m_chancreate.so">
+<module name="chancreate">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Channel names module: Allows disabling channels which have certain
# characters in the channel name such as bold, colorcodes, etc. which
# can be quite annoying and allow users to on occasion have a channel
# that looks like the name of another channel on the network.
-<module name="m_channames.so">
+<module name="channames">
<channames
# denyrange: characters or range of characters to deny in channel
@@ -85,16 +85,16 @@
# in channel names.
allowrange="">
-<module name="m_channelban.so">
-<module name="m_chghost.so">
+<module name="channelban">
+<module name="chghost">
<hostname charmap="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-_/0123456789">
-<module name="m_chgident.so">
-<module name="m_chgname.so">
-<module name="m_cloaking.so">
+<module name="chgident">
+<module name="chgname">
+<module name="cloaking">
#
#-#-#-#-#-#-#-#-#-#-#- CLOAKING CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
-# If you specify the m_cloaking.so module as above, you must define #
+# If you specify the cloaking module as above, you must define #
# cloak keys, and optionally a cloak prefix as shown below. The cloak #
# keys must be shared across the network for correct cloaking. #
# #
@@ -126,8 +126,8 @@
key="secret"
prefix="net-">
-<module name="m_close.so">
-<module name="m_conn_umodes.so">
+<module name="close">
+<module name="conn_umodes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Connectban: Provides IP connection throttling. Any IP range that connects
@@ -141,11 +141,11 @@
#<connectban threshold="10" duration="10m" ipv4cidr="32" ipv6cidr="128">
# This allows for 10 connections in an hour with a 10 minute ban if that is exceeded.
#
-#<module name="m_connectban.so">
+#<module name="connectban">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Connection throttle module.
-#<module name="m_connflood.so">
+#<module name="connflood">
#
#-#-#-#-#-#-#-#-#-#-#- CONTHROTTLE CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# seconds, maxconns - Amount of connections per <seconds>.
@@ -163,46 +163,46 @@
#<connflood seconds="30" maxconns="3" timeout="30"
# quitmsg="Throttled" bootwait="10">
-<module name="m_deaf.so">
-<module name="m_dnsbl.so">
-<module name="m_gecosban.so">
-<module name="m_globalload.so">
-<module name="m_ident.so">
+<module name="deaf">
+<module name="dnsbl">
+<module name="gecosban">
+<module name="globalload">
+<module name="ident">
<ident timeout="1">
-<module name="m_inviteexception.so">
-<module name="m_joinflood.so">
-<module name="m_knock.so">
-<module name="m_namesx.so">
-<module name="m_operchans.so">
-<module name="m_operlog.so">
-<module name="m_opermodes.so">
-<module name="m_password_hash.so">
-<module name="m_permchannels.so">
-<module name="m_muteban.so">
-<module name="m_redirect.so">
+<module name="inviteexception">
+<module name="joinflood">
+<module name="knock">
+<module name="namesx">
+<module name="operchans">
+<module name="operlog">
+<module name="opermodes">
+<module name="password_hash">
+<module name="permchannels">
+<module name="muteban">
+<module name="redirect">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Regular expression provider for glob or wildcard (?/*) matching.
-# You must have at least 1 provider loaded to use m_filter or m_rline
-# modules. This module has no additional requirements, as it uses the
-# matching already present in InspIRCd core.
-#<module name="m_regex_glob.so">
+# You must have at least 1 provider loaded to use the filter or the
+# rline modules. This module has no additional requirements, as it uses
+# the matching already present in InspIRCd core.
+#<module name="regex_glob">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Regular expression provider for PCRE (Perl-Compatible Regular
# Expressions). You need libpcre installed to compile and load this
-# module. You must have at least 1 provider loaded to use m_filter or
-# m_rline.
-#<module name="m_regex_pcre.so">
+# module. You must have at least 1 provider loaded to use the filter or
+# the rline module.
+#<module name="regex_pcre">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Regular expression provider for POSIX regular expressions.
# You shouldn't need any additional libraries on a POSIX-compatible
# system (ie: any Linux, BSD, but not Windows). You must have at least
-# 1 provider loaded to use m_filter or m_rline.
+# 1 provider loaded to use the filter or the rline module.
# On POSIX-compliant systems, regex syntax can be found by using the
# command: 'man 7 regex'.
-#<module name="m_regex_posix.so">
+#<module name="regex_posix">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Registered users only channel creation
@@ -210,11 +210,11 @@
#
# You probably *DO NOT* want to load this module on a public network.
#
-#<module name="m_regonlycreate.so">
+#<module name="regonlycreate">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Ban users through regular expression patterns
-#<module name="m_rline.so">
+#<module name="rline">
#
#-#-#-#-#-#-#-#-#-#-#-#- RLINE CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#-#
#
@@ -224,7 +224,7 @@
# Also, this is where you set what Regular Expression engine is to be
# used. If you ever change it while running, all of your R-Lines will be
# wiped. This is the regex engine used by all R-Lines set, and
-# m_regex_<engine>.so must be loaded, or rline will be nonfunctional
+# regex_<engine> must be loaded, or rline will be nonfunctional
# until you load it or change the engine to one that is loaded.
#
#<rline matchonnickchange="yes" engine="pcre">
@@ -237,12 +237,12 @@
# use glob. For this reason, is recommended to use a real regex engine
# so that at least \s or [[:space:]] is available.
-<module name="m_sasl.so">
-<module name="m_servprotect.so">
-<module name="m_services_account.so">
-<module name="m_sethost.so">
-<module name="m_serverban.so">
-<module name="m_showwhois.so">
+<module name="sasl">
+<module name="servprotect">
+<module name="services_account">
+<module name="sethost">
+<module name="serverban">
+<module name="showwhois">
<showwhois opersonly="yes" showfromopers="yes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
@@ -250,25 +250,25 @@
# channel mode +z and the 'z' extban which matches SSL client
# certificate fingerprints.
# Does not do anything useful without a working SSL module (see below).
-#<module name="m_sslmodes.so">
+#<module name="sslmodes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# GnuTLS SSL module: Adds support for SSL connections using GnuTLS,
# if enabled. You must answer 'yes' in ./configure when asked or
# manually symlink the source for this module from the directory
# src/modules/extra, if you want to enable this, or it will not load.
-#<module name="m_ssl_gnutls.so">
+#<module name="ssl_gnutls">
#
#-#-#-#-#-#-#-#-#-#-#- GNUTLS CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
-# m_ssl_gnutls.so is too complex to describe here, see the wiki: #
+# ssl_gnutls is too complex to describe here, see the wiki: #
# http://wiki.inspircd.org/Modules/ssl_gnutls #
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# SSL Info module: Allows users to retrieve information about other
# user's peer SSL certificates and keys. This can be used by client
-# scripts to validate users. For this to work, one of m_ssl_gnutls.so
-# or m_ssl_openssl.so must be loaded. This module also adds the
+# scripts to validate users. For this to work, one of ssl_gnutls
+# or ssl_openssl must be loaded. This module also adds the
# "* <user> is using a secure connection" whois line, the ability for
# opers to use SSL cert fingerprints to verify their identity and the
# ability to force opers to use SSL connections in order to oper up.
@@ -277,26 +277,26 @@
# For how to use the oper features, please see the first example <oper> tag
# in opers.conf.example.
#
-#<module name="m_sslinfo.so">
+#<module name="sslinfo">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# OpenSSL SSL module: Adds support for SSL connections using OpenSSL,
# if enabled. You must answer 'yes' in ./configure when asked or symlink
# the source for this module from the directory src/modules/extra, if
# you want to enable this, or it will not load.
-#<module name="m_ssl_openssl.so">
+#<module name="ssl_openssl">
#
#-#-#-#-#-#-#-#-#-#-#- OPENSSL CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
-# m_ssl_openssl.so is too complex to describe here, see the wiki: #
+# ssl_openssl is too complex to describe here, see the wiki: #
# http://wiki.inspircd.org/Modules/ssl_openssl #
-<module name="m_stripcolor.so">
-<module name="m_svshold.so">
-<module name="m_tline.so">
-<module name="m_uhnames.so">
-<module name="m_watch.so">
+<module name="stripcolor">
+<module name="svshold">
+<module name="tline">
+<module name="uhnames">
+<module name="watch">
<watch maxentries="32">
-<module name="m_xline_db.so">
+<module name="xline_db">
-<module name="m_spanningtree.so">
+<module name="spanningtree">
diff --git a/docs/conf/modules/unrealircd.conf.example b/docs/conf/modules/unrealircd.conf.example
index ec3a5f8d1..102307661 100644
--- a/docs/conf/modules/unrealircd.conf.example
+++ b/docs/conf/modules/unrealircd.conf.example
@@ -1,8 +1,8 @@
-<module name="m_md5.so">
-<module name="m_sha256.so">
+<module name="md5">
+<module name="sha256">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Alias module: Allows you to define server-side command aliases.
-<module name="m_alias.so">
+<module name="alias">
<fantasy prefix="!" allowbots="no">
# Aliases
<alias text="NICKSERV" replace="PRIVMSG NickServ :$2-" requires="NickServ" uline="yes">
@@ -35,28 +35,28 @@
#<alias text="NICKSERV" format=":IDENTIFY *" replace="PRIVMSG NickServ :IDENTIFY $3-"
# requires="NickServ" uline="yes">
-<module name="m_allowinvite.so">
-<module name="m_alltime.so">
-<module name="m_auditorium.so">
+<module name="allowinvite">
+<module name="alltime">
+<module name="auditorium">
<auditorium showops="yes" operoverride="yes">
-<module name="m_banexception.so">
-<module name="m_blockcaps.so">
+<module name="banexception">
+<module name="blockcaps">
<blockcaps percent="50"
minlen="5"
capsmap="ABCDEFGHIJKLMNOPQRSTUVWXYZ! ">
-<module name="m_blockcolor.so">
-<module name="m_botmode.so">
-<module name="m_censor.so">
+<module name="blockcolor">
+<module name="botmode">
+<module name="censor">
<include file="inspircd.censor.example">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# CGI:IRC module: Adds support for automatic host changing in CGI:IRC
# (http://cgiirc.sourceforge.net).
-#<module name="m_cgiirc.so">
+#<module name="cgiirc">
#
#-#-#-#-#-#-#-#-#-#-#-# CGIIRC CONFIGURATION #-#-#-#-#-#-#-#-#-#-#-#-#
#
-# Optional - If you specify to use m_cgiirc, then you must specify one
+# Optional - If you specify to use cgiirc, then you must specify one
# or more cgihost tags which indicate authorised CGI:IRC servers which
# will be connecting to your network, and an optional cgiirc tag.
# For more information see: http://wiki.inspircd.org/Modules/cgiirc
@@ -90,42 +90,41 @@
# sessions maximum.
#
-<module name="m_chanfilter.so">
+<module name="chanfilter">
<chanfilter hidemask="yes">
-<module name="m_check.so">
-<module name="m_chghost.so">
+<module name="check">
+<module name="chghost">
<hostname charmap="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-_/0123456789">
-<module name="m_chgident.so">
-<module name="m_chgname.so">
-<module name="m_cloaking.so">
+<module name="chgident">
+<module name="chgname">
+<module name="cloaking">
<cloak mode="half"
key="secret"
prefix="net-">
-<module name="m_close.so">
-<module name="m_clones.so">
-<module name="m_commonchans.so">
+<module name="close">
+<module name="clones">
+<module name="commonchans">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Auto join on connect module: Allows you to force users to join one
# or more channels automatically upon connecting to the server.
-#<module name="m_conn_join.so">
+#<module name="conn_join">
#
#-#-#-#-#-#-#-#-#-#-#-#- CONNJOIN CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
#
-# If you have m_conn_join.so loaded, you can configure it using the
-# follow values:
+# If you have the conn_join module loaded, you can configure it below:
#
#<autojoin channel="#one,#two,#three">
-<module name="m_conn_umodes.so">
-<module name="m_cycle.so">
+<module name="conn_umodes">
+<module name="cycle">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Connection throttle module.
-#<module name="m_connflood.so">
+#<module name="connflood">
#
#-#-#-#-#-#-#-#-#-#-#- CONTHROTTLE CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# seconds, maxconns - Amount of connections per <seconds>.
@@ -145,7 +144,7 @@
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# DCCALLOW module: Adds the /DCCALLOW command.
-<module name="m_dccallow.so">
+<module name="dccallow">
#
#-#-#-#-#-#-#-#-#-#-#- DCCALLOW CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# blockchat - Whether to block DCC CHAT as well as DCC SEND
@@ -164,29 +163,29 @@
#
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
-<module name="m_deaf.so">
-<module name="m_denychans.so">
+<module name="deaf">
+<module name="denychans">
#<badchan name="#gods*" allowopers="yes" reason="Tortoises!"> #
#<badchan name="#heaven" redirect="#hell" reason="Nice try!"> #
-<module name="m_devoice.so">
+<module name="devoice">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Filter module: Provides message filtering, similar to SPAMFILTER.
-<module name="m_filter.so">
+<module name="filter">
# #
-# This module depends upon a regex provider such as m_regex_pcre or #
-# m_regex_glob to function. You must specify which of these you want #
-# m_filter to use via the tag below. #
+# This module depends upon a regex provider such as regex_pcre or #
+# regex_glob to function. You must specify which of these you want #
+# the filter module to use via the tag below. #
# #
# Valid engines are: #
# #
-# glob - Glob patterns, provided via m_regex_glob. #
-# pcre - PCRE regexps, provided via m_regex_pcre, needs libpcre. #
-# tre - TRE regexps, provided via m_regex_tre, requires libtre. #
-# posix - POSIX regexps, provided via m_regex_posix, not available #
+# glob - Glob patterns, provided via regex_glob. #
+# pcre - PCRE regexps, provided via regex_pcre, needs libpcre. #
+# tre - TRE regexps, provided via regex_tre, requires libtre. #
+# posix - POSIX regexps, provided via regex_posix, not available #
# on Windows, no dependencies on other operating systems. #
-# stdlib - stdlib regexps, provided via m_regex_stdlib, see comment #
+# stdlib - stdlib regexps, provided via regex_stdlib, see comment #
# at the <module> tag for info on availability. #
# #
<filteropts engine="glob">
@@ -199,47 +198,48 @@
#
#-#-#-#-#-#-#-#-#-#-#- FILTER CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
-# Optional - If you specify to use the m_filter module, then #
+# Optional - If you specify to use the filter module, then #
# specfiy below the path to the filter.conf file, or define some #
# <filter> tags. #
# #
#<include file="filter.conf">
-<module name="m_gecosban.so">
-<module name="m_globops.so">
-<module name="m_globalload.so">
-<module name="m_halfop.so">
-<module name="m_helpop.so">
+<module name="gecosban">
+<module name="globops">
+<module name="globalload">
+<module name="halfop">
+<module name="helpop">
<include file="inspircd.helpop-full.example">
-<module name="m_hidechans.so">
+<module name="hidechans">
<hidechans affectsopers="false">
-<module name="m_hideoper.so">
-<module name="m_ident.so">
+<module name="hideoper">
+<module name="ident">
<ident timeout="1">
-<module name="m_inviteexception.so">
-<module name="m_joinflood.so">
-<module name="m_jumpserver.so">
-<module name="m_knock.so">
-<module name="m_messageflood.so">
-<module name="m_namesx.so">
-<module name="m_nickflood.so">
-<module name="m_noctcp.so">
-<module name="m_nokicks.so">
-<module name="m_nonicks.so">
-<module name="m_nopartmsg.so">
-<module name="m_nonotice.so">
-<module name="m_operchans.so">
+<module name="inviteexception">
+<module name="joinflood">
+<module name="jumpserver">
+<module name="knock">
+<module name="messageflood">
+<module name="namesx">
+<module name="nickflood">
+<module name="noctcp">
+<module name="nokicks">
+<module name="nonicks">
+<module name="nopartmsg">
+<module name="nonotice">
+<module name="operchans">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Oper join module: Auto-joins opers to a channel upon oper-up.
-# This module is oper-only. For the user equivalent, see m_conn_join.
-<module name="m_operjoin.so">
+# This module is oper-only. For the user equivalent, see the conn_join
+# module.
+<module name="operjoin">
#
#-#-#-#-#-#-#-#-#-#-# OPERJOIN CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# #
-# If you are using the m_operjoin.so module, specify options here: #
+# If you are using the operjoin module, specify options here: #
# #
# channel - The channel name to join, can also be a comma #
# separated list eg. "#channel1,#channel2". #
@@ -254,52 +254,52 @@
#
#<type name="Helper" autojoin="#help" classes="...">
-<module name="m_operlog.so">
+<module name="operlog">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Oper MOTD module: Provides support for separate message of the day
# on oper-up.
# This module is oper-only.
-#<module name="m_opermotd.so">
+#<module name="opermotd">
#
#-#-#-#-#-#-#-#-#-#-# OPERMOTD CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# #
-# If you are using the m_opermotd.so module, specify the motd here #
+# If you are using the opermotd module, specify the motd here #
# #
# onoper - If on, the message is sent on /OPER, otherwise it's #
# only sent when /OPERMOTD is used. #
# #
#<opermotd file="oper.motd" onoper="yes">
-<module name="m_override.so">
+<module name="override">
#-#-#-#-#-#-#-#-#-#-# OVERRIDE CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#
# #
-# m_override.so is too complex to describe here, see the wiki: #
+# The override module is too complex to describe here, see the wiki: #
# http://wiki.inspircd.org/Modules/override #
-<module name="m_operlevels.so">
-<module name="m_opermodes.so">
-<module name="m_password_hash.so">
-<module name="m_muteban.so">
+<module name="operlevels">
+<module name="opermodes">
+<module name="password_hash">
+<module name="muteban">
-<module name="m_redirect.so">
-<module name="m_regex_glob.so">
+<module name="redirect">
+<module name="regex_glob">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Regular expression provider for PCRE (Perl-Compatible Regular
# Expressions). You need libpcre installed to compile and load this
-# module. You must have at least 1 provider loaded to use m_filter or
-# m_rline.
-#<module name="m_regex_pcre.so">
+# module. You must have at least 1 provider loaded to use the filter
+# or the rline module.
+#<module name="regex_pcre">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Regular expression provider for POSIX Regular Expressions.
# You shouldn't need any additional libraries on a POSIX-compatible
# system (ie: any Linux, BSD, but not Windows). You must have at least
-# 1 provider loaded to use m_filter or m_rline.
+# 1 provider loaded to use the filter or rline module.
# On POSIX-compliant systems, regex syntax can be found by using the
# command: 'man 7 regex'.
-#<module name="m_regex_posix.so">
+#<module name="regex_posix">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Regular expression provider for TRE Regular Expressions.
@@ -307,7 +307,7 @@
# if you are most familiar with the syntax of /spamfilter from there,
# this is the provider you want. You need libtre installed in order
# to compile and load this module.
-#<module name="m_regex_tre.so">
+#<module name="regex_tre">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Registered users only channel creation module. If enabled, only
@@ -315,77 +315,77 @@
#
# You probably *DO NOT* want to load this module on a public network.
#
-#<module name="m_regonlycreate.so">
+#<module name="regonlycreate">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Restricted channels module: Allows only opers to create channels.
#
# You probably *DO NOT* want to load this module on a public network.
#
-#<module name="m_restrictchans.so">
+#<module name="restrictchans">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# Restrict message module: Allows users to only message opers.
#
# You probably *DO NOT* want to load this module on a public network.
#
-#<module name="m_restrictmsg.so">
-
-<module name="m_sajoin.so">
-<module name="m_sakick.so">
-<module name="m_samode.so">
-<module name="m_sanick.so">
-<module name="m_sapart.so">
-<module name="m_saquit.so">
-<module name="m_satopic.so">
-<module name="m_servprotect.so">
-<module name="m_seenicks.so">
-<module name="m_setidle.so">
-<module name="m_services_account.so">
-<module name="m_sethost.so">
-<module name="m_setident.so">
-<module name="m_setname.so">
-<module name="m_showwhois.so">
+#<module name="restrictmsg">
+
+<module name="sajoin">
+<module name="sakick">
+<module name="samode">
+<module name="sanick">
+<module name="sapart">
+<module name="saquit">
+<module name="satopic">
+<module name="servprotect">
+<module name="seenicks">
+<module name="setidle">
+<module name="services_account">
+<module name="sethost">
+<module name="setident">
+<module name="setname">
+<module name="showwhois">
<showwhois opersonly="yes" showfromopers="yes">
-<module name="m_shun.so">
+<module name="shun">
<shun enabledcommands="PING PONG QUIT PART JOIN" notifyuser="no" affectopers="no">
-<module name="m_sslmodes.so">
+<module name="sslmodes">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# GnuTLS SSL module: Adds support for SSL connections using GnuTLS,
# if enabled. You must answer 'yes' in ./configure when asked or symlink
# the source for this module from the directory src/modules/extra, if
# you want to enable this, or it will not load.
-#<module name="m_ssl_gnutls.so">
+#<module name="ssl_gnutls">
#
#-#-#-#-#-#-#-#-#-#-#- GNUTLS CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
-# m_ssl_gnutls.so is too complex to describe here, see the wiki: #
+# ssl_gnutls is too complex to describe here, see the wiki: #
# http://wiki.inspircd.org/Modules/ssl_gnutls #
-<module name="m_sslinfo.so">
+<module name="sslinfo">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
# OpenSSL SSL module: Adds support for SSL connections using OpenSSL,
# if enabled. You must answer 'yes' in ./configure when asked or symlink
# the source for this module from the directory src/modules/extra, if
# you want to enable this, or it will not load.
-#<module name="m_ssl_openssl.so">
+#<module name="ssl_openssl">
#
#-#-#-#-#-#-#-#-#-#-#- OPENSSL CONFIGURATION -#-#-#-#-#-#-#-#-#-#-#-#
# #
-# m_ssl_openssl.so is too complex to describe here, see the wiki: #
+# ssl_openssl is too complex to describe here, see the wiki: #
# http://wiki.inspircd.org/Modules/ssl_openssl #
-<module name="m_stripcolor.so">
-<module name="m_svshold.so">
-<module name="m_swhois.so">
-<module name="m_tline.so">
-<module name="m_uhnames.so">
-<module name="m_userip.so">
-<module name="m_watch.so">
+<module name="stripcolor">
+<module name="svshold">
+<module name="swhois">
+<module name="tline">
+<module name="uhnames">
+<module name="userip">
+<module name="watch">
<watch maxentries="32">
-<module name="m_spanningtree.so">
+<module name="spanningtree">
diff --git a/docs/conf/opers.conf.example b/docs/conf/opers.conf.example
index 3a6158f2c..3ede475f6 100644
--- a/docs/conf/opers.conf.example
+++ b/docs/conf/opers.conf.example
@@ -68,7 +68,7 @@
# modes: User modes besides +o that are set on an oper of this type
# when they oper up. Used for snomasks and other things.
- # Requires that m_opermodes.so be loaded.
+ # Requires the opermodes module be loaded.
modes="+s +cCqQ">
<type name="GlobalOp" classes="SACommands OperChat BanControl HostCloak ServerLink" vhost="ircop.omega.example.org">
@@ -97,26 +97,26 @@
host="attila@inspircd.org *@2001:db8::/32"
# ** ADVANCED ** This option is disabled by default.
- # fingerprint: When using the m_sslinfo module, you may specify
+ # fingerprint: When using the sslinfo module, you may specify
# a key fingerprint here. This can be obtained by using the /sslinfo
# command while the module is loaded, and is also noticed on connect.
# This enhances security by verifying that the person opering up has
# a matching SSL client certificate, which is very difficult to
# forge (impossible unless preimage attacks on the hash exist).
- # If m_sslinfo isn't loaded, this option will be ignored.
+ # If the sslinfo module isn't loaded, this option will be ignored.
#fingerprint="67cb9dc013248a829bb2171ed11becd4"
# autologin: If an SSL certificate fingerprint for this oper is specified,
# you can have the oper block automatically log in. This moves all security
# of the oper block to the protection of the client certificate, so be sure
- # that the private key is well-protected! Requires m_sslinfo.
+ # that the private key is well-protected! Requires the sslinfo module.
#autologin="on"
# sslonly: If on, this oper can only oper up if they're using a SSL connection.
# Setting this option adds a decent bit of security. Highly recommended
# if the oper is on wifi, or specifically, unsecured wifi. Note that it
# is redundant to specify this option if you specify a fingerprint.
- # This setting only takes effect if m_sslinfo is loaded.
+ # This setting only takes effect if the sslinfo module is loaded.
#sslonly="yes"
# vhost: Overrides the vhost in the type block. Class and modes may also
@@ -142,17 +142,16 @@
name="Adam"
# hash: What hash this password is hashed with.
- # Requires the module for selected hash (m_md5.so, m_sha256.so
- # or m_ripemd160.so) be loaded and the password hashing module
- # (m_password_hash.so) loaded.
+ # Requires the module for selected hash (md5, sha256 or ripemd160)
+ # be loaded and the password hashing module (password_hash) loaded.
# Options here are: "md5", "sha256" and "ripemd160", or one of
# these prefixed with "hmac-", e.g.: "hmac-sha256".
# Create hashed passwords with: /mkpasswd <hash> <password>
hash="hmac-sha256"
# password: A hash of the password (see above option) hashed
- # with /mkpasswd <hash> <password>. See m_password_hash in modules.conf
- # for more information about password hashing.
+ # with /mkpasswd <hash> <password>. See the password_hash module
+ # in modules.conf for more information about password hashing.
password="qQmv3LcF$Qh63wzmtUqWp9OXnLwe7yv1GcBwHpq59k2a0UrY8xe0"
# host: What hostnames and IPs are allowed to use this operator account.
diff --git a/include/channels.h b/include/channels.h
index 2b7c5d025..4d1d14c13 100644
--- a/include/channels.h
+++ b/include/channels.h
@@ -305,12 +305,6 @@ class CoreExport Channel : public Extensible, public InviteBase<Channel>
*/
const char* ChanModes(bool showkey);
- /** Spool the NAMES list for this channel to the given user
- * @param user The user to spool the NAMES list to
- * @param isinside If true, the user is inside the channel, if not then false
- */
- void UserList(User* user, bool isinside = true);
-
/** Get the value of a users prefix on this channel.
* @param user The user to look up
* @return The module or core-defined value of the users prefix.
diff --git a/include/inspircd.h b/include/inspircd.h
index b90c0c797..d41d2919b 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -502,11 +502,6 @@ class CoreExport InspIRCd
static const char* Format(const char* formatString, ...) CUSTOM_PRINTF(1, 2);
static const char* Format(va_list &vaList, const char* formatString) CUSTOM_PRINTF(2, 0);
- /** Send an error notice to all local users, opered and unopered
- * @param s The error string to send
- */
- void SendError(const std::string &s);
-
/** Return true if a nickname is valid
* @param n A nickname to verify
* @return True if the nick is valid
diff --git a/include/inspsocket.h b/include/inspsocket.h
index 221b92cc6..53eca2e91 100644
--- a/include/inspsocket.h
+++ b/include/inspsocket.h
@@ -103,14 +103,119 @@ class CoreExport SocketTimeout : public Timer
*/
class CoreExport StreamSocket : public EventHandler
{
+ public:
+ /** Socket send queue
+ */
+ class SendQueue
+ {
+ public:
+ /** One element of the queue, a continuous buffer
+ */
+ typedef std::string Element;
+
+ /** Sequence container of buffers in the queue
+ */
+ typedef std::deque<Element> Container;
+
+ /** Container iterator
+ */
+ typedef Container::const_iterator const_iterator;
+
+ SendQueue() : nbytes(0) { }
+
+ /** Return whether the queue is empty
+ * @return True if the queue is empty, false otherwise
+ */
+ bool empty() const { return (nbytes == 0); }
+
+ /** Get the number of individual buffers in the queue
+ * @return Number of individual buffers in the queue
+ */
+ Container::size_type size() const { return data.size(); }
+
+ /** Get the number of queued bytes
+ * @return Size in bytes of the data in the queue
+ */
+ size_t bytes() const { return nbytes; }
+
+ /** Get the first buffer of the queue
+ * @return A reference to the first buffer in the queue
+ */
+ const Element& front() const { return data.front(); }
+
+ /** Get an iterator to the first buffer in the queue.
+ * The returned iterator cannot be used to make modifications to the queue,
+ * for that purpose the member functions push_*(), pop_front(), erase_front() and clear() can be used.
+ * @return Iterator referring to the first buffer in the queue, or end() if there are no elements.
+ */
+ const_iterator begin() const { return data.begin(); }
+
+ /** Get an iterator to the (theoretical) buffer one past the end of the queue.
+ * @return Iterator referring to one element past the end of the container
+ */
+ const_iterator end() const { return data.end(); }
+
+ /** Remove the first buffer in the queue
+ */
+ void pop_front()
+ {
+ nbytes -= data.front().length();
+ data.pop_front();
+ }
+
+ /** Remove bytes from the beginning of the first buffer
+ * @param n Number of bytes to remove
+ */
+ void erase_front(Element::size_type n)
+ {
+ nbytes -= n;
+ data.front().erase(0, n);
+ }
+
+ /** Insert a new buffer at the beginning of the queue
+ * @param newdata Data to add
+ */
+ void push_front(const Element& newdata)
+ {
+ data.push_front(newdata);
+ nbytes += newdata.length();
+ }
+
+ /** Insert a new buffer at the end of the queue
+ * @param newdata Data to add
+ */
+ void push_back(const Element& newdata)
+ {
+ data.push_back(newdata);
+ nbytes += newdata.length();
+ }
+
+ /** Clear the queue
+ */
+ void clear()
+ {
+ data.clear();
+ nbytes = 0;
+ }
+
+ private:
+ /** Private send queue. Note that individual strings may be shared.
+ */
+ Container data;
+
+ /** Length, in bytes, of the sendq
+ */
+ size_t nbytes;
+ };
+
+ private:
/** The IOHook that handles raw I/O for this socket, or NULL */
IOHook* iohook;
- /** Private send queue. Note that individual strings may be shared
+ /** Send queue of the socket
*/
- std::deque<std::string> sendq;
- /** Length, in bytes, of the sendq */
- size_t sendq_len;
+ SendQueue sendq;
+
/** Error - if nonempty, the socket is dead, and this is the reason. */
std::string error;
@@ -126,7 +231,7 @@ class CoreExport StreamSocket : public EventHandler
protected:
std::string recvq;
public:
- StreamSocket() : iohook(NULL), sendq_len(0) {}
+ StreamSocket() : iohook(NULL) { }
IOHook* GetIOHook() const;
void AddIOHook(IOHook* hook);
void DelIOHook();
@@ -169,7 +274,9 @@ class CoreExport StreamSocket : public EventHandler
*/
bool GetNextLine(std::string& line, char delim = '\n');
/** Useful for implementing sendq exceeded */
- inline size_t getSendQSize() const { return sendq_len; }
+ size_t getSendQSize() const { return sendq.size(); }
+
+ SendQueue& GetSendQ() { return sendq; }
/**
* Close the socket, remove from socket engine, etc
diff --git a/include/iohook.h b/include/iohook.h
index ce7ca2a1b..cf27fcb0c 100644
--- a/include/iohook.h
+++ b/include/iohook.h
@@ -66,11 +66,10 @@ class IOHook : public classbase
* Called when a hooked stream has data to write, or when the socket
* engine returns it as writable
* @param sock The socket in question
- * @param sendq Data to send to the socket
* @return 1 if the sendq has been completely emptied, 0 if there is
* still data to send, and -1 if there was an error
*/
- virtual int OnStreamSocketWrite(StreamSocket* sock, std::string& sendq) = 0;
+ virtual int OnStreamSocketWrite(StreamSocket* sock) = 0;
/** Called immediately before any socket is closed. When this event is called, shutdown()
* has not yet been called on the socket.
diff --git a/include/modules.h b/include/modules.h
index 3cf780284..c938e6a9d 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -1068,6 +1068,13 @@ class CoreExport ModuleManager : public fakederef<ModuleManager>
*/
ServiceList* NewServices;
+ /** Expands the name of a module by prepending "m_" and appending ".so".
+ * No-op if the name already has the ".so" extension.
+ * @param modname Module name to expand
+ * @return Module name starting with "m_" and ending with ".so"
+ */
+ static std::string ExpandModName(const std::string& modname);
+
/** Simple, bog-standard, boring constructor.
*/
ModuleManager();
diff --git a/include/modules/ldap.h b/include/modules/ldap.h
index 75ab16077..aeb3aa335 100644
--- a/include/modules/ldap.h
+++ b/include/modules/ldap.h
@@ -1,8 +1,8 @@
/*
* InspIRCd -- Internet Relay Chat Daemon
*
- * Copyright (C) 2013 Adam <Adam@anope.org>
- * Copyright (C) 2003-2013 Anope Team <team@anope.org>
+ * Copyright (C) 2015 Adam <Adam@anope.org>
+ * Copyright (C) 2003-2015 Anope Team <team@anope.org>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public
@@ -78,22 +78,22 @@ struct LDAPAttributes : public std::map<std::string, std::vector<std::string> >
}
};
+enum QueryType
+{
+ QUERY_UNKNOWN,
+ QUERY_BIND,
+ QUERY_SEARCH,
+ QUERY_ADD,
+ QUERY_DELETE,
+ QUERY_MODIFY,
+ QUERY_COMPARE
+};
+
struct LDAPResult
{
std::vector<LDAPAttributes> messages;
std::string error;
- enum QueryType
- {
- QUERY_UNKNOWN,
- QUERY_BIND,
- QUERY_SEARCH,
- QUERY_ADD,
- QUERY_DELETE,
- QUERY_MODIFY,
- QUERY_COMPARE
- };
-
QueryType type;
LDAPQuery id;
@@ -145,55 +145,48 @@ class LDAPProvider : public DataProvider
/** Attempt to bind to the LDAP server as a manager
* @param i The LDAPInterface the result is sent to
- * @return The query ID
*/
- virtual LDAPQuery BindAsManager(LDAPInterface *i) = 0;
+ virtual void BindAsManager(LDAPInterface* i) = 0;
/** Bind to LDAP
* @param i The LDAPInterface the result is sent to
* @param who The binddn
* @param pass The password
- * @return The query ID
*/
- virtual LDAPQuery Bind(LDAPInterface* i, const std::string& who, const std::string& pass) = 0;
+ virtual void Bind(LDAPInterface* i, const std::string& who, const std::string& pass) = 0;
/** Search ldap for the specified filter
* @param i The LDAPInterface the result is sent to
* @param base The base DN to search
* @param filter The filter to apply
- * @return The query ID
*/
- virtual LDAPQuery Search(LDAPInterface* i, const std::string& base, const std::string& filter) = 0;
+ virtual void Search(LDAPInterface* i, const std::string& base, const std::string& filter) = 0;
/** Add an entry to LDAP
* @param i The LDAPInterface the result is sent to
* @param dn The dn of the entry to add
* @param attributes The attributes
- * @return The query ID
*/
- virtual LDAPQuery Add(LDAPInterface* i, const std::string& dn, LDAPMods& attributes) = 0;
+ virtual void Add(LDAPInterface* i, const std::string& dn, LDAPMods& attributes) = 0;
/** Delete an entry from LDAP
* @param i The LDAPInterface the result is sent to
* @param dn The dn of the entry to delete
- * @return The query ID
*/
- virtual LDAPQuery Del(LDAPInterface* i, const std::string& dn) = 0;
+ virtual void Del(LDAPInterface* i, const std::string& dn) = 0;
/** Modify an existing entry in LDAP
* @param i The LDAPInterface the result is sent to
* @param base The base DN to modify
* @param attributes The attributes to modify
- * @return The query ID
*/
- virtual LDAPQuery Modify(LDAPInterface* i, const std::string& base, LDAPMods& attributes) = 0;
+ virtual void Modify(LDAPInterface* i, const std::string& base, LDAPMods& attributes) = 0;
/** Compare an attribute in LDAP with our value
* @param i The LDAPInterface the result is sent to
* @param dn DN to use for comparing
* @param attr Attr of DN to compare with
* @param val value to compare attr of dn
- * @return the query ID
*/
- virtual LDAPQuery Compare(LDAPInterface* i, const std::string& dn, const std::string& attr, const std::string& val) = 0;
+ virtual void Compare(LDAPInterface* i, const std::string& dn, const std::string& attr, const std::string& val) = 0;
};
diff --git a/include/modules/ssl.h b/include/modules/ssl.h
index 0f58e0b7b..67bfc7b2e 100644
--- a/include/modules/ssl.h
+++ b/include/modules/ssl.h
@@ -138,6 +138,31 @@ class SSLIOHook : public IOHook
*/
reference<ssl_cert> certificate;
+ /** Reduce elements in a send queue by appending later elements to the first element until there are no more
+ * elements to append or a desired length is reached
+ * @param sendq SendQ to work on
+ * @param targetsize Target size of the front element
+ */
+ static void FlattenSendQueue(StreamSocket::SendQueue& sendq, size_t targetsize)
+ {
+ if ((sendq.size() <= 1) || (sendq.front().length() >= targetsize))
+ return;
+
+ // Avoid multiple repeated SSL encryption invocations
+ // This adds a single copy of the queue, but avoids
+ // much more overhead in terms of system calls invoked
+ // by an IOHook.
+ std::string tmp;
+ tmp.reserve(std::min(targetsize, sendq.bytes())+1);
+ do
+ {
+ tmp.append(sendq.front());
+ sendq.pop_front();
+ }
+ while (!sendq.empty() && tmp.length() < targetsize);
+ sendq.push_front(tmp);
+ }
+
public:
SSLIOHook(IOHookProvider* hookprov)
: IOHook(hookprov)
diff --git a/make/calcdep.pl b/make/calcdep.pl
index 513038843..2348edceb 100755
--- a/make/calcdep.pl
+++ b/make/calcdep.pl
@@ -250,7 +250,7 @@ sub dep_dir($$) {
if (@ofiles) {
my $ofiles = join ' ', @ofiles;
print MAKE "$outdir.so: $ofiles\n";
- print MAKE "\t@\$(SOURCEPATH)/make/unit-cc.pl link-dir\$(VERBOSE) \$\@ \$^ \$>\n";
+ print MAKE "\t@\$(SOURCEPATH)/make/unit-cc.pl link-dir\$(VERBOSE) \$\@ ${\SOURCEPATH}/src/$dir \$^ \$>\n";
return 1;
} else {
return 0;
diff --git a/make/template/inspircd b/make/template/inspircd
index 8405c2a6b..138de29a9 100644
--- a/make/template/inspircd
+++ b/make/template/inspircd
@@ -242,7 +242,7 @@ sub dev_valdebug(@)
# If we are still alive here.. Try starting the IRCd..
# May want to do something with these args at some point: --suppressions=.inspircd.sup --gen-suppressions=yes
# Could be useful when we want to stop it complaining about things we're sure aren't issues.
- exec qw(valgrind -v --tool=memcheck --leak-check=yes --db-attach=yes --num-callers=10), "$binpath/$executable", qw(--nofork --debug --nolog), @_;
+ exec qw(valgrind -v --tool=memcheck --leak-check=yes --db-attach=yes --num-callers=30), "$binpath/$executable", qw(--nofork --debug --nolog), @_;
die "Failed to start valgrind: $!\n";
}
@@ -276,7 +276,7 @@ sub dev_valdebug_unattended(@)
sysopen STDERR, "$valgrindlogpath/valdebug.$suffix", O_WRONLY | O_CREAT | O_NOCTTY | O_APPEND, 0666 or die "Can't open $valgrindlogpath/valdebug.$suffix: $!\n";
# May want to do something with these args at some point: --suppressions=.inspircd.sup --gen-suppressions=yes
# Could be useful when we want to stop it complaining about things we're sure aren't issues.
- exec qw(valgrind -v --tool=memcheck --leak-check=full --show-reachable=yes --num-callers=15 --track-fds=yes),
+ exec qw(valgrind -v --tool=memcheck --leak-check=full --show-reachable=yes --num-callers=30 --track-fds=yes),
"--suppressions=$binpath/valgrind.sup", qw(--gen-suppressions=all),
qw(--leak-resolution=med --time-stamp=yes --log-fd=2 --),
"$binpath/$executable", qw(--nofork --debug --nolog), @_;
@@ -301,7 +301,7 @@ sub dev_screenvaldebug(@)
# If we are still alive here.. Try starting the IRCd..
print "Starting InspIRCd in `screen`, type `screen -r` when the ircd crashes to view the valgrind and gdb output and get a backtrace.\n";
print "Once you're inside the screen session press ^C + d to re-detach from the session\n";
- exec qw(screen -m -d valgrind -v --tool=memcheck --leak-check=yes --db-attach=yes --num-callers=10), "$binpath/$executable", qw(--nofork --debug --nolog), @_;
+ exec qw(screen -m -d valgrind -v --tool=memcheck --leak-check=yes --db-attach=yes --num-callers=30), "$binpath/$executable", qw(--nofork --debug --nolog), @_;
die "Failed to start screen: $!\n";
}
diff --git a/make/unit-cc.pl b/make/unit-cc.pl
index 0a20738db..aba14a0bc 100755
--- a/make/unit-cc.pl
+++ b/make/unit-cc.pl
@@ -104,7 +104,11 @@ sub do_core_link {
}
sub do_link_dir {
- my $execstr = "$ENV{CXX} -o $out $ENV{PICLDFLAGS} @_";
+ my ($dir, $link_flags) = (shift, '');
+ for my $file (<$dir/*.cpp>) {
+ $link_flags .= get_property($file, 'LinkerFlags') . ' ';
+ }
+ my $execstr = "$ENV{CXX} -o $out $ENV{PICLDFLAGS} $link_flags @_";
message 'LINK', $out, $execstr;
exec $execstr;
}
diff --git a/src/channels.cpp b/src/channels.cpp
index e06e4c6fc..f79b5b89f 100644
--- a/src/channels.cpp
+++ b/src/channels.cpp
@@ -32,9 +32,6 @@ namespace
ChanModeReference inviteonlymode(NULL, "inviteonly");
ChanModeReference keymode(NULL, "key");
ChanModeReference limitmode(NULL, "limit");
- ChanModeReference secretmode(NULL, "secret");
- ChanModeReference privatemode(NULL, "private");
- UserModeReference invisiblemode(NULL, "invisible");
}
Channel::Channel(const std::string &cname, time_t ts)
@@ -344,16 +341,6 @@ Membership* Channel::ForceJoin(User* user, const std::string* privs, bool bursti
this->WriteAllExcept(user, !ServerInstance->Config->CycleHostsFromUser, 0, except_list, "MODE %s +%s", this->name.c_str(), ms.c_str());
}
- if (IS_LOCAL(user))
- {
- if (this->topicset)
- {
- user->WriteNumeric(RPL_TOPIC, "%s :%s", this->name.c_str(), this->topic.c_str());
- user->WriteNumeric(RPL_TOPICTIME, "%s %s %lu", this->name.c_str(), this->setby.c_str(), (unsigned long)this->topicset);
- }
- this->UserList(user);
- }
-
FOREACH_MOD(OnPostJoin, (memb));
return memb;
}
@@ -586,66 +573,6 @@ const char* Channel::ChanModes(bool showkey)
return scratch.c_str();
}
-/* compile a userlist of a channel into a string, each nick seperated by
- * spaces and op, voice etc status shown as @ and +, and send it to 'user'
- */
-void Channel::UserList(User* user, bool has_user)
-{
- bool has_privs = user->HasPrivPermission("channels/auspex");
- std::string list;
- list.push_back(this->IsModeSet(secretmode) ? '@' : this->IsModeSet(privatemode) ? '*' : '=');
- list.push_back(' ');
- list.append(this->name).append(" :");
- std::string::size_type pos = list.size();
-
- const size_t maxlen = ServerInstance->Config->Limits.MaxLine - 10 - ServerInstance->Config->ServerName.size() - user->nick.size();
- std::string prefixlist;
- std::string nick;
- for (MemberMap::iterator i = userlist.begin(); i != userlist.end(); ++i)
- {
- if ((!has_user) && (i->first->IsModeSet(invisiblemode)) && (!has_privs))
- {
- /*
- * user is +i, and source not on the channel, does not show
- * nick in NAMES list
- */
- continue;
- }
-
- Membership* memb = i->second;
-
- prefixlist.clear();
- char prefix = memb->GetPrefixChar();
- if (prefix)
- prefixlist.push_back(prefix);
- nick = i->first->nick;
-
- ModResult res;
- FIRST_MOD_RESULT(OnNamesListItem, res, (user, memb, prefixlist, nick));
-
- // See if a module wants us to exclude this user from NAMES
- if (res == MOD_RES_DENY)
- continue;
-
- if (list.size() + prefixlist.length() + nick.length() + 1 > maxlen)
- {
- /* list overflowed into multiple numerics */
- user->WriteNumeric(RPL_NAMREPLY, list);
-
- // Erase all nicks, keep the constant part
- list.erase(pos);
- }
-
- list.append(prefixlist).append(nick).push_back(' ');
- }
-
- // Only send the user list numeric if there is at least one user in it
- if (list.size() != pos)
- user->WriteNumeric(RPL_NAMREPLY, list);
-
- user->WriteNumeric(RPL_ENDOFNAMES, "%s :End of /NAMES list.", this->name.c_str());
-}
-
/* returns the status character for a given user on a channel, e.g. @ for op,
* % for halfop etc. If the user has several modes set, the highest mode
* the user has must be returned.
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 68495623c..974e52abf 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -671,6 +671,7 @@ void ServerConfig::ApplyModules(User* user)
std::string name;
if (tag->readString("name", name))
{
+ name = ModuleManager::ExpandModName(name);
// if this module is already loaded, the erase will succeed, so we need do nothing
// otherwise, we need to add the module (which will be done later)
if (removed_modules.erase(name) == 0)
diff --git a/src/coremods/core_channel/cmd_names.cpp b/src/coremods/core_channel/cmd_names.cpp
index 20faae774..3af99ed2b 100644
--- a/src/coremods/core_channel/cmd_names.cpp
+++ b/src/coremods/core_channel/cmd_names.cpp
@@ -24,6 +24,8 @@
CommandNames::CommandNames(Module* parent)
: Command(parent, "NAMES", 0, 0)
, secretmode(parent, "secret")
+ , privatemode(parent, "private")
+ , invisiblemode(parent, "invisible")
{
syntax = "{<channel>{,<channel>}}";
}
@@ -51,10 +53,11 @@ CmdResult CommandNames::Handle (const std::vector<std::string>& parameters, User
// - the user doing the /NAMES is inside the channel
// - the user doing the /NAMES has the channels/auspex privilege
- bool has_user = c->HasUser(user);
- if ((!c->IsModeSet(secretmode)) || (has_user) || (user->HasPrivPermission("channels/auspex")))
+ // If the user is inside the channel or has privs, instruct SendNames() to show invisible (+i) members
+ bool show_invisible = ((c->HasUser(user)) || (user->HasPrivPermission("channels/auspex")));
+ if ((show_invisible) || (!c->IsModeSet(secretmode)))
{
- c->UserList(user, has_user);
+ SendNames(user, c, show_invisible);
return CMD_SUCCESS;
}
}
@@ -62,3 +65,63 @@ CmdResult CommandNames::Handle (const std::vector<std::string>& parameters, User
user->WriteNumeric(ERR_NOSUCHNICK, "%s :No such nick/channel", parameters[0].c_str());
return CMD_FAILURE;
}
+
+void CommandNames::SendNames(User* user, Channel* chan, bool show_invisible)
+{
+ std::string list;
+ if (chan->IsModeSet(secretmode))
+ list.push_back('@');
+ else if (chan->IsModeSet(privatemode))
+ list.push_back('*');
+ else
+ list.push_back('=');
+
+ list.push_back(' ');
+ list.append(chan->name).append(" :");
+ std::string::size_type pos = list.size();
+
+ const size_t maxlen = ServerInstance->Config->Limits.MaxLine - 10 - ServerInstance->Config->ServerName.size() - user->nick.size();
+ std::string prefixlist;
+ std::string nick;
+ const Channel::MemberMap& members = chan->GetUsers();
+ for (Channel::MemberMap::const_iterator i = members.begin(); i != members.end(); ++i)
+ {
+ if ((!show_invisible) && (i->first->IsModeSet(invisiblemode)))
+ {
+ // Member is invisible and we are not supposed to show them
+ continue;
+ }
+
+ Membership* const memb = i->second;
+
+ prefixlist.clear();
+ char prefix = memb->GetPrefixChar();
+ if (prefix)
+ prefixlist.push_back(prefix);
+ nick = i->first->nick;
+
+ ModResult res;
+ FIRST_MOD_RESULT(OnNamesListItem, res, (user, memb, prefixlist, nick));
+
+ // See if a module wants us to exclude this user from NAMES
+ if (res == MOD_RES_DENY)
+ continue;
+
+ if (list.size() + prefixlist.length() + nick.length() + 1 > maxlen)
+ {
+ // List overflowed into multiple numerics
+ user->WriteNumeric(RPL_NAMREPLY, list);
+
+ // Erase all nicks, keep the constant part
+ list.erase(pos);
+ }
+
+ list.append(prefixlist).append(nick).push_back(' ');
+ }
+
+ // Only send the user list numeric if there is at least one user in it
+ if (list.size() != pos)
+ user->WriteNumeric(RPL_NAMREPLY, list);
+
+ user->WriteNumeric(RPL_ENDOFNAMES, "%s :End of /NAMES list.", chan->name.c_str());
+}
diff --git a/src/coremods/core_channel/cmd_topic.cpp b/src/coremods/core_channel/cmd_topic.cpp
index ea723c024..8d65d764a 100644
--- a/src/coremods/core_channel/cmd_topic.cpp
+++ b/src/coremods/core_channel/cmd_topic.cpp
@@ -51,8 +51,7 @@ CmdResult CommandTopic::HandleLocal(const std::vector<std::string>& parameters,
if (c->topic.length())
{
- user->WriteNumeric(RPL_TOPIC, "%s :%s", c->name.c_str(), c->topic.c_str());
- user->WriteNumeric(RPL_TOPICTIME, "%s %s %lu", c->name.c_str(), c->setby.c_str(), (unsigned long)c->topicset);
+ Topic::ShowTopic(user, c);
}
else
{
@@ -84,3 +83,9 @@ CmdResult CommandTopic::HandleLocal(const std::vector<std::string>& parameters,
c->SetTopic(user, t);
return CMD_SUCCESS;
}
+
+void Topic::ShowTopic(LocalUser* user, Channel* chan)
+{
+ user->WriteNumeric(RPL_TOPIC, "%s :%s", chan->name.c_str(), chan->topic.c_str());
+ user->WriteNumeric(RPL_TOPICTIME, "%s %s %lu", chan->name.c_str(), chan->setby.c_str(), (unsigned long)chan->topicset);
+}
diff --git a/src/coremods/core_channel/core_channel.cpp b/src/coremods/core_channel/core_channel.cpp
index 47f722e1e..99ad74d3d 100644
--- a/src/coremods/core_channel/core_channel.cpp
+++ b/src/coremods/core_channel/core_channel.cpp
@@ -34,6 +34,25 @@ class CoreModChannel : public Module
{
}
+ void OnPostJoin(Membership* memb) CXX11_OVERRIDE
+ {
+ Channel* const chan = memb->chan;
+ LocalUser* const localuser = IS_LOCAL(memb->user);
+ if (localuser)
+ {
+ if (chan->topicset)
+ Topic::ShowTopic(localuser, chan);
+
+ // Show all members of the channel, including invisible (+i) users
+ cmdnames.SendNames(localuser, chan, true);
+ }
+ }
+
+ void Prioritize() CXX11_OVERRIDE
+ {
+ ServerInstance->Modules.SetPriority(this, I_OnPostJoin, PRIORITY_FIRST);
+ }
+
Version GetVersion() CXX11_OVERRIDE
{
return Version("Provides the INVITE, JOIN, KICK, NAMES, and TOPIC commands", VF_VENDOR|VF_CORE);
diff --git a/src/coremods/core_channel/core_channel.h b/src/coremods/core_channel/core_channel.h
index d3adbc9c9..755f876f6 100644
--- a/src/coremods/core_channel/core_channel.h
+++ b/src/coremods/core_channel/core_channel.h
@@ -21,6 +21,11 @@
#include "inspircd.h"
+namespace Topic
+{
+ void ShowTopic(LocalUser* user, Channel* chan);
+}
+
/** Handle /INVITE.
*/
class CommandInvite : public Command
@@ -81,6 +86,8 @@ class CommandTopic : public SplitCommand
class CommandNames : public Command
{
ChanModeReference secretmode;
+ ChanModeReference privatemode;
+ UserModeReference invisiblemode;
public:
/** Constructor for names.
@@ -93,6 +100,13 @@ class CommandNames : public Command
* @return A value from CmdResult to indicate command success or failure.
*/
CmdResult Handle(const std::vector<std::string>& parameters, User *user);
+
+ /** Spool the NAMES list for a given channel to the given user
+ * @param user User to spool the NAMES list to
+ * @param chan Channel whose nicklist to send
+ * @param show_invisible True to show invisible (+i) members to the user, false to omit them from the list
+ */
+ void SendNames(User* user, Channel* chan, bool show_invisible);
};
/** Handle /KICK.
diff --git a/src/coremods/core_oper/cmd_die.cpp b/src/coremods/core_oper/cmd_die.cpp
index 5a9415915..4bc6c25db 100644
--- a/src/coremods/core_oper/cmd_die.cpp
+++ b/src/coremods/core_oper/cmd_die.cpp
@@ -29,6 +29,33 @@ CommandDie::CommandDie(Module* parent)
syntax = "<password>";
}
+static void QuitAll()
+{
+ const std::string quitmsg = "Server shutdown";
+ const UserManager::LocalList& list = ServerInstance->Users.GetLocalUsers();
+ while (!list.empty())
+ ServerInstance->Users.QuitUser(list.front(), quitmsg);
+}
+
+void DieRestart::SendError(const std::string& message)
+{
+ const std::string unregline = "ERROR :" + message;
+ const UserManager::LocalList& list = ServerInstance->Users.GetLocalUsers();
+ for (UserManager::LocalList::const_iterator i = list.begin(); i != list.end(); ++i)
+ {
+ LocalUser* user = *i;
+ if (user->registered == REG_ALL)
+ {
+ user->WriteNotice(message);
+ }
+ else
+ {
+ // Unregistered connections receive ERROR, not a NOTICE
+ user->Write(unregline);
+ }
+ }
+}
+
/** Handle /DIE
*/
CmdResult CommandDie::Handle (const std::vector<std::string>& parameters, User *user)
@@ -38,9 +65,10 @@ CmdResult CommandDie::Handle (const std::vector<std::string>& parameters, User *
{
std::string diebuf = "*** DIE command from " + user->GetFullHost() + ". Terminating.";
ServerInstance->Logs->Log("COMMAND", LOG_SPARSE, diebuf);
- ServerInstance->SendError(diebuf);
+ DieRestart::SendError(diebuf);
}
+ QuitAll();
ServerInstance->Exit(EXIT_STATUS_DIE);
}
else
diff --git a/src/coremods/core_oper/cmd_restart.cpp b/src/coremods/core_oper/cmd_restart.cpp
index 4fad752a2..3e219727f 100644
--- a/src/coremods/core_oper/cmd_restart.cpp
+++ b/src/coremods/core_oper/cmd_restart.cpp
@@ -35,7 +35,7 @@ CmdResult CommandRestart::Handle (const std::vector<std::string>& parameters, Us
{
ServerInstance->SNO->WriteGlobalSno('a', "RESTART command from %s, restarting server.", user->GetFullRealHost().c_str());
- ServerInstance->SendError("Server restarting.");
+ DieRestart::SendError("Server restarting.");
#ifndef _WIN32
/* XXX: This hack sets FD_CLOEXEC on all possible file descriptors, so they're closed if the execv() below succeeds.
diff --git a/src/coremods/core_oper/core_oper.h b/src/coremods/core_oper/core_oper.h
index 3b3dfd4b2..338a369f5 100644
--- a/src/coremods/core_oper/core_oper.h
+++ b/src/coremods/core_oper/core_oper.h
@@ -30,6 +30,11 @@ namespace DieRestart
* @return True if the given password was correct, false if it was not
*/
bool CheckPass(User* user, const std::string& inputpass, const char* confkey);
+
+ /** Send an ERROR to unregistered users and a NOTICE to all registered local users
+ * @param message Message to send
+ */
+ void SendError(const std::string& message);
}
/** Handle /DIE.
diff --git a/src/coremods/core_stats.cpp b/src/coremods/core_stats.cpp
index 180ece9b3..9fb232bc0 100644
--- a/src/coremods/core_stats.cpp
+++ b/src/coremods/core_stats.cpp
@@ -99,6 +99,11 @@ void CommandStats::DoStats(char statschar, User* user, string_list &results)
std::string ip = ls->bind_addr;
if (ip.empty())
ip.assign("*");
+ else if (ip.find_first_of(':') != std::string::npos)
+ {
+ ip.insert(ip.begin(), '[');
+ ip.insert(ip.end(), ']');
+ }
std::string type = ls->bind_tag->getString("type", "clients");
std::string hook = ls->bind_tag->getString("ssl", "plaintext");
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index 5cde46246..d636e2d89 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -79,25 +79,6 @@ Channel* InspIRCd::FindChan(const std::string &chan)
return iter->second;
}
-/* Send an error notice to all users, registered or not */
-void InspIRCd::SendError(const std::string &s)
-{
- const UserManager::LocalList& list = Users.GetLocalUsers();
- for (UserManager::LocalList::const_iterator i = list.begin(); i != list.end(); ++i)
- {
- User* u = *i;
- if (u->registered == REG_ALL)
- {
- u->WriteNotice(s);
- }
- else
- {
- /* Unregistered connections receive ERROR, not a NOTICE */
- u->Write("ERROR :" + s);
- }
- }
-}
-
bool InspIRCd::IsValidMask(const std::string &mask)
{
const char* dest = mask.c_str();
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index cb2b5db9d..fce99f421 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -108,11 +108,6 @@ void InspIRCd::Cleanup()
}
ports.clear();
- /* Close all client sockets, or the new process inherits them */
- const UserManager::LocalList& list = Users.GetLocalUsers();
- for (UserManager::LocalList::const_iterator i = list.begin(); i != list.end(); ++i)
- Users->QuitUser(*i, "Server shutdown");
-
GlobalCulls.Apply();
Modules->UnloadAll();
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp
index 7ddd77495..89c3a71a9 100644
--- a/src/inspsocket.cpp
+++ b/src/inspsocket.cpp
@@ -201,55 +201,12 @@ void StreamSocket::DoWrite()
if (GetIOHook())
{
- {
- while (error.empty() && !sendq.empty())
- {
- if (sendq.size() > 1 && sendq[0].length() < 1024)
- {
- // Avoid multiple repeated SSL encryption invocations
- // This adds a single copy of the queue, but avoids
- // much more overhead in terms of system calls invoked
- // by the IOHook.
- //
- // The length limit of 1024 is to prevent merging strings
- // more than once when writes begin to block.
- std::string tmp;
- tmp.reserve(1280);
- while (!sendq.empty() && tmp.length() < 1024)
- {
- tmp.append(sendq.front());
- sendq.pop_front();
- }
- sendq.push_front(tmp);
- }
- std::string& front = sendq.front();
- int itemlen = front.length();
-
- {
- int rv = GetIOHook()->OnStreamSocketWrite(this, front);
- if (rv > 0)
- {
- // consumed the entire string, and is ready for more
- sendq_len -= itemlen;
- sendq.pop_front();
- }
- else if (rv == 0)
- {
- // socket has blocked. Stop trying to send data.
- // IOHook has requested unblock notification from the socketengine
+ int rv = GetIOHook()->OnStreamSocketWrite(this);
+ if (rv < 0)
+ SetError("Write Error"); // will not overwrite a better error message
- // Since it is possible that a partial write took place, adjust sendq_len
- sendq_len = sendq_len - itemlen + front.length();
- return;
- }
- else
- {
- SetError("Write Error"); // will not overwrite a better error message
- return;
- }
- }
- }
- }
+ // rv == 0 means the socket has blocked. Stop trying to send data.
+ // IOHook has requested unblock notification from the socketengine.
}
else
{
@@ -258,7 +215,7 @@ void StreamSocket::DoWrite()
return;
// start out optimistic - we won't need to write any more
int eventChange = FD_WANT_EDGE_WRITE;
- while (error.empty() && sendq_len && eventChange == FD_WANT_EDGE_WRITE)
+ while (error.empty() && !sendq.empty() && eventChange == FD_WANT_EDGE_WRITE)
{
// Prepare a writev() call to write all buffers efficiently
int bufcount = sendq.size();
@@ -273,20 +230,21 @@ void StreamSocket::DoWrite()
int rv;
{
SocketEngine::IOVector iovecs[MYIOV_MAX];
- for (int i = 0; i < bufcount; i++)
+ size_t j = 0;
+ for (SendQueue::const_iterator i = sendq.begin(), end = i+bufcount; i != end; ++i, j++)
{
- iovecs[i].iov_base = const_cast<char*>(sendq[i].data());
- iovecs[i].iov_len = sendq[i].length();
- rv_max += sendq[i].length();
+ const SendQueue::Element& elem = *i;
+ iovecs[j].iov_base = const_cast<char*>(elem.data());
+ iovecs[j].iov_len = elem.length();
+ rv_max += elem.length();
}
rv = SocketEngine::WriteV(this, iovecs, bufcount);
}
- if (rv == (int)sendq_len)
+ if (rv == (int)sendq.bytes())
{
// it's our lucky day, everything got written out. Fast cleanup.
// This won't ever happen if the number of buffers got capped.
- sendq_len = 0;
sendq.clear();
}
else if (rv > 0)
@@ -297,10 +255,9 @@ void StreamSocket::DoWrite()
// it's going to block now
eventChange = FD_WANT_FAST_WRITE | FD_WRITE_WILL_BLOCK;
}
- sendq_len -= rv;
while (rv > 0 && !sendq.empty())
{
- std::string& front = sendq.front();
+ const SendQueue::Element& front = sendq.front();
if (front.length() <= (size_t)rv)
{
// this string got fully written out
@@ -310,7 +267,7 @@ void StreamSocket::DoWrite()
else
{
// stopped in the middle of this string
- front.erase(0, rv);
+ sendq.erase_front(rv);
rv = 0;
}
}
@@ -356,7 +313,6 @@ void StreamSocket::WriteData(const std::string &data)
/* Append the data to the back of the queue ready for writing */
sendq.push_back(data);
- sendq_len += data.length();
SocketEngine::ChangeEventMask(this, FD_ADD_TRIAL_WRITE);
}
diff --git a/src/modmanager_dynamic.cpp b/src/modmanager_dynamic.cpp
index fc6161e31..9a687ad2b 100644
--- a/src/modmanager_dynamic.cpp
+++ b/src/modmanager_dynamic.cpp
@@ -27,15 +27,16 @@
#ifndef PURE_STATIC
-bool ModuleManager::Load(const std::string& filename, bool defer)
+bool ModuleManager::Load(const std::string& modname, bool defer)
{
/* Don't allow people to specify paths for modules, it doesn't work as expected */
- if (filename.find('/') != std::string::npos)
+ if (modname.find('/') != std::string::npos)
{
- LastModuleError = "You can't load modules with a path: " + filename;
+ LastModuleError = "You can't load modules with a path: " + modname;
return false;
}
+ const std::string filename = ExpandModName(modname);
const std::string moduleFile = ServerInstance->Config->Paths.PrependModule(filename);
if (!FileSystem::FileExists(moduleFile))
diff --git a/src/modmanager_static.cpp b/src/modmanager_static.cpp
index ac127b703..98ed26c67 100644
--- a/src/modmanager_static.cpp
+++ b/src/modmanager_static.cpp
@@ -80,8 +80,9 @@ class AllModule : public Module
MODULE_INIT(AllModule)
-bool ModuleManager::Load(const std::string& name, bool defer)
+bool ModuleManager::Load(const std::string& inputname, bool defer)
{
+ const std::string name = ExpandModName(inputname);
modmap::iterator it = modlist->find(name);
if (it == modlist->end())
return false;
diff --git a/src/modules.cpp b/src/modules.cpp
index b8982579c..9e653a4ab 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -499,7 +499,7 @@ void ModuleManager::LoadAll()
{
ConfigTag* tag = i->second;
std::string name = tag->getString("name");
- this->NewServices = &servicemap[name];
+ this->NewServices = &servicemap[ExpandModName(name)];
std::cout << "[" << con_green << "*" << con_reset << "] Loading module:\t" << con_green << name << con_reset << std::endl;
if (!this->Load(name, true))
@@ -636,6 +636,16 @@ ServiceProvider* ModuleManager::FindService(ServiceType type, const std::string&
}
}
+std::string ModuleManager::ExpandModName(const std::string& modname)
+{
+ // Transform "callerid" -> "m_callerid.so" unless it already has a ".so" extension,
+ // so coremods in the "core_*.so" form aren't changed
+ std::string ret = modname;
+ if ((modname.length() < 3) || (modname.compare(modname.size() - 3, 3, ".so")))
+ ret.insert(0, "m_").append(".so");
+ return ret;
+}
+
dynamic_reference_base::dynamic_reference_base(Module* Creator, const std::string& Name)
: name(Name), hook(NULL), value(NULL), creator(Creator)
{
@@ -685,7 +695,7 @@ void dynamic_reference_base::resolve()
Module* ModuleManager::Find(const std::string &name)
{
- std::map<std::string, Module*>::iterator modfind = Modules.find(name);
+ std::map<std::string, Module*>::const_iterator modfind = Modules.find(ExpandModName(name));
if (modfind == Modules.end())
return NULL;
diff --git a/src/modules/extra/m_ldap.cpp b/src/modules/extra/m_ldap.cpp
index 10469f370..c11025836 100644
--- a/src/modules/extra/m_ldap.cpp
+++ b/src/modules/extra/m_ldap.cpp
@@ -1,8 +1,8 @@
/*
* InspIRCd -- Internet Relay Chat Daemon
*
- * Copyright (C) 2013-2014 Adam <Adam@anope.org>
- * Copyright (C) 2003-2014 Anope Team <team@anope.org>
+ * Copyright (C) 2013-2015 Adam <Adam@anope.org>
+ * Copyright (C) 2003-2015 Anope Team <team@anope.org>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public
@@ -29,6 +29,140 @@
/* $LinkerFlags: -lldap_r */
+class LDAPService;
+
+class LDAPRequest
+{
+ public:
+ LDAPService* service;
+ LDAPInterface* inter;
+ LDAPMessage* message; /* message returned by ldap_ */
+ LDAPResult* result; /* final result */
+ struct timeval tv;
+ QueryType type;
+
+ LDAPRequest(LDAPService* s, LDAPInterface* i)
+ : service(s)
+ , inter(i)
+ , message(NULL)
+ , result(NULL)
+ {
+ type = QUERY_UNKNOWN;
+ tv.tv_sec = 0;
+ tv.tv_usec = 100000;
+ }
+
+ virtual ~LDAPRequest()
+ {
+ delete result;
+ if (message != NULL)
+ ldap_msgfree(message);
+ }
+
+ virtual int run() = 0;
+};
+
+class LDAPBind : public LDAPRequest
+{
+ std::string who, pass;
+
+ public:
+ LDAPBind(LDAPService* s, LDAPInterface* i, const std::string& w, const std::string& p)
+ : LDAPRequest(s, i)
+ , who(w)
+ , pass(p)
+ {
+ type = QUERY_BIND;
+ }
+
+ int run() CXX11_OVERRIDE;
+};
+
+class LDAPSearch : public LDAPRequest
+{
+ std::string base;
+ int searchscope;
+ std::string filter;
+
+ public:
+ LDAPSearch(LDAPService* s, LDAPInterface* i, const std::string& b, int se, const std::string& f)
+ : LDAPRequest(s, i)
+ , base(b)
+ , searchscope(se)
+ , filter(f)
+ {
+ type = QUERY_SEARCH;
+ }
+
+ int run() CXX11_OVERRIDE;
+};
+
+class LDAPAdd : public LDAPRequest
+{
+ std::string dn;
+ LDAPMods attributes;
+
+ public:
+ LDAPAdd(LDAPService* s, LDAPInterface* i, const std::string& d, const LDAPMods& attr)
+ : LDAPRequest(s, i)
+ , dn(d)
+ , attributes(attr)
+ {
+ type = QUERY_ADD;
+ }
+
+ int run() CXX11_OVERRIDE;
+};
+
+class LDAPDel : public LDAPRequest
+{
+ std::string dn;
+
+ public:
+ LDAPDel(LDAPService* s, LDAPInterface* i, const std::string& d)
+ : LDAPRequest(s, i)
+ , dn(d)
+ {
+ type = QUERY_DELETE;
+ }
+
+ int run() CXX11_OVERRIDE;
+};
+
+class LDAPModify : public LDAPRequest
+{
+ std::string base;
+ LDAPMods attributes;
+
+ public:
+ LDAPModify(LDAPService* s, LDAPInterface* i, const std::string& b, const LDAPMods& attr)
+ : LDAPRequest(s, i)
+ , base(b)
+ , attributes(attr)
+ {
+ type = QUERY_MODIFY;
+ }
+
+ int run() CXX11_OVERRIDE;
+};
+
+class LDAPCompare : public LDAPRequest
+{
+ std::string dn, attr, val;
+
+ public:
+ LDAPCompare(LDAPService* s, LDAPInterface* i, const std::string& d, const std::string& a, const std::string& v)
+ : LDAPRequest(s, i)
+ , dn(d)
+ , attr(a)
+ , val(v)
+ {
+ type = QUERY_COMPARE;
+ }
+
+ int run() CXX11_OVERRIDE;
+};
+
class LDAPService : public LDAPProvider, public SocketThread
{
LDAP* con;
@@ -38,7 +172,8 @@ class LDAPService : public LDAPProvider, public SocketThread
time_t timeout;
time_t last_timeout_check;
- LDAPMod** BuildMods(const LDAPMods& attributes)
+ public:
+ static LDAPMod** BuildMods(const LDAPMods& attributes)
{
LDAPMod** mods = new LDAPMod*[attributes.size() + 1];
memset(mods, 0, sizeof(LDAPMod*) * (attributes.size() + 1));
@@ -69,7 +204,7 @@ class LDAPService : public LDAPProvider, public SocketThread
return mods;
}
- void FreeMods(LDAPMod** mods)
+ static void FreeMods(LDAPMod** mods)
{
for (unsigned int i = 0; mods[i] != NULL; ++i)
{
@@ -86,6 +221,7 @@ class LDAPService : public LDAPProvider, public SocketThread
delete[] mods;
}
+ private:
void Reconnect()
{
// Only try one connect a minute. It is an expensive blocking operation
@@ -97,48 +233,17 @@ class LDAPService : public LDAPProvider, public SocketThread
Connect();
}
- void SaveInterface(LDAPInterface* i, LDAPQuery msgid)
+ void QueueRequest(LDAPRequest* r)
{
- if (i != NULL)
- {
- this->LockQueue();
- this->queries[msgid] = std::make_pair(ServerInstance->Time(), i);
- this->UnlockQueueWakeup();
- }
- }
-
- void Timeout()
- {
- if (last_timeout_check == ServerInstance->Time())
- return;
- last_timeout_check = ServerInstance->Time();
-
- for (query_queue::iterator it = this->queries.begin(); it != this->queries.end(); )
- {
- LDAPQuery msgid = it->first;
- time_t created = it->second.first;
- LDAPInterface* i = it->second.second;
- ++it;
-
- if (ServerInstance->Time() > created + timeout)
- {
- LDAPResult* ldap_result = new LDAPResult();
- ldap_result->id = msgid;
- ldap_result->error = "Query timed out";
-
- this->queries.erase(msgid);
- this->results.push_back(std::make_pair(i, ldap_result));
-
- this->NotifyParent();
- }
- }
+ this->LockQueue();
+ this->queries.push_back(r);
+ this->UnlockQueueWakeup();
}
public:
- typedef std::map<LDAPQuery, std::pair<time_t, LDAPInterface*> > query_queue;
- typedef std::vector<std::pair<LDAPInterface*, LDAPResult*> > result_queue;
- query_queue queries;
- result_queue results;
+ typedef std::vector<LDAPRequest*> query_queue;
+ query_queue queries, results;
+ Mutex process_mutex; /* held when processing requests not in either queue */
LDAPService(Module* c, ConfigTag* tag)
: LDAPProvider(c, "LDAP/" + tag->getString("id"))
@@ -160,30 +265,29 @@ class LDAPService : public LDAPProvider, public SocketThread
{
this->LockQueue();
- for (query_queue::iterator i = this->queries.begin(); i != this->queries.end(); ++i)
+ for (unsigned int i = 0; i < this->queries.size(); ++i)
{
- LDAPQuery msgid = i->first;
- LDAPInterface* inter = i->second.second;
+ LDAPRequest* req = this->queries[i];
- ldap_abandon_ext(this->con, msgid, NULL, NULL);
+ /* queries have no results yet */
+ req->result = new LDAPResult();
+ req->result->type = req->type;
+ req->result->error = "LDAP Interface is going away";
+ req->inter->OnError(*req->result);
- if (inter)
- {
- LDAPResult r;
- r.error = "LDAP Interface is going away";
- inter->OnError(r);
- }
+ delete req;
}
this->queries.clear();
- for (result_queue::iterator i = this->results.begin(); i != this->results.end(); ++i)
+ for (unsigned int i = 0; i < this->results.size(); ++i)
{
- LDAPInterface* inter = i->first;
- LDAPResult* r = i->second;
+ LDAPRequest* req = this->results[i];
+
+ /* even though this may have already finished successfully we return that it didn't */
+ req->result->error = "LDAP Interface is going away";
+ req->inter->OnError(*req->result);
- r->error = "LDAP Interface is going away";
- if (inter)
- inter->OnError(*r);
+ delete req;
}
this->results.clear();
@@ -218,316 +322,192 @@ class LDAPService : public LDAPProvider, public SocketThread
}
}
- LDAPQuery BindAsManager(LDAPInterface* i) CXX11_OVERRIDE
+ void BindAsManager(LDAPInterface* i) CXX11_OVERRIDE
{
std::string binddn = config->getString("binddn");
std::string bindauth = config->getString("bindauth");
- return this->Bind(i, binddn, bindauth);
+ this->Bind(i, binddn, bindauth);
}
- LDAPQuery Bind(LDAPInterface* i, const std::string& who, const std::string& pass) CXX11_OVERRIDE
+ void Bind(LDAPInterface* i, const std::string& who, const std::string& pass) CXX11_OVERRIDE
{
- berval cred;
- cred.bv_val = strdup(pass.c_str());
- cred.bv_len = pass.length();
-
- LDAPQuery msgid;
- int ret = ldap_sasl_bind(con, who.c_str(), LDAP_SASL_SIMPLE, &cred, NULL, NULL, &msgid);
- free(cred.bv_val);
- if (ret != LDAP_SUCCESS)
- {
- if (ret == LDAP_SERVER_DOWN || ret == LDAP_TIMEOUT)
- {
- this->Reconnect();
- return this->Bind(i, who, pass);
- }
- else
- throw LDAPException(ldap_err2string(ret));
- }
-
- SaveInterface(i, msgid);
- return msgid;
+ LDAPBind* b = new LDAPBind(this, i, who, pass);
+ QueueRequest(b);
}
- LDAPQuery Search(LDAPInterface* i, const std::string& base, const std::string& filter) CXX11_OVERRIDE
+ void Search(LDAPInterface* i, const std::string& base, const std::string& filter) CXX11_OVERRIDE
{
if (i == NULL)
throw LDAPException("No interface");
- LDAPQuery msgid;
- int ret = ldap_search_ext(this->con, base.c_str(), searchscope, filter.c_str(), NULL, 0, NULL, NULL, NULL, 0, &msgid);
- if (ret != LDAP_SUCCESS)
- {
- if (ret == LDAP_SERVER_DOWN || ret == LDAP_TIMEOUT)
- {
- this->Reconnect();
- return this->Search(i, base, filter);
- }
- else
- throw LDAPException(ldap_err2string(ret));
- }
-
- SaveInterface(i, msgid);
- return msgid;
+ LDAPSearch* s = new LDAPSearch(this, i, base, searchscope, filter);
+ QueueRequest(s);
}
- LDAPQuery Add(LDAPInterface* i, const std::string& dn, LDAPMods& attributes) CXX11_OVERRIDE
+ void Add(LDAPInterface* i, const std::string& dn, LDAPMods& attributes) CXX11_OVERRIDE
{
- LDAPMod** mods = this->BuildMods(attributes);
- LDAPQuery msgid;
- int ret = ldap_add_ext(this->con, dn.c_str(), mods, NULL, NULL, &msgid);
- this->FreeMods(mods);
-
- if (ret != LDAP_SUCCESS)
- {
- if (ret == LDAP_SERVER_DOWN || ret == LDAP_TIMEOUT)
- {
- this->Reconnect();
- return this->Add(i, dn, attributes);
- }
- else
- throw LDAPException(ldap_err2string(ret));
- }
-
- SaveInterface(i, msgid);
- return msgid;
+ LDAPAdd* add = new LDAPAdd(this, i, dn, attributes);
+ QueueRequest(add);
}
- LDAPQuery Del(LDAPInterface* i, const std::string& dn) CXX11_OVERRIDE
+ void Del(LDAPInterface* i, const std::string& dn) CXX11_OVERRIDE
{
- LDAPQuery msgid;
- int ret = ldap_delete_ext(this->con, dn.c_str(), NULL, NULL, &msgid);
-
- if (ret != LDAP_SUCCESS)
- {
- if (ret == LDAP_SERVER_DOWN || ret == LDAP_TIMEOUT)
- {
- this->Reconnect();
- return this->Del(i, dn);
- }
- else
- throw LDAPException(ldap_err2string(ret));
- }
-
- SaveInterface(i, msgid);
- return msgid;
+ LDAPDel* del = new LDAPDel(this, i, dn);
+ QueueRequest(del);
}
- LDAPQuery Modify(LDAPInterface* i, const std::string& base, LDAPMods& attributes) CXX11_OVERRIDE
+ void Modify(LDAPInterface* i, const std::string& base, LDAPMods& attributes) CXX11_OVERRIDE
{
- LDAPMod** mods = this->BuildMods(attributes);
- LDAPQuery msgid;
- int ret = ldap_modify_ext(this->con, base.c_str(), mods, NULL, NULL, &msgid);
- this->FreeMods(mods);
-
- if (ret != LDAP_SUCCESS)
- {
- if (ret == LDAP_SERVER_DOWN || ret == LDAP_TIMEOUT)
- {
- this->Reconnect();
- return this->Modify(i, base, attributes);
- }
- else
- throw LDAPException(ldap_err2string(ret));
- }
+ LDAPModify* mod = new LDAPModify(this, i, base, attributes);
+ QueueRequest(mod);
+ }
- SaveInterface(i, msgid);
- return msgid;
+ void Compare(LDAPInterface* i, const std::string& dn, const std::string& attr, const std::string& val) CXX11_OVERRIDE
+ {
+ LDAPCompare* comp = new LDAPCompare(this, i, dn, attr, val);
+ QueueRequest(comp);
}
- LDAPQuery Compare(LDAPInterface* i, const std::string& dn, const std::string& attr, const std::string& val) CXX11_OVERRIDE
+ private:
+ void BuildReply(int res, LDAPRequest* req)
{
- berval cred;
- cred.bv_val = strdup(val.c_str());
- cred.bv_len = val.length();
+ LDAPResult* ldap_result = req->result = new LDAPResult();
+ req->result->type = req->type;
- LDAPQuery msgid;
- int ret = ldap_compare_ext(con, dn.c_str(), attr.c_str(), &cred, NULL, NULL, &msgid);
- free(cred.bv_val);
+ if (res != LDAP_SUCCESS)
+ {
+ ldap_result->error = ldap_err2string(res);
+ return;
+ }
- if (ret != LDAP_SUCCESS)
+ if (req->message == NULL)
{
- if (ret == LDAP_SERVER_DOWN || ret == LDAP_TIMEOUT)
- {
- this->Reconnect();
- return this->Compare(i, dn, attr, val);
- }
- else
- throw LDAPException(ldap_err2string(ret));
+ return;
}
- SaveInterface(i, msgid);
- return msgid;
- }
+ /* a search result */
- void Run() CXX11_OVERRIDE
- {
- while (!this->GetExitFlag())
+ for (LDAPMessage* cur = ldap_first_message(this->con, req->message); cur; cur = ldap_next_message(this->con, cur))
{
- this->LockQueue();
- if (this->queries.empty())
+ LDAPAttributes attributes;
+
+ char* dn = ldap_get_dn(this->con, cur);
+ if (dn != NULL)
{
- this->WaitForQueue();
- this->UnlockQueue();
- continue;
+ attributes["dn"].push_back(dn);
+ ldap_memfree(dn);
+ dn = NULL;
}
- this->Timeout();
- this->UnlockQueue();
- struct timeval tv = { 1, 0 };
- LDAPMessage* result;
- int rtype = ldap_result(this->con, LDAP_RES_ANY, 1, &tv, &result);
- if (rtype <= 0 || this->GetExitFlag())
- continue;
+ BerElement* ber = NULL;
- int cur_id = ldap_msgid(result);
+ for (char* attr = ldap_first_attribute(this->con, cur, &ber); attr; attr = ldap_next_attribute(this->con, cur, ber))
+ {
+ berval** vals = ldap_get_values_len(this->con, cur, attr);
+ int count = ldap_count_values_len(vals);
- this->LockQueue();
+ std::vector<std::string> attrs;
+ for (int j = 0; j < count; ++j)
+ attrs.push_back(vals[j]->bv_val);
+ attributes[attr] = attrs;
- query_queue::iterator it = this->queries.find(cur_id);
- if (it == this->queries.end())
- {
- this->UnlockQueue();
- ldap_msgfree(result);
- continue;
+ ldap_value_free_len(vals);
+ ldap_memfree(attr);
}
- LDAPInterface* i = it->second.second;
- this->queries.erase(it);
+ if (ber != NULL)
+ ber_free(ber, 0);
- this->UnlockQueue();
+ ldap_result->messages.push_back(attributes);
+ }
+ }
- LDAPResult* ldap_result = new LDAPResult();
- ldap_result->id = cur_id;
+ void SendRequests()
+ {
+ process_mutex.Lock();
- for (LDAPMessage* cur = ldap_first_message(this->con, result); cur; cur = ldap_next_message(this->con, cur))
- {
- int cur_type = ldap_msgtype(cur);
+ query_queue q;
+ this->LockQueue();
+ queries.swap(q);
+ this->UnlockQueue();
- LDAPAttributes attributes;
+ if (q.empty())
+ {
+ process_mutex.Unlock();
+ return;
+ }
- {
- char* dn = ldap_get_dn(this->con, cur);
- if (dn != NULL)
- {
- attributes["dn"].push_back(dn);
- ldap_memfree(dn);
- }
- }
+ for (unsigned int i = 0; i < q.size(); ++i)
+ {
+ LDAPRequest* req = q[i];
+ int ret = req->run();
- switch (cur_type)
+ if (ret == LDAP_SERVER_DOWN || ret == LDAP_TIMEOUT)
+ {
+ /* try again */
+ try
{
- case LDAP_RES_BIND:
- ldap_result->type = LDAPResult::QUERY_BIND;
- break;
- case LDAP_RES_SEARCH_ENTRY:
- ldap_result->type = LDAPResult::QUERY_SEARCH;
- break;
- case LDAP_RES_ADD:
- ldap_result->type = LDAPResult::QUERY_ADD;
- break;
- case LDAP_RES_DELETE:
- ldap_result->type = LDAPResult::QUERY_DELETE;
- break;
- case LDAP_RES_MODIFY:
- ldap_result->type = LDAPResult::QUERY_MODIFY;
- break;
- case LDAP_RES_SEARCH_RESULT:
- // If we get here and ldap_result->type is LDAPResult::QUERY_UNKNOWN
- // then the result set is empty
- ldap_result->type = LDAPResult::QUERY_SEARCH;
- break;
- case LDAP_RES_COMPARE:
- ldap_result->type = LDAPResult::QUERY_COMPARE;
- break;
- default:
- continue;
+ Reconnect();
}
-
- switch (cur_type)
+ catch (const LDAPException &)
{
- case LDAP_RES_SEARCH_ENTRY:
- {
- BerElement* ber = NULL;
- for (char* attr = ldap_first_attribute(this->con, cur, &ber); attr; attr = ldap_next_attribute(this->con, cur, ber))
- {
- berval** vals = ldap_get_values_len(this->con, cur, attr);
- int count = ldap_count_values_len(vals);
-
- std::vector<std::string> attrs;
- for (int j = 0; j < count; ++j)
- attrs.push_back(vals[j]->bv_val);
- attributes[attr] = attrs;
-
- ldap_value_free_len(vals);
- ldap_memfree(attr);
- }
- if (ber != NULL)
- ber_free(ber, 0);
-
- break;
- }
- case LDAP_RES_BIND:
- case LDAP_RES_ADD:
- case LDAP_RES_DELETE:
- case LDAP_RES_MODIFY:
- case LDAP_RES_COMPARE:
- {
- int errcode = -1;
- int parse_result = ldap_parse_result(this->con, cur, &errcode, NULL, NULL, NULL, NULL, 0);
- if (parse_result != LDAP_SUCCESS)
- {
- ldap_result->error = ldap_err2string(parse_result);
- }
- else
- {
- if (cur_type == LDAP_RES_COMPARE)
- {
- if (errcode != LDAP_COMPARE_TRUE)
- ldap_result->error = ldap_err2string(errcode);
- }
- else if (errcode != LDAP_SUCCESS)
- ldap_result->error = ldap_err2string(errcode);
- }
- break;
- }
- default:
- continue;
}
- ldap_result->messages.push_back(attributes);
+ ret = req->run();
}
- ldap_msgfree(result);
+ BuildReply(ret, req);
this->LockQueue();
- this->results.push_back(std::make_pair(i, ldap_result));
- this->UnlockQueueWakeup();
+ this->results.push_back(req);
+ this->UnlockQueue();
+ }
+
+ this->NotifyParent();
+
+ process_mutex.Unlock();
+ }
- this->NotifyParent();
+ public:
+ void Run() CXX11_OVERRIDE
+ {
+ while (!this->GetExitFlag())
+ {
+ this->LockQueue();
+ if (this->queries.empty())
+ this->WaitForQueue();
+ this->UnlockQueue();
+
+ SendRequests();
}
}
void OnNotify() CXX11_OVERRIDE
{
- LDAPService::result_queue r;
+ query_queue r;
this->LockQueue();
this->results.swap(r);
this->UnlockQueue();
- for (LDAPService::result_queue::iterator i = r.begin(); i != r.end(); ++i)
+ for (unsigned int i = 0; i < r.size(); ++i)
{
- LDAPInterface* li = i->first;
- LDAPResult* res = i->second;
+ LDAPRequest* req = r[i];
+ LDAPInterface* li = req->inter;
+ LDAPResult* res = req->result;
if (!res->error.empty())
li->OnError(*res);
else
li->OnResult(*res);
- delete res;
+ delete req;
}
}
+
+ LDAP* GetConnection()
+ {
+ return con;
+ }
};
class ModuleLDAP : public Module
@@ -583,28 +563,36 @@ class ModuleLDAP : public Module
for (ServiceMap::iterator it = this->LDAPServices.begin(); it != this->LDAPServices.end(); ++it)
{
LDAPService* s = it->second;
+
+ s->process_mutex.Lock();
s->LockQueue();
- for (LDAPService::query_queue::iterator it2 = s->queries.begin(); it2 != s->queries.end();)
+
+ for (unsigned int i = s->queries.size(); i > 0; --i)
{
- int msgid = it2->first;
- LDAPInterface* i = it2->second.second;
- ++it2;
+ LDAPRequest* req = s->queries[i - 1];
+ LDAPInterface* li = req->inter;
- if (i->creator == m)
- s->queries.erase(msgid);
+ if (li->creator == m)
+ {
+ s->queries.erase(s->queries.begin() + i - 1);
+ delete req;
+ }
}
+
for (unsigned int i = s->results.size(); i > 0; --i)
{
- LDAPInterface* li = s->results[i - 1].first;
- LDAPResult* r = s->results[i - 1].second;
+ LDAPRequest* req = s->results[i - 1];
+ LDAPInterface* li = req->inter;
if (li->creator == m)
{
s->results.erase(s->results.begin() + i - 1);
- delete r;
+ delete req;
}
}
+
s->UnlockQueue();
+ s->process_mutex.Unlock();
}
}
@@ -625,4 +613,57 @@ class ModuleLDAP : public Module
}
};
+int LDAPBind::run()
+{
+ berval cred;
+ cred.bv_val = strdup(pass.c_str());
+ cred.bv_len = pass.length();
+
+ int i = ldap_sasl_bind_s(service->GetConnection(), who.c_str(), LDAP_SASL_SIMPLE, &cred, NULL, NULL, NULL);
+
+ free(cred.bv_val);
+
+ return i;
+}
+
+int LDAPSearch::run()
+{
+ return ldap_search_ext_s(service->GetConnection(), base.c_str(), searchscope, filter.c_str(), NULL, 0, NULL, NULL, &tv, 0, &message);
+}
+
+int LDAPAdd::run()
+{
+ LDAPMod** mods = LDAPService::BuildMods(attributes);
+ int i = ldap_add_ext_s(service->GetConnection(), dn.c_str(), mods, NULL, NULL);
+ LDAPService::FreeMods(mods);
+ return i;
+}
+
+int LDAPDel::run()
+{
+ return ldap_delete_ext_s(service->GetConnection(), dn.c_str(), NULL, NULL);
+}
+
+int LDAPModify::run()
+{
+ LDAPMod** mods = LDAPService::BuildMods(attributes);
+ int i = ldap_modify_ext_s(service->GetConnection(), base.c_str(), mods, NULL, NULL);
+ LDAPService::FreeMods(mods);
+ return i;
+}
+
+int LDAPCompare::run()
+{
+ berval cred;
+ cred.bv_val = strdup(val.c_str());
+ cred.bv_len = val.length();
+
+ int ret = ldap_compare_ext_s(service->GetConnection(), dn.c_str(), attr.c_str(), &cred, NULL, NULL);
+
+ free(cred.bv_val);
+
+ return ret;
+
+}
+
MODULE_INIT(ModuleLDAP)
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index d33403aba..962e80d28 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -37,6 +37,7 @@
#ifndef GNUTLS_VERSION_NUMBER
#define GNUTLS_VERSION_NUMBER LIBGNUTLS_VERSION_NUMBER
+#define GNUTLS_VERSION LIBGNUTLS_VERSION
#endif
// Check if the GnuTLS library is at least version major.minor.patch
@@ -92,6 +93,10 @@ typedef unsigned int inspircd_gnutls_session_init_flags_t;
typedef gnutls_connection_end_t inspircd_gnutls_session_init_flags_t;
#endif
+#if INSPIRCD_GNUTLS_HAS_VERSION(3, 1, 9)
+#define INSPIRCD_GNUTLS_HAS_CORK
+#endif
+
class RandGen : public HandlerBase2<void, char*, size_t>
{
public:
@@ -531,14 +536,20 @@ namespace GnuTLS
*/
Priority priority;
+ /** Rough max size of records to send
+ */
+ const unsigned int outrecsize;
+
Profile(const std::string& profilename, const std::string& certstr, const std::string& keystr,
std::auto_ptr<DHParams>& DH, unsigned int mindh, const std::string& hashstr,
- const std::string& priostr, std::auto_ptr<X509CertList>& CA, std::auto_ptr<X509CRL>& CRL)
+ const std::string& priostr, std::auto_ptr<X509CertList>& CA, std::auto_ptr<X509CRL>& CRL,
+ unsigned int recsize)
: name(profilename)
, x509cred(certstr, keystr)
, min_dh_bits(mindh)
, hash(hashstr)
, priority(priostr)
+ , outrecsize(recsize)
{
x509cred.SetDH(DH);
x509cred.SetCA(CA, CRL);
@@ -587,7 +598,13 @@ namespace GnuTLS
crl.reset(new X509CRL(ReadFile(filename)));
}
- return new Profile(profilename, certstr, keystr, dh, mindh, hashstr, priostr, ca, crl);
+#ifdef INSPIRCD_GNUTLS_HAS_CORK
+ // If cork support is available outrecsize represents the (rough) max amount of data we give GnuTLS while corked
+ unsigned int outrecsize = tag->getInt("outrecsize", 2048, 512);
+#else
+ unsigned int outrecsize = tag->getInt("outrecsize", 2048, 512, 16384);
+#endif
+ return new Profile(profilename, certstr, keystr, dh, mindh, hashstr, priostr, ca, crl, outrecsize);
}
/** Set up the given session with the settings in this profile
@@ -605,6 +622,7 @@ namespace GnuTLS
const std::string& GetName() const { return name; }
X509Credentials& GetX509Credentials() { return x509cred; }
gnutls_digest_algorithm_t GetHash() const { return hash.get(); }
+ unsigned int GetOutgoingRecordSize() const { return outrecsize; }
};
}
@@ -614,6 +632,9 @@ class GnuTLSIOHook : public SSLIOHook
gnutls_session_t sess;
issl_status status;
reference<GnuTLS::Profile> profile;
+#ifdef INSPIRCD_GNUTLS_HAS_CORK
+ size_t gbuffersize;
+#endif
void CloseSession()
{
@@ -793,6 +814,43 @@ info_done_dealloc:
return -1;
}
+#ifdef INSPIRCD_GNUTLS_HAS_CORK
+ int FlushBuffer(StreamSocket* sock)
+ {
+ // If GnuTLS has some data buffered, write it
+ if (gbuffersize)
+ return HandleWriteRet(sock, gnutls_record_uncork(this->sess, 0));
+ return 1;
+ }
+#endif
+
+ int HandleWriteRet(StreamSocket* sock, int ret)
+ {
+ if (ret > 0)
+ {
+#ifdef INSPIRCD_GNUTLS_HAS_CORK
+ gbuffersize -= ret;
+ if (gbuffersize)
+ {
+ SocketEngine::ChangeEventMask(sock, FD_WANT_SINGLE_WRITE);
+ return 0;
+ }
+#endif
+ return ret;
+ }
+ else if (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED || ret == 0)
+ {
+ SocketEngine::ChangeEventMask(sock, FD_WANT_SINGLE_WRITE);
+ return 0;
+ }
+ else // (ret < 0)
+ {
+ sock->SetError(gnutls_strerror(ret));
+ CloseSession();
+ return -1;
+ }
+ }
+
static const char* UnknownIfNULL(const char* str)
{
return str ? str : "UNKNOWN";
@@ -913,6 +971,9 @@ info_done_dealloc:
, sess(NULL)
, status(ISSL_NONE)
, profile(sslprofile)
+#ifdef INSPIRCD_GNUTLS_HAS_CORK
+ , gbuffersize(0)
+#endif
{
gnutls_init(&sess, flags);
gnutls_transport_set_ptr(sess, reinterpret_cast<gnutls_transport_ptr_t>(sock));
@@ -968,7 +1029,7 @@ info_done_dealloc:
}
}
- int OnStreamSocketWrite(StreamSocket* user, std::string& sendq) CXX11_OVERRIDE
+ int OnStreamSocketWrite(StreamSocket* user) CXX11_OVERRIDE
{
// Finish handshake if needed
int prepret = PrepareIO(user);
@@ -976,34 +1037,60 @@ info_done_dealloc:
return prepret;
// Session is ready for transferring application data
- int ret = 0;
+ StreamSocket::SendQueue& sendq = user->GetSendQ();
+#ifdef INSPIRCD_GNUTLS_HAS_CORK
+ while (true)
{
- ret = gnutls_record_send(this->sess, sendq.data(), sendq.length());
-
- if (ret == (int)sendq.length())
- {
- SocketEngine::ChangeEventMask(user, FD_WANT_NO_WRITE);
- return 1;
- }
- else if (ret > 0)
+ // If there is something in the GnuTLS buffer try to send() it
+ int ret = FlushBuffer(user);
+ if (ret <= 0)
+ return ret; // Couldn't flush entire buffer, retry later (or close on error)
+
+ // GnuTLS buffer is empty, if the sendq is empty as well then break to set FD_WANT_NO_WRITE
+ if (sendq.empty())
+ break;
+
+ // GnuTLS buffer is empty but sendq is not, begin sending data from the sendq
+ gnutls_record_cork(this->sess);
+ while ((!sendq.empty()) && (gbuffersize < profile->GetOutgoingRecordSize()))
{
- sendq.erase(0, ret);
- SocketEngine::ChangeEventMask(user, FD_WANT_SINGLE_WRITE);
- return 0;
+ const StreamSocket::SendQueue::Element& elem = sendq.front();
+ gbuffersize += elem.length();
+ ret = gnutls_record_send(this->sess, elem.data(), elem.length());
+ if (ret < 0)
+ {
+ CloseSession();
+ return -1;
+ }
+ sendq.pop_front();
}
- else if (ret == GNUTLS_E_AGAIN || ret == GNUTLS_E_INTERRUPTED || ret == 0)
+ }
+#else
+ int ret = 0;
+
+ while (!sendq.empty())
+ {
+ FlattenSendQueue(sendq, profile->GetOutgoingRecordSize());
+ const StreamSocket::SendQueue::Element& buffer = sendq.front();
+ ret = HandleWriteRet(user, gnutls_record_send(this->sess, buffer.data(), buffer.length()));
+
+ if (ret <= 0)
+ return ret;
+ else if (ret < (int)buffer.length())
{
+ sendq.erase_front(ret);
SocketEngine::ChangeEventMask(user, FD_WANT_SINGLE_WRITE);
return 0;
}
- else // (ret < 0)
- {
- user->SetError(gnutls_strerror(ret));
- CloseSession();
- return -1;
- }
+
+ // Wrote entire record, continue sending
+ sendq.pop_front();
}
+#endif
+
+ SocketEngine::ChangeEventMask(user, FD_WANT_NO_WRITE);
+ return 1;
}
void TellCiphersAndFingerprint(LocalUser* user)
@@ -1155,6 +1242,7 @@ class ModuleSSLGnuTLS : public Module
void init() CXX11_OVERRIDE
{
+ ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "GnuTLS lib version %s module was compiled for " GNUTLS_VERSION, gnutls_check_version(NULL));
ReadProfiles();
ServerInstance->GenRandom = &randhandler;
}
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index c8a035fac..e313ca7b5 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -238,6 +238,10 @@ namespace OpenSSL
*/
const bool allowrenego;
+ /** Rough max size of records to send
+ */
+ const unsigned int outrecsize;
+
static int error_callback(const char* str, size_t len, void* u)
{
Profile* profile = reinterpret_cast<Profile*>(u);
@@ -278,6 +282,7 @@ namespace OpenSSL
, ctx(SSL_CTX_new(SSLv23_server_method()))
, clictx(SSL_CTX_new(SSLv23_client_method()))
, allowrenego(tag->getBool("renegotiation", true))
+ , outrecsize(tag->getInt("outrecsize", 2048, 512, 16384))
{
if ((!ctx.SetDH(dh)) || (!clictx.SetDH(dh)))
throw Exception("Couldn't set DH parameters");
@@ -337,6 +342,7 @@ namespace OpenSSL
SSL* CreateClientSession() { return clictx.CreateClientSession(); }
const EVP_MD* GetDigest() { return digest; }
bool AllowRenegotiation() const { return allowrenego; }
+ unsigned int GetOutgoingRecordSize() const { return outrecsize; }
};
}
@@ -601,7 +607,7 @@ class OpenSSLIOHook : public SSLIOHook
}
}
- int OnStreamSocketWrite(StreamSocket* user, std::string& buffer) CXX11_OVERRIDE
+ int OnStreamSocketWrite(StreamSocket* user) CXX11_OVERRIDE
{
// Finish handshake if needed
int prepret = PrepareIO(user);
@@ -611,8 +617,12 @@ class OpenSSLIOHook : public SSLIOHook
data_to_write = true;
// Session is ready for transferring application data
+ StreamSocket::SendQueue& sendq = user->GetSendQ();
+ while (!sendq.empty())
{
ERR_clear_error();
+ FlattenSendQueue(sendq, profile->GetOutgoingRecordSize());
+ const StreamSocket::SendQueue::Element& buffer = sendq.front();
int ret = SSL_write(sess, buffer.data(), buffer.size());
#ifdef INSPIRCD_OPENSSL_ENABLE_RENEGO_DETECTION
@@ -622,13 +632,12 @@ class OpenSSLIOHook : public SSLIOHook
if (ret == (int)buffer.length())
{
- data_to_write = false;
- SocketEngine::ChangeEventMask(user, FD_WANT_POLL_READ | FD_WANT_NO_WRITE);
- return 1;
+ // Wrote entire record, continue sending
+ sendq.pop_front();
}
else if (ret > 0)
{
- buffer.erase(0, ret);
+ sendq.erase_front(ret);
SocketEngine::ChangeEventMask(user, FD_WANT_SINGLE_WRITE);
return 0;
}
@@ -658,6 +667,10 @@ class OpenSSLIOHook : public SSLIOHook
}
}
}
+
+ data_to_write = false;
+ SocketEngine::ChangeEventMask(user, FD_WANT_POLL_READ | FD_WANT_NO_WRITE);
+ return 1;
}
void TellCiphersAndFingerprint(LocalUser* user)
@@ -787,6 +800,8 @@ class ModuleSSLOpenSSL : public Module
void init() CXX11_OVERRIDE
{
+ ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "OpenSSL lib version \"%s\" module was compiled for \"" OPENSSL_VERSION_TEXT "\"", SSLeay_version(SSLEAY_VERSION));
+
// Register application specific data
char exdatastr[] = "inspircd";
exdataindex = SSL_get_ex_new_index(0, exdatastr, NULL, NULL, NULL);
diff --git a/src/modules/m_alias.cpp b/src/modules/m_alias.cpp
index 6bd59a780..1076b0a9a 100644
--- a/src/modules/m_alias.cpp
+++ b/src/modules/m_alias.cpp
@@ -57,7 +57,7 @@ class Alias
class ModuleAlias : public Module
{
- char fprefix;
+ std::string fprefix;
/* We cant use a map, there may be multiple aliases with the same name.
* We can, however, use a fancy invention: the multimap. Maps a key to one or more values.
@@ -76,8 +76,8 @@ class ModuleAlias : public Module
{
ConfigTag* fantasy = ServerInstance->Config->ConfValue("fantasy");
AllowBots = fantasy->getBool("allowbots", false);
- std::string fpre = fantasy->getString("prefix", "!");
- fprefix = fpre.empty() ? '!' : fpre[0];
+ std::string fpre = fantasy->getString("prefix");
+ fprefix = fpre.empty() ? "!" : fpre;
Aliases.clear();
ConfigTagList tags = ServerInstance->Config->ConfTags("alias");
@@ -193,26 +193,26 @@ class ModuleAlias : public Module
irc::spacesepstream ss(text);
ss.GetToken(scommand);
- if (scommand.empty())
+ if (scommand.size() <= fprefix.size())
{
return; // wtfbbq
}
// we don't want to touch non-fantasy stuff
- if (*scommand.c_str() != fprefix)
+ if (scommand.compare(0, fprefix.size(), fprefix) != 0)
{
return;
}
// nor do we give a shit about the prefix
- scommand.erase(scommand.begin());
+ scommand.erase(0, fprefix.size());
std::pair<AliasMap::iterator, AliasMap::iterator> iters = Aliases.equal_range(scommand);
if (iters.first == iters.second)
return;
/* The parameters for the command in their original form, with the command stripped off */
- std::string compare(text, scommand.length() + 1);
+ std::string compare(text, scommand.length() + fprefix.size());
while (*(compare.c_str()) == ' ')
compare.erase(compare.begin());
@@ -220,8 +220,8 @@ class ModuleAlias : public Module
{
if (i->second.ChannelCommand)
{
- // We use substr(1) here to remove the fantasy prefix
- if (DoAlias(user, c, &(i->second), compare, text.substr(1)))
+ // We use substr here to remove the fantasy prefix
+ if (DoAlias(user, c, &(i->second), compare, text.substr(fprefix.size())))
return;
}
}
diff --git a/src/modules/m_callerid.cpp b/src/modules/m_callerid.cpp
index 5c6d14a90..26b9d0da2 100644
--- a/src/modules/m_callerid.cpp
+++ b/src/modules/m_callerid.cpp
@@ -426,6 +426,12 @@ public:
tracknick = tag->getBool("tracknick");
notify_cooldown = tag->getInt("cooldown", 60);
}
+
+ void Prioritize() CXX11_OVERRIDE
+ {
+ // Want to be after modules like silence or services_account
+ ServerInstance->Modules->SetPriority(this, I_OnUserPreMessage, PRIORITY_LAST);
+ }
};
MODULE_INIT(ModuleCallerID)
diff --git a/src/modules/m_close.cpp b/src/modules/m_close.cpp
index f3c751f17..3f0eedaaf 100644
--- a/src/modules/m_close.cpp
+++ b/src/modules/m_close.cpp
@@ -36,9 +36,11 @@ class CommandClose : public Command
std::map<std::string,int> closed;
const UserManager::LocalList& list = ServerInstance->Users.GetLocalUsers();
- for (UserManager::LocalList::const_iterator u = list.begin(); u != list.end(); ++u)
+ for (UserManager::LocalList::const_iterator u = list.begin(); u != list.end(); )
{
+ // Quitting the user removes it from the list
LocalUser* user = *u;
+ ++u;
if (user->registered != REG_ALL)
{
ServerInstance->Users->QuitUser(user, "Closing all unknown connections per request");
diff --git a/src/modules/m_hidechans.cpp b/src/modules/m_hidechans.cpp
index cd3ac2c26..431b7b968 100644
--- a/src/modules/m_hidechans.cpp
+++ b/src/modules/m_hidechans.cpp
@@ -28,12 +28,14 @@ class HideChans : public SimpleUserModeHandler
HideChans(Module* Creator) : SimpleUserModeHandler(Creator, "hidechans", 'I') { }
};
-class ModuleHideChans : public Module
+class ModuleHideChans : public Module, public Whois::LineEventListener
{
bool AffectsOpers;
HideChans hm;
public:
- ModuleHideChans() : hm(this)
+ ModuleHideChans()
+ : Whois::LineEventListener(this)
+ , hm(this)
{
}
@@ -47,10 +49,10 @@ class ModuleHideChans : public Module
AffectsOpers = ServerInstance->Config->ConfValue("hidechans")->getBool("affectsopers");
}
- ModResult OnWhoisLine(User* user, User* dest, int &numeric, std::string &text) CXX11_OVERRIDE
+ ModResult OnWhoisLine(Whois::Context& whois, unsigned int& numeric, std::string& text) CXX11_OVERRIDE
{
/* always show to self */
- if (user == dest)
+ if (whois.IsSelfWhois())
return MOD_RES_PASSTHRU;
/* don't touch anything except 319 */
@@ -58,7 +60,7 @@ class ModuleHideChans : public Module
return MOD_RES_PASSTHRU;
/* don't touch if -I */
- if (!dest->IsModeSet(hm))
+ if (!whois.GetTarget()->IsModeSet(hm))
return MOD_RES_PASSTHRU;
/* if it affects opers, we don't care if they are opered */
@@ -66,7 +68,7 @@ class ModuleHideChans : public Module
return MOD_RES_DENY;
/* doesn't affect opers, sender is opered */
- if (user->HasPrivPermission("users/auspex"))
+ if (whois.GetSource()->HasPrivPermission("users/auspex"))
return MOD_RES_PASSTHRU;
/* user must be opered, boned. */
diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp
index 81b9b888f..9f40d702e 100644
--- a/src/modules/m_hideoper.cpp
+++ b/src/modules/m_hideoper.cpp
@@ -32,12 +32,13 @@ class HideOper : public SimpleUserModeHandler
}
};
-class ModuleHideOper : public Module
+class ModuleHideOper : public Module, public Whois::LineEventListener
{
HideOper hm;
public:
ModuleHideOper()
- : hm(this)
+ : Whois::LineEventListener(this)
+ , hm(this)
{
}
@@ -46,7 +47,7 @@ class ModuleHideOper : public Module
return Version("Provides support for hiding oper status with user mode +H", VF_VENDOR);
}
- ModResult OnWhoisLine(User* user, User* dest, int &numeric, std::string &text) CXX11_OVERRIDE
+ ModResult OnWhoisLine(Whois::Context& whois, unsigned int& numeric, std::string& text) CXX11_OVERRIDE
{
/* Dont display numeric 313 (RPL_WHOISOPER) if they have +H set and the
* person doing the WHOIS is not an oper
@@ -54,10 +55,10 @@ class ModuleHideOper : public Module
if (numeric != 313)
return MOD_RES_PASSTHRU;
- if (!dest->IsModeSet(hm))
+ if (!whois.GetTarget()->IsModeSet(hm))
return MOD_RES_PASSTHRU;
- if (!user->HasPrivPermission("users/auspex"))
+ if (!whois.GetSource()->HasPrivPermission("users/auspex"))
return MOD_RES_DENY;
return MOD_RES_PASSTHRU;
diff --git a/src/modules/m_jumpserver.cpp b/src/modules/m_jumpserver.cpp
index 599144448..e9c07f45f 100644
--- a/src/modules/m_jumpserver.cpp
+++ b/src/modules/m_jumpserver.cpp
@@ -109,9 +109,11 @@ class CommandJumpserver : public Command
{
/* Redirect everyone but the oper sending the command */
const UserManager::LocalList& list = ServerInstance->Users.GetLocalUsers();
- for (UserManager::LocalList::const_iterator i = list.begin(); i != list.end(); ++i)
+ for (UserManager::LocalList::const_iterator i = list.begin(); i != list.end(); )
{
+ // Quitting the user removes it from the list
LocalUser* t = *i;
+ ++i;
if (!t->IsOper())
{
t->WriteNumeric(RPL_REDIR, "%s %d :Please use this Server/Port instead", parameters[0].c_str(), GetPort(t));
diff --git a/src/modules/m_nationalchars.cpp b/src/modules/m_nationalchars.cpp
index f77899ad4..8e74ee3e6 100644
--- a/src/modules/m_nationalchars.cpp
+++ b/src/modules/m_nationalchars.cpp
@@ -292,10 +292,12 @@ class ModuleNationalChars : public Module
return;
const UserManager::LocalList& list = ServerInstance->Users.GetLocalUsers();
- for (UserManager::LocalList::const_iterator iter = list.begin(); iter != list.end(); ++iter)
+ for (UserManager::LocalList::const_iterator iter = list.begin(); iter != list.end(); )
{
/* Fix by Brain: Dont quit UID users */
+ // Quitting the user removes it from the list
User* n = *iter;
+ ++iter;
if (!isdigit(n->nick[0]) && !ServerInstance->IsNick(n->nick))
ServerInstance->Users->QuitUser(n, message);
}
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index 4ad339fcb..a11b05ca3 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -133,7 +133,7 @@ class AccountExtItemImpl : public AccountExtItem
}
};
-class ModuleServicesAccount : public Module
+class ModuleServicesAccount : public Module, public Whois::EventListener
{
AChannel_R m1;
AChannel_M m2;
@@ -143,8 +143,10 @@ class ModuleServicesAccount : public Module
AccountExtItemImpl accountname;
bool checking_ban;
public:
- ModuleServicesAccount() : m1(this), m2(this), m3(this), m4(this), m5(this),
- accountname(this)
+ ModuleServicesAccount()
+ : Whois::EventListener(this)
+ , m1(this), m2(this), m3(this), m4(this), m5(this)
+ , accountname(this)
, checking_ban(false)
{
}
diff --git a/src/modules/m_servprotect.cpp b/src/modules/m_servprotect.cpp
index 2ed37b9e4..0445235dc 100644
--- a/src/modules/m_servprotect.cpp
+++ b/src/modules/m_servprotect.cpp
@@ -42,12 +42,13 @@ class ServProtectMode : public ModeHandler
}
};
-class ModuleServProtectMode : public Module, public Whois::EventListener
+class ModuleServProtectMode : public Module, public Whois::EventListener, public Whois::LineEventListener
{
ServProtectMode bm;
public:
ModuleServProtectMode()
: Whois::EventListener(this)
+ , Whois::LineEventListener(this)
, bm(this)
{
}
@@ -120,9 +121,9 @@ class ModuleServProtectMode : public Module, public Whois::EventListener
return MOD_RES_PASSTHRU;
}
- ModResult OnWhoisLine(User* src, User* dst, int &numeric, std::string &text) CXX11_OVERRIDE
+ ModResult OnWhoisLine(Whois::Context& whois, unsigned int& numeric, std::string& text) CXX11_OVERRIDE
{
- return ((numeric == 319) && dst->IsModeSet(bm)) ? MOD_RES_DENY : MOD_RES_PASSTHRU;
+ return ((numeric == 319) && whois.GetTarget()->IsModeSet(bm)) ? MOD_RES_DENY : MOD_RES_PASSTHRU;
}
};
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp
index 502f947f4..f2ac26fb3 100644
--- a/src/modules/m_silence.cpp
+++ b/src/modules/m_silence.cpp
@@ -45,8 +45,8 @@
// pair of hostmask and flags
typedef std::pair<std::string, int> silenceset;
-// deque list of pairs
-typedef std::deque<silenceset> silencelist;
+// list of pairs
+typedef std::vector<silenceset> silencelist;
// intmasks for flags
static int SILENCE_PRIVATE = 0x0001; /* p private messages */
@@ -212,7 +212,7 @@ class CommandSilence : public Command
}
if (((pattern & SILENCE_EXCLUDE) > 0))
{
- sl->push_front(silenceset(mask,pattern));
+ sl->insert(sl->begin(), silenceset(mask, pattern));
}
else
{
@@ -318,7 +318,7 @@ class ModuleSilence : public Module
tokens["SILENCE"] = ConvToStr(maxsilence);
}
- void OnBuildExemptList(MessageType message_type, Channel* chan, User* sender, char status, CUList &exempt_list, const std::string &text)
+ void BuildExemptList(MessageType message_type, Channel* chan, User* sender, CUList& exempt_list)
{
int public_silence = (message_type == MSG_PRIVMSG ? SILENCE_CHANNEL : SILENCE_CNOTICE);
@@ -344,7 +344,7 @@ class ModuleSilence : public Module
else if (target_type == TYPE_CHANNEL)
{
Channel* chan = (Channel*)dest;
- this->OnBuildExemptList(msgtype, chan, user, status, exempt_list, "");
+ BuildExemptList(msgtype, chan, user, exempt_list);
}
return MOD_RES_PASSTHRU;
}
diff --git a/src/modules/m_spanningtree/nick.cpp b/src/modules/m_spanningtree/nick.cpp
index 9496c2874..1d853a2df 100644
--- a/src/modules/m_spanningtree/nick.cpp
+++ b/src/modules/m_spanningtree/nick.cpp
@@ -47,7 +47,7 @@ CmdResult CommandNick::HandleRemote(RemoteUser* user, std::vector<std::string>&
{
// 'x' is the already existing user using the same nick as params[0]
// 'user' is the user trying to change nick to the in use nick
- bool they_change = Utils->DoCollision(x, TreeServer::Get(user), newts, user->ident, user->GetIPString(), user->uuid);
+ bool they_change = Utils->DoCollision(x, TreeServer::Get(user), newts, user->ident, user->GetIPString(), user->uuid, "NICK");
if (they_change)
{
// Remote client lost, or both lost, rewrite this nick change as a change to uuid before
diff --git a/src/modules/m_spanningtree/nickcollide.cpp b/src/modules/m_spanningtree/nickcollide.cpp
index 3401041aa..62e200921 100644
--- a/src/modules/m_spanningtree/nickcollide.cpp
+++ b/src/modules/m_spanningtree/nickcollide.cpp
@@ -33,7 +33,7 @@
* Sends SAVEs as appropriate and forces nick change of the user 'u' if our side loses or if both lose.
* Does not change the nick of the user that is trying to claim the nick of 'u', i.e. the "remote" user.
*/
-bool SpanningTreeUtilities::DoCollision(User* u, TreeServer* server, time_t remotets, const std::string& remoteident, const std::string& remoteip, const std::string& remoteuid)
+bool SpanningTreeUtilities::DoCollision(User* u, TreeServer* server, time_t remotets, const std::string& remoteident, const std::string& remoteip, const std::string& remoteuid, const char* collidecmd)
{
// At this point we're sure that a collision happened, increment the counter regardless of who wins
ServerInstance->stats.Collisions++;
@@ -86,6 +86,10 @@ bool SpanningTreeUtilities::DoCollision(User* u, TreeServer* server, time_t remo
}
}
+ ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Nick collision on \"%s\" caused by %s: %s/%lu/%s@%s %d <-> %s/%lu/%s@%s %d", u->nick.c_str(), collidecmd,
+ u->uuid.c_str(), (unsigned long)localts, u->ident.c_str(), u->GetIPString().c_str(), bChangeLocal,
+ remoteuid.c_str(), (unsigned long)remotets, remoteident.c_str(), remoteip.c_str(), bChangeRemote);
+
/*
* Send SAVE and accept the losing client with its UID (as we know the SAVE will
* not fail under any circumstances -- UIDs are netwide exclusive).
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp
index 72361af38..a3b804579 100644
--- a/src/modules/m_spanningtree/uid.cpp
+++ b/src/modules/m_spanningtree/uid.cpp
@@ -59,9 +59,7 @@ CmdResult CommandUID::HandleServer(TreeServer* remoteserver, std::vector<std::st
else if (collideswith)
{
// The user on this side is registered, handle the collision
- bool they_change = Utils->DoCollision(collideswith, remoteserver, age_t, params[5], params[6], params[0]);
- ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Collision on %s %d", params[2].c_str(), they_change);
-
+ bool they_change = Utils->DoCollision(collideswith, remoteserver, age_t, params[5], params[6], params[0], "UID");
if (they_change)
{
// The client being introduced needs to change nick to uuid, change the nick in the message before
diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp
index 0cd6c76c2..bbda2634d 100644
--- a/src/modules/m_spanningtree/utils.cpp
+++ b/src/modules/m_spanningtree/utils.cpp
@@ -117,6 +117,7 @@ TreeServer* SpanningTreeUtilities::FindServerID(const std::string &id)
SpanningTreeUtilities::SpanningTreeUtilities(ModuleSpanningTree* C)
: Creator(C), TreeRoot(NULL)
+ , PingFreq(60) // XXX: TreeServer constructor reads this and TreeRoot is created before the config is read, so init it to something (value doesn't matter) to avoid a valgrind warning in TimerManager on unload
{
ServerInstance->Timers.AddTimer(&RefreshTimer);
}
diff --git a/src/modules/m_spanningtree/utils.h b/src/modules/m_spanningtree/utils.h
index 5aa8e925e..84637bf01 100644
--- a/src/modules/m_spanningtree/utils.h
+++ b/src/modules/m_spanningtree/utils.h
@@ -135,7 +135,7 @@ class SpanningTreeUtilities : public classbase
/** Handle nick collision
*/
- bool DoCollision(User* u, TreeServer* server, time_t remotets, const std::string& remoteident, const std::string& remoteip, const std::string& remoteuid);
+ bool DoCollision(User* u, TreeServer* server, time_t remotets, const std::string& remoteident, const std::string& remoteip, const std::string& remoteuid, const char* collidecmd);
/** Compile a list of servers which contain members of channel c
*/
diff --git a/src/server.cpp b/src/server.cpp
index 42dce1372..191a3d30f 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -46,7 +46,6 @@ void InspIRCd::Exit(int status)
#ifdef _WIN32
SetServiceStopped(status);
#endif
- this->SendError("Exiting with status " + ConvToStr(status) + " (" + std::string(ExitCodes[status]) + ")");
this->Cleanup();
ServerInstance = NULL;
delete this;
diff --git a/src/usermanager.cpp b/src/usermanager.cpp
index 4ebc3b583..7e92507ca 100644
--- a/src/usermanager.cpp
+++ b/src/usermanager.cpp
@@ -67,17 +67,7 @@ void UserManager::AddUser(int socket, ListenSocket* via, irc::sockets::sockaddrs
/* NOTE: Calling this one parameter constructor for User automatically
* allocates a new UUID and places it in the hash_map.
*/
- LocalUser* New = NULL;
- try
- {
- New = new LocalUser(socket, client, server);
- }
- catch (...)
- {
- ServerInstance->Logs->Log("USERS", LOG_DEFAULT, "*** WTF *** Duplicated UUID! -- Crack smoking monkeys have been unleashed.");
- ServerInstance->SNO->WriteToSnoMask('a', "WARNING *** Duplicate UUID allocated!");
- return;
- }
+ LocalUser* const New = new LocalUser(socket, client, server);
UserIOHandler* eh = &New->eh;
// If this listener has an IO hook provider set then tell it about the connection
@@ -320,9 +310,11 @@ void UserManager::DoBackgroundUserStuff()
/*
* loop over all local users..
*/
- for (LocalList::iterator i = local_users.begin(); i != local_users.end(); ++i)
+ for (LocalList::iterator i = local_users.begin(); i != local_users.end(); )
{
+ // It's possible that we quit the user below due to ping timeout etc. and QuitUser() removes it from the list
LocalUser* curr = *i;
+ ++i;
if (curr->CommandFloodPenalty || curr->eh.getSendQSize())
{