diff options
Diffstat (limited to 'src/modules/extra')
| -rw-r--r-- | src/modules/extra/m_ldap.cpp | 13 | ||||
| -rw-r--r-- | src/modules/extra/m_mysql.cpp | 3 | ||||
| -rw-r--r-- | src/modules/extra/m_pgsql.cpp | 3 | ||||
| -rw-r--r-- | src/modules/extra/m_sqlite3.cpp | 3 | ||||
| -rw-r--r-- | src/modules/extra/m_ssl_gnutls.cpp | 3 | ||||
| -rw-r--r-- | src/modules/extra/m_ssl_mbedtls.cpp | 3 | ||||
| -rw-r--r-- | src/modules/extra/m_ssl_openssl.cpp | 7 |
7 files changed, 21 insertions, 14 deletions
diff --git a/src/modules/extra/m_ldap.cpp b/src/modules/extra/m_ldap.cpp index d38d9f6d0..3c1fc50ef 100644 --- a/src/modules/extra/m_ldap.cpp +++ b/src/modules/extra/m_ldap.cpp @@ -31,8 +31,9 @@ #include "inspircd.h" -#include "threadsocket.h" #include "modules/ldap.h" +#include "threadsocket.h" +#include "utility/string.h" #if defined LDAP_API_FEATURE_X_OPENLDAP_REENTRANT && !LDAP_API_FEATURE_X_OPENLDAP_REENTRANT # error InspIRCd requires OpenLDAP to be built as reentrant. @@ -245,12 +246,12 @@ private: if (up.field_set & (1 << UF_SCHEMA)) { const std::string schema(url, up.field_data[UF_SCHEMA].off, up.field_data[UF_SCHEMA].len); - if (stdalgo::string::equalsci(schema, "ldaps")) + if (insp::equalsci(schema, "ldaps")) { port = 636; // Default encrypted port. secure = true; } - else if (!stdalgo::string::equalsci(schema, "ldap")) + else if (!insp::equalsci(schema, "ldap")) return LDAP_CONNECT_ERROR; // Invalid protocol. } @@ -359,9 +360,9 @@ public: , config(tag) { std::string scope = config->getString("searchscope"); - if (stdalgo::string::equalsci(scope, "base")) + if (insp::equalsci(scope, "base")) searchscope = LDAP_SCOPE_BASE; - else if (stdalgo::string::equalsci(scope, "onelevel")) + else if (insp::equalsci(scope, "onelevel")) searchscope = LDAP_SCOPE_ONELEVEL; else searchscope = LDAP_SCOPE_SUBTREE; @@ -618,7 +619,7 @@ public: for (const auto& [_, tag] : ServerInstance->Config->ConfTags("database")) { - if (!stdalgo::string::equalsci(tag->getString("module"), "ldap")) + if (!insp::equalsci(tag->getString("module"), "ldap")) continue; std::string id = tag->getString("id"); diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index 90256c900..e063185ae 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -42,6 +42,7 @@ #include "inspircd.h" #include "modules/sql.h" #include "threadsocket.h" +#include "utility/string.h" #ifdef _WIN32 # pragma comment(lib, "mysqlclient.lib") @@ -478,7 +479,7 @@ void ModuleSQL::ReadConfig(ConfigStatus& status) for (const auto& [_, tag] : ServerInstance->Config->ConfTags("database")) { - if (!stdalgo::string::equalsci(tag->getString("module"), "mysql")) + if (!insp::equalsci(tag->getString("module"), "mysql")) continue; std::string id = tag->getString("id"); diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 237d252ef..97476d2d5 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -42,6 +42,7 @@ #include "inspircd.h" #include "modules/sql.h" +#include "utility/string.h" /* SQLConn rewritten by peavey to * use EventHandler instead of @@ -603,7 +604,7 @@ public: for (const auto& [_, tag] : ServerInstance->Config->ConfTags("database")) { - if (!stdalgo::string::equalsci(tag->getString("module"), "pgsql")) + if (!insp::equalsci(tag->getString("module"), "pgsql")) continue; std::string id = tag->getString("id"); diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp index b84e9daf0..b98e4bc9c 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -37,6 +37,7 @@ #include "inspircd.h" #include "modules/sql.h" +#include "utility/string.h" #include <sqlite3.h> @@ -268,7 +269,7 @@ public: for (const auto& [_, tag] : ServerInstance->Config->ConfTags("database")) { - if (!stdalgo::string::equalsci(tag->getString("module"), "sqlite")) + if (!insp::equalsci(tag->getString("module"), "sqlite")) continue; auto* conn = new SQLConn(this, tag); diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index f814e8ec4..e260053de 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -42,6 +42,7 @@ #include "inspircd.h" #include "modules/ssl.h" #include "timeutils.h" +#include "utility/string.h" #include <gnutls/gnutls.h> #include <gnutls/abstract.h> @@ -1134,7 +1135,7 @@ class ModuleSSLGnuTLS final for (const auto& [_, tag] : tags) { - if (!stdalgo::string::equalsci(tag->getString("provider"), "gnutls")) + if (!insp::equalsci(tag->getString("provider"), "gnutls")) { ServerInstance->Logs.Debug(MODNAME, "Ignoring non-GnuTLS <sslprofile> tag at " + tag->source.str()); continue; diff --git a/src/modules/extra/m_ssl_mbedtls.cpp b/src/modules/extra/m_ssl_mbedtls.cpp index 2a628a3e9..879a09591 100644 --- a/src/modules/extra/m_ssl_mbedtls.cpp +++ b/src/modules/extra/m_ssl_mbedtls.cpp @@ -29,6 +29,7 @@ #include "inspircd.h" #include "modules/ssl.h" #include "timeutils.h" +#include "utility/string.h" #ifdef _WIN32 # define timegm _mkgmtime @@ -931,7 +932,7 @@ private: for (const auto& [_, tag] : tags) { - if (!stdalgo::string::equalsci(tag->getString("provider"), "mbedtls")) + if (!insp::equalsci(tag->getString("provider"), "mbedtls")) { ServerInstance->Logs.Debug(MODNAME, "Ignoring non-mbedTLS <sslprofile> tag at " + tag->source.str()); continue; diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp index ed0e58f32..77fc0f7d0 100644 --- a/src/modules/extra/m_ssl_openssl.cpp +++ b/src/modules/extra/m_ssl_openssl.cpp @@ -44,6 +44,7 @@ #include "iohook.h" #include "modules/ssl.h" #include "timeutils.h" +#include "utility/string.h" #include <openssl/ssl.h> #include <openssl/err.h> @@ -216,11 +217,11 @@ namespace OpenSSL /* Set CRL mode */ unsigned long crlflags = X509_V_FLAG_CRL_CHECK; - if (stdalgo::string::equalsci(crlmode, "chain")) + if (insp::equalsci(crlmode, "chain")) { crlflags |= X509_V_FLAG_CRL_CHECK_ALL; } - else if (!stdalgo::string::equalsci(crlmode, "leaf")) + else if (!insp::equalsci(crlmode, "leaf")) { throw ModuleException(thismod, "Unknown mode '" + crlmode + "'; expected either 'chain' (default) or 'leaf'"); } @@ -977,7 +978,7 @@ class ModuleSSLOpenSSL final for (const auto& [_, tag] : tags) { - if (!stdalgo::string::equalsci(tag->getString("provider"), "openssl")) + if (!insp::equalsci(tag->getString("provider"), "openssl")) { ServerInstance->Logs.Debug(MODNAME, "Ignoring non-OpenSSL <sslprofile> tag at " + tag->source.str()); continue; |
