diff options
| author | 2026-04-30 22:29:38 +0100 | |
|---|---|---|
| committer | 2026-04-30 23:20:14 +0100 | |
| commit | 9bb55626d51f217466bc08104d2f32eb0bf57c02 (patch) | |
| tree | 44d8c00b97674cd4e35c5a1def208047bf02bcfa /modules/websocket.cpp | |
| parent | Move CommandLine from ServerConfig to InspIRCd. (diff) | |
| download | inspircd++-9bb55626d51f217466bc08104d2f32eb0bf57c02.tar.gz inspircd++-9bb55626d51f217466bc08104d2f32eb0bf57c02.tar.bz2 inspircd++-9bb55626d51f217466bc08104d2f32eb0bf57c02.zip | |
Switch ascii comparisons over to our own casemap functions.
Diffstat (limited to 'modules/websocket.cpp')
| -rw-r--r-- | modules/websocket.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/websocket.cpp b/modules/websocket.cpp index caff2e93a..301867d49 100644 --- a/modules/websocket.cpp +++ b/modules/websocket.cpp @@ -516,11 +516,11 @@ class WebSocketHook final { std::erase_if(proto, ::isspace); - auto is_binary = (sock->type == StreamSocket::SS_USER && insp::equalsci(proto, "binary.ircv3.net")) - || insp::equalsci(proto, "binary.inspircd.org"); + auto is_binary = (sock->type == StreamSocket::SS_USER && insp::ascii_equals(proto, "binary.ircv3.net")) + || insp::ascii_equals(proto, "binary.inspircd.org"); - auto is_text = (sock->type == StreamSocket::SS_USER && insp::equalsci(proto, "text.ircv3.net")) - || insp::equalsci(proto, "text.inspircd.org"); + auto is_text = (sock->type == StreamSocket::SS_USER && insp::ascii_equals(proto, "text.ircv3.net")) + || insp::ascii_equals(proto, "text.inspircd.org"); if (is_binary || is_text) { @@ -729,11 +729,11 @@ public: const auto& tag = ServerInstance->Config->ConfValue("websocket"); const std::string defaultmodestr = tag->getString("defaultmode", config.allowtext ? "text" : "binary", 1); - if (insp::equalsci(defaultmodestr, "reject")) + if (insp::ascii_equals(defaultmodestr, "reject")) config.defaultmode = WebSocketConfig::DM_REJECT; - else if (insp::equalsci(defaultmodestr, "binary")) + else if (insp::ascii_equals(defaultmodestr, "binary")) config.defaultmode = WebSocketConfig::DM_BINARY; - else if (insp::equalsci(defaultmodestr, "text")) + else if (insp::ascii_equals(defaultmodestr, "text")) config.defaultmode = WebSocketConfig::DM_TEXT; else throw ModuleException(weak_from_this(), defaultmodestr + " is an invalid value for <websocket:defaultmode>; acceptable values are 'binary', 'text' and 'reject', at " + tag->source.str()); |
