diff options
| author | 2021-04-08 20:00:46 +0100 | |
|---|---|---|
| committer | 2021-04-08 20:00:46 +0100 | |
| commit | 77802d96ca043ba567ae9b32409862e85dff8e5f (patch) | |
| tree | 3ca506dea38f060aaef9cda3f60f4c4a51881221 /src/modules/m_dccallow.cpp | |
| parent | Take a string_view in irc::equals. (diff) | |
| download | inspircd++-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.cpp | 8 |
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] == '"') { |
