diff options
| author | 2023-08-05 12:02:14 +0100 | |
|---|---|---|
| committer | 2023-08-11 12:03:09 +0100 | |
| commit | 681b488fc0ebca964eddf2a54575dc41901bc520 (patch) | |
| tree | 8d5953e1ecc38e7abc8e4369e71a2f3db2a1744a /src/modules | |
| parent | Move stdalgo::string::{equalsci,tocstr} to utility/string. (diff) | |
Update usages of stdalgo::string::equalsci to use insp::equalsci.
Diffstat (limited to 'src/modules')
| -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 | ||||
| -rw-r--r-- | src/modules/m_account.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_cloak_sha256.cpp | 3 | ||||
| -rw-r--r-- | src/modules/m_customtitle.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_dccallow.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_dnsbl.cpp | 4 | ||||
| -rw-r--r-- | src/modules/m_filter.cpp | 17 | ||||
| -rw-r--r-- | src/modules/m_gateway.cpp | 6 | ||||
| -rw-r--r-- | src/modules/m_geoclass.cpp | 3 | ||||
| -rw-r--r-- | src/modules/m_httpd.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_httpd_acl.cpp | 7 | ||||
| -rw-r--r-- | src/modules/m_httpd_stats.cpp | 4 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/capab.cpp | 10 | ||||
| -rw-r--r-- | src/modules/m_spanningtree/utils.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_sslinfo.cpp | 2 | ||||
| -rw-r--r-- | src/modules/m_vhost.cpp | 3 | ||||
| -rw-r--r-- | src/modules/m_websocket.cpp | 11 |
23 files changed, 64 insertions, 51 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; diff --git a/src/modules/m_account.cpp b/src/modules/m_account.cpp index 38b3ec6b2..03426cbe4 100644 --- a/src/modules/m_account.cpp +++ b/src/modules/m_account.cpp @@ -327,7 +327,7 @@ public: ModResult OnPreChangeConnectClass(LocalUser* user, const std::shared_ptr<ConnectClass>& klass, std::optional<Numeric::Numeric>& errnum) override { const char* error = nullptr; - if (stdalgo::string::equalsci(klass->config->getString("requireaccount"), "nick")) + if (insp::equalsci(klass->config->getString("requireaccount"), "nick")) { if (!accountapi.GetAccountName(user) && !accountapi.IsIdentifiedToNick(user)) error = "an account matching their current nickname"; diff --git a/src/modules/m_cloak_sha256.cpp b/src/modules/m_cloak_sha256.cpp index 9e73de0c7..171cf2585 100644 --- a/src/modules/m_cloak_sha256.cpp +++ b/src/modules/m_cloak_sha256.cpp @@ -42,6 +42,7 @@ typedef void psl_ctx_t; #include "inspircd.h" #include "modules/cloak.h" #include "modules/hash.h" +#include "utility/string.h" class SHA256Method final : public Cloak::Method @@ -313,7 +314,7 @@ public: if (cloakhost && !psldb.empty()) { #ifdef HAS_LIBPSL - if (stdalgo::string::equalsci(psldb, "system")) + if (insp::equalsci(psldb, "system")) { psldb = psl_dist_filename(); if (psldb.empty()) diff --git a/src/modules/m_customtitle.cpp b/src/modules/m_customtitle.cpp index 037e2f769..591904e6c 100644 --- a/src/modules/m_customtitle.cpp +++ b/src/modules/m_customtitle.cpp @@ -125,7 +125,7 @@ public: throw ModuleException(this, "<title:password> is empty at " + tag->source.str()); const std::string hash = tag->getString("hash", "plaintext", 1); - if (stdalgo::string::equalsci(hash, "plaintext")) + if (insp::equalsci(hash, "plaintext")) { ServerInstance->Logs.Normal(MODNAME, "<title> tag for {} at {} contains an plain text password, this is insecure!", name, tag->source.str()); diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index 7607f54a4..254d845da 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -491,7 +491,7 @@ public: if (InspIRCd::Match(filename, bf.filemask, ascii_case_insensitive_map)) { /* We have a matching badfile entry, override whatever the default action is */ - if (stdalgo::string::equalsci(bf.action, "allow")) + if (insp::equalsci(bf.action, "allow")) return MOD_RES_PASSTHRU; else { diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 4207741e7..d00d422d9 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -136,14 +136,14 @@ public: }); const std::string typestr = tag->getString("type"); - if (stdalgo::string::equalsci(typestr, "bitmask")) + if (insp::equalsci(typestr, "bitmask")) { type = Type::BITMASK; bitmask = tag->getNum<unsigned int>("bitmask", 0); records = 0; } - else if (stdalgo::string::equalsci(typestr, "record")) + else if (insp::equalsci(typestr, "record")) { type = Type::RECORD; diff --git a/src/modules/m_filter.cpp b/src/modules/m_filter.cpp index 3608d22d8..4ccf03907 100644 --- a/src/modules/m_filter.cpp +++ b/src/modules/m_filter.cpp @@ -40,6 +40,7 @@ #include "modules/stats.h" #include "numerichelper.h" #include "timeutils.h" +#include "utility/string.h" #include "xline.h" #include <fstream> @@ -824,21 +825,21 @@ std::pair<bool, std::string> ModuleFilter::AddFilter(const std::string& freeform bool ModuleFilter::StringToFilterAction(const std::string& str, FilterAction& fa) { - if (stdalgo::string::equalsci(str, "gline")) + if (insp::equalsci(str, "gline")) fa = FA_GLINE; - else if (stdalgo::string::equalsci(str, "zline")) + else if (insp::equalsci(str, "zline")) fa = FA_ZLINE; - else if (stdalgo::string::equalsci(str, "warn")) + else if (insp::equalsci(str, "warn")) fa = FA_WARN; - else if (stdalgo::string::equalsci(str, "block")) + else if (insp::equalsci(str, "block")) fa = FA_BLOCK; - else if (stdalgo::string::equalsci(str, "silent")) + else if (insp::equalsci(str, "silent")) fa = FA_SILENT; - else if (stdalgo::string::equalsci(str, "kill")) + else if (insp::equalsci(str, "kill")) fa = FA_KILL; - else if (stdalgo::string::equalsci(str, "shun") && (ServerInstance->XLines->GetFactory("SHUN"))) + else if (insp::equalsci(str, "shun") && (ServerInstance->XLines->GetFactory("SHUN"))) fa = FA_SHUN; - else if (stdalgo::string::equalsci(str, "none")) + else if (insp::equalsci(str, "none")) fa = FA_NONE; else return false; diff --git a/src/modules/m_gateway.cpp b/src/modules/m_gateway.cpp index 2e256f9e9..33e2f10f7 100644 --- a/src/modules/m_gateway.cpp +++ b/src/modules/m_gateway.cpp @@ -369,13 +369,13 @@ public: // Determine what lookup type this host uses. const std::string type = tag->getString("type"); - if (stdalgo::string::equalsci(type, "username") || stdalgo::string::equalsci(type, "ident")) + if (insp::equalsci(type, "username") || insp::equalsci(type, "ident")) { // The IP address should be looked up from the hex IP address. const std::string newuser = tag->getString("newusername", tag->getString("newident", "gateway", ServerInstance->IsUser), ServerInstance->IsUser); userhosts.emplace_back(masks, newuser); } - else if (stdalgo::string::equalsci(type, "webirc")) + else if (insp::equalsci(type, "webirc")) { // The IP address will be received via the WEBIRC command. const std::string fingerprint = tag->getString("fingerprint"); @@ -387,7 +387,7 @@ public: if (fingerprint.empty() && password.empty()) throw ModuleException(this, "When using <" + tag->name + " type=\"webirc\"> either the fingerprint or password field is required, at " + tag->source.str()); - if (!password.empty() && stdalgo::string::equalsci(passwordhash, "plaintext")) + if (!password.empty() && insp::equalsci(passwordhash, "plaintext")) { ServerInstance->Logs.Normal(MODNAME, "<{}> tag at {} contains an plain text password, this is insecure!", tag->name, tag->source.str()); diff --git a/src/modules/m_geoclass.cpp b/src/modules/m_geoclass.cpp index 901d51332..646538dfc 100644 --- a/src/modules/m_geoclass.cpp +++ b/src/modules/m_geoclass.cpp @@ -20,6 +20,7 @@ #include "inspircd.h" #include "modules/geolocation.h" #include "modules/stats.h" +#include "utility/string.h" class ModuleGeoClass final : public Module @@ -59,7 +60,7 @@ public: // If the user matches this country code then they can use this // connect class. - if (stdalgo::string::equalsci(token, code)) + if (insp::equalsci(token, code)) return MOD_RES_PASSTHRU; } diff --git a/src/modules/m_httpd.cpp b/src/modules/m_httpd.cpp index 649dc83b2..c42c6e729 100644 --- a/src/modules/m_httpd.cpp +++ b/src/modules/m_httpd.cpp @@ -438,7 +438,7 @@ public: ModResult OnAcceptConnection(int nfd, ListenSocket* from, const irc::sockets::sockaddrs& client, const irc::sockets::sockaddrs& server) override { - if (!stdalgo::string::equalsci(from->bind_tag->getString("type"), "httpd")) + if (!insp::equalsci(from->bind_tag->getString("type"), "httpd")) return MOD_RES_PASSTHRU; sockets.push_front(new HttpServerSocket(nfd, client.addr(), from, client, server, timeoutsec)); diff --git a/src/modules/m_httpd_acl.cpp b/src/modules/m_httpd_acl.cpp index e9a03123a..c7fc68d45 100644 --- a/src/modules/m_httpd_acl.cpp +++ b/src/modules/m_httpd_acl.cpp @@ -25,6 +25,7 @@ #include "inspircd.h" #include "modules/httpd.h" +#include "utility/string.h" class HTTPACL final { @@ -78,16 +79,16 @@ public: while (sep.GetToken(type)) { - if (stdalgo::string::equalsci(type, "password")) + if (insp::equalsci(type, "password")) { username = c->getString("username"); password = c->getString("password"); } - else if (stdalgo::string::equalsci(type, "whitelist")) + else if (insp::equalsci(type, "whitelist")) { whitelist = c->getString("whitelist"); } - else if (stdalgo::string::equalsci(type, "blacklist")) + else if (insp::equalsci(type, "blacklist")) { blacklist = c->getString("blacklist"); } diff --git a/src/modules/m_httpd_stats.cpp b/src/modules/m_httpd_stats.cpp index 5733cc9e3..805ca297c 100644 --- a/src/modules/m_httpd_stats.cpp +++ b/src/modules/m_httpd_stats.cpp @@ -403,9 +403,9 @@ namespace Stats bool desc = params.getBool("desc", false); OrderBy orderby; - if (stdalgo::string::equalsci(sortmethod, "nick")) + if (insp::equalsci(sortmethod, "nick")) orderby = OB_NICK; - else if (stdalgo::string::equalsci(sortmethod, "lastmsg")) + else if (insp::equalsci(sortmethod, "lastmsg")) { orderby = OB_LASTMSG; // We can only check idle times on local users diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index 5fa250b64..06d89e53b 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -57,17 +57,17 @@ namespace modname.append(name.substr(0, endpos)).append(".so"); // Handle renamed modules. - if (stdalgo::string::equalsci(modname, "m_cloak.so") && ServerInstance->Modules.Find("cloak_md5")) + if (insp::equalsci(modname, "m_cloak.so") && ServerInstance->Modules.Find("cloak_md5")) modname = "m_cloaking.so"; - else if (stdalgo::string::equalsci(modname, "m_realnameban.so")) + else if (insp::equalsci(modname, "m_realnameban.so")) modname = "m_gecosban.so"; - else if (stdalgo::string::equalsci(modname, "m_account.so") && ServerInstance->Modules.Find("services")) + else if (insp::equalsci(modname, "m_account.so") && ServerInstance->Modules.Find("services")) modname = "m_services_account.so"; - else if (stdalgo::string::equalsci(modname, "m_services.so")) + else if (insp::equalsci(modname, "m_services.so")) modname = "m_svshold.so"; // Handle modules with changed properties. - else if (stdalgo::string::equalsci(modname, "m_globops.so")) + else if (insp::equalsci(modname, "m_globops.so")) continue; // This module was made VF_OPTCOMMON in v4. } else diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index b3ac34212..9f6565e34 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -38,7 +38,7 @@ SpanningTreeUtilities* Utils = nullptr; ModResult ModuleSpanningTree::OnAcceptConnection(int newsock, ListenSocket* from, const irc::sockets::sockaddrs& client, const irc::sockets::sockaddrs& server) { - if (!stdalgo::string::equalsci(from->bind_tag->getString("type"), "servers")) + if (!insp::equalsci(from->bind_tag->getString("type"), "servers")) return MOD_RES_PASSTHRU; const std::string incomingip = client.addr(); diff --git a/src/modules/m_sslinfo.cpp b/src/modules/m_sslinfo.cpp index 6ea50a564..67b129081 100644 --- a/src/modules/m_sslinfo.cpp +++ b/src/modules/m_sslinfo.cpp @@ -423,7 +423,7 @@ public: ssl_cert* cert = cmd.sslapi.GetCertificate(user); const char* error = nullptr; const std::string requiressl = klass->config->getString("requiressl"); - if (stdalgo::string::equalsci(requiressl, "trusted")) + if (insp::equalsci(requiressl, "trusted")) { if (!cert || !cert->IsCAVerified()) error = "a trusted TLS client certificate"; diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp index 6ea1eb8fe..e409d1efa 100644 --- a/src/modules/m_vhost.cpp +++ b/src/modules/m_vhost.cpp @@ -25,6 +25,7 @@ #include "inspircd.h" +#include "utility/string.h" struct CustomVhost final { @@ -109,7 +110,7 @@ public: throw ModuleException(this, "<vhost:pass> is empty! at " + tag->source.str()); const std::string hash = tag->getString("hash", "plaintext", 1); - if (stdalgo::string::equalsci(hash, "plaintext")) + if (insp::equalsci(hash, "plaintext")) { ServerInstance->Logs.Warning(MODNAME, "<vhost> tag for {} at {} contains an plain text password, this is insecure!", username, tag->source.str()); diff --git a/src/modules/m_websocket.cpp b/src/modules/m_websocket.cpp index dbfbd7d71..40f726b0f 100644 --- a/src/modules/m_websocket.cpp +++ b/src/modules/m_websocket.cpp @@ -22,6 +22,7 @@ #include "inspircd.h" #include "iohook.h" #include "modules/hash.h" +#include "utility/string.h" #define UTF_CPP_CPLUSPLUS 199711L #include <utfcpp/unchecked.h> @@ -458,8 +459,8 @@ class WebSocketHook final { proto.erase(std::remove_if(proto.begin(), proto.end(), ::isspace), proto.end()); - bool is_binary = stdalgo::string::equalsci(proto, "binary.inspircd.org"); - bool is_text = stdalgo::string::equalsci(proto, "text.inspircd.org"); + bool is_binary = insp::equalsci(proto, "binary.inspircd.org"); + bool is_text = insp::equalsci(proto, "text.inspircd.org"); if (is_binary || is_text) { @@ -648,11 +649,11 @@ public: const auto& tag = ServerInstance->Config->ConfValue("websocket"); const std::string defaultmodestr = tag->getString("defaultmode", tag->getBool("sendastext", true) ? "text" : "binary", 1); - if (stdalgo::string::equalsci(defaultmodestr, "reject")) + if (insp::equalsci(defaultmodestr, "reject")) config.defaultmode = WebSocketConfig::DM_REJECT; - else if (stdalgo::string::equalsci(defaultmodestr, "binary")) + else if (insp::equalsci(defaultmodestr, "binary")) config.defaultmode = WebSocketConfig::DM_BINARY; - else if (stdalgo::string::equalsci(defaultmodestr, "text")) + else if (insp::equalsci(defaultmodestr, "text")) config.defaultmode = WebSocketConfig::DM_TEXT; else throw ModuleException(this, defaultmodestr + " is an invalid value for <websocket:defaultmode>; acceptable values are 'binary', 'text' and 'reject', at " + tag->source.str()); |
