]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_restrictchans.cpp
Fix recommended by nenolod, silly mistake apparently :P
[user/henk/code/inspircd.git] / src / modules / m_restrictchans.cpp
index e61e8ac0d6c44769448354c8166a4822137467dd..873988cc2215528aa27e1187debbe4ff81faaf76 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2008 InspIRCd Development Team
  * See: http://www.inspircd.org/wiki/index.php/Credits
  *
  * This program is free but copyrighted software; see
@@ -32,7 +32,7 @@ class ModuleRestrictChans : public Module
                        irc::string channel = txt.c_str();
                        allowchans[channel] = 1;
                }
-               DELETE(MyConf);
+               delete MyConf;
        }
 
  public:
@@ -41,6 +41,8 @@ class ModuleRestrictChans : public Module
        {
                
                ReadConfig();
+               Implementation eventlist[] = { I_OnUserPreJoin, I_OnRehash };
+               ServerInstance->Modules->Attach(eventlist, this, 2);
        }
 
        virtual void OnRehash(User* user, const std::string &parameter)
@@ -48,10 +50,6 @@ class ModuleRestrictChans : public Module
                ReadConfig();
        }
 
-       void Implements(char* List)
-       {
-               List[I_OnUserPreJoin] = List[I_OnRehash] = 1;
-       }
        
        virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
        {