From 9bb55626d51f217466bc08104d2f32eb0bf57c02 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 30 Apr 2026 22:29:38 +0100 Subject: Switch ascii comparisons over to our own casemap functions. --- modules/websocket.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'modules/websocket.cpp') 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 ; acceptable values are 'binary', 'text' and 'reject', at " + tag->source.str()); -- cgit v1.3.1-10-gc9f91