]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_channames.cpp
Improvements and bugfixes to the cgiirc module.
[user/henk/code/inspircd.git] / src / modules / m_channames.cpp
index 7513cb33ab591b30fe77cb7670c91edb9cd568e5..d0d122b436c91225e7a953f5fdcfb1fa2b05f569 100644 (file)
 
 static std::bitset<256> allowedmap;
 
-class NewIsChannelHandler : public HandlerBase1<bool, const std::string&>
+class NewIsChannelHandler
 {
  public:
-       bool Call(const std::string&);
+       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()