aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_dccallow.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-04-08 20:00:46 +0100
committerGravatar Sadie Powell2021-04-08 20:00:46 +0100
commit77802d96ca043ba567ae9b32409862e85dff8e5f (patch)
tree3ca506dea38f060aaef9cda3f60f4c4a51881221 /src/modules/m_dccallow.cpp
parentTake a string_view in irc::equals. (diff)
downloadinspircd++-77802d96ca043ba567ae9b32409862e85dff8e5f.tar.gz
inspircd++-77802d96ca043ba567ae9b32409862e85dff8e5f.tar.bz2
inspircd++-77802d96ca043ba567ae9b32409862e85dff8e5f.zip
Use string_view in IsCTCP.
Diffstat (limited to 'src/modules/m_dccallow.cpp')
-rw-r--r--src/modules/m_dccallow.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp
index 14032a9a9..fa3390e6f 100644
--- a/src/modules/m_dccallow.cpp
+++ b/src/modules/m_dccallow.cpp
@@ -417,8 +417,8 @@ class ModuleDCCAllow : public Module
if (user == u)
return MOD_RES_PASSTHRU;
- std::string ctcpname;
- std::string ctcpbody;
+ std::string_view ctcpname;
+ std::string_view ctcpbody;
if (details.IsCTCP(ctcpname, ctcpbody))
{
Expire();
@@ -442,13 +442,13 @@ class ModuleDCCAllow : public Module
if (s == std::string::npos)
return MOD_RES_PASSTHRU;
- const std::string type = ctcpbody.substr(0, s);
+ const std::string_view type = std::string(ctcpbody).substr(0, s);
if (irc::equals(type, "SEND"))
{
size_t first;
- std::string buf = ctcpbody.substr(s + 1);
+ std::string buf = std::string(ctcpbody).substr(s + 1);
if (!buf.empty() && buf[0] == '"')
{