From 1dca8b79edf65c0e5e846cc120f1321fb0a1d15c Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sat, 25 Nov 2017 12:37:48 +0000 Subject: Convert IsChannel to std::function. --- src/modules/m_channames.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/modules') 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 +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 rememberer; + TR1NS::function 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() -- cgit v1.2.3