diff options
| author | 2022-11-21 13:14:19 +0000 | |
|---|---|---|
| committer | 2022-11-21 13:14:19 +0000 | |
| commit | 07246800fd2e44128adfa09fe91ce10b3ef0bcfc (patch) | |
| tree | 964d9fc4275dc612e5dfb083d2d1abb035fa1719 /src/modules/m_channames.cpp | |
| parent | Fix iterator_range when the range points to a string_view. (diff) | |
Use string_view in IsNick/IsIdent/IsChannel.
Diffstat (limited to 'src/modules/m_channames.cpp')
| -rw-r--r-- | src/modules/m_channames.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/m_channames.cpp b/src/modules/m_channames.cpp index 91806b1d0..5035af5db 100644 --- a/src/modules/m_channames.cpp +++ b/src/modules/m_channames.cpp @@ -29,10 +29,10 @@ static CharState allowedmap; class NewIsChannelHandler final { public: - static bool Call(const std::string&); + static bool Call(const std::string_view&); }; -bool NewIsChannelHandler::Call(const std::string& channame) +bool NewIsChannelHandler::Call(const std::string_view& channame) { if (channame.empty() || channame.length() > ServerInstance->Config->Limits.MaxChannel || !ServerInstance->Channels.IsPrefix(channame[0])) return false; @@ -49,7 +49,7 @@ bool NewIsChannelHandler::Call(const std::string& channame) class ModuleChannelNames final : public Module { - std::function<bool(const std::string&)> rememberer; + std::function<bool(const std::string_view&)> rememberer; bool badchan = false; ChanModeReference permchannelmode; |
