From 77802d96ca043ba567ae9b32409862e85dff8e5f Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Thu, 8 Apr 2021 20:00:46 +0100 Subject: Use string_view in IsCTCP. --- src/modules/m_dccallow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modules/m_dccallow.cpp') 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] == '"') { -- cgit v1.3.1-10-gc9f91