diff options
| author | 2026-04-04 18:15:30 +0100 | |
|---|---|---|
| committer | 2026-04-04 18:15:30 +0100 | |
| commit | ab48b941f222dcedb7e169c054a102005e1af03c (patch) | |
| tree | a481c70d1ae3073b1bc192e32e12010df20a2cc2 /src/channelmanager.cpp | |
| parent | Pass a server reference to OnRouteMessage. (diff) | |
Add insp::find_value, insp::to_ptr and switch code to use them.
Diffstat (limited to 'src/channelmanager.cpp')
| -rw-r--r-- | src/channelmanager.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/channelmanager.cpp b/src/channelmanager.cpp index f12805f8e..21d6f657b 100644 --- a/src/channelmanager.cpp +++ b/src/channelmanager.cpp @@ -18,6 +18,7 @@ #include "inspircd.h" +#include "utility/container.h" bool ChannelManager::DefaultIsChannel(const std::string_view& channel) { @@ -43,11 +44,7 @@ bool ChannelManager::DefaultIsChannel(const std::string_view& channel) Channel* ChannelManager::Find(const std::string& channel) const { - ChannelMap::const_iterator iter = channels.find(channel); - if (iter == channels.end()) - return nullptr; - - return iter->second; + return insp::find_value(channels, channel); } bool ChannelManager::IsPrefix(unsigned char prefix) const |
