diff options
author | Peter Powell <petpow@saberuk.com> | 2017-11-25 12:37:48 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-11-25 13:38:02 +0000 |
commit | 1dca8b79edf65c0e5e846cc120f1321fb0a1d15c (patch) | |
tree | 9b3ad6b2f090e722a916815a613f2e04603819c1 /src/modules | |
parent | 3b3cb845602bbaa3935f736785a53724750230dc (diff) |
Convert IsChannel to std::function.
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_channames.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/modules/m_channames.cpp b/src/modules/m_channames.cpp index b23148b44..d0d122b43 100644 --- a/src/modules/m_channames.cpp +++ b/src/modules/m_channames.cpp @@ -21,10 +21,10 @@ static std::bitset<256> allowedmap; -class NewIsChannelHandler : public HandlerBase1<bool, const std::string&> +class NewIsChannelHandler { public: - bool Call(const std::string&) CXX11_OVERRIDE; + static bool Call(const std::string&); }; bool NewIsChannelHandler::Call(const std::string& channame) @@ -44,8 +44,7 @@ bool NewIsChannelHandler::Call(const std::string& channame) class ModuleChannelNames : public Module { - NewIsChannelHandler myhandler; - caller1<bool, const std::string&> rememberer; + TR1NS::function<bool(const std::string&)> rememberer; bool badchan; ChanModeReference permchannelmode; @@ -59,7 +58,7 @@ class ModuleChannelNames : public Module void init() CXX11_OVERRIDE { - ServerInstance->IsChannel = &myhandler; + ServerInstance->IsChannel = NewIsChannelHandler::Call; } void ValidateChans() |