aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_websocket.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-08-05 12:02:14 +0100
committerGravatar Sadie Powell2023-08-11 12:03:09 +0100
commit681b488fc0ebca964eddf2a54575dc41901bc520 (patch)
tree8d5953e1ecc38e7abc8e4369e71a2f3db2a1744a /src/modules/m_websocket.cpp
parentMove stdalgo::string::{equalsci,tocstr} to utility/string. (diff)
Update usages of stdalgo::string::equalsci to use insp::equalsci.
Diffstat (limited to 'src/modules/m_websocket.cpp')
-rw-r--r--src/modules/m_websocket.cpp11
1 files changed, 6 insertions, 5 deletions
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());