]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_regonlycreate.cpp
Fix recommended by nenolod, silly mistake apparently :P
[user/henk/code/inspircd.git] / src / modules / m_regonlycreate.cpp
index 2174c860c28a14d4be42b3eb05741ef2e9f44cbf..5391791d3f36f921eaf7c541fcca71a1a741c942 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
@@ -12,9 +12,6 @@
  */
 
 #include "inspircd.h"
-#include "users.h"
-#include "channels.h"
-#include "modules.h"
 
 /* $ModDesc: Prevents users who's nicks are not registered from creating new channels */
 
@@ -24,14 +21,12 @@ class ModuleRegOnlyCreate : public Module
        ModuleRegOnlyCreate(InspIRCd* Me)
                : Module(Me)
        {
+               Implementation eventlist[] = { I_OnUserPreJoin };
+               ServerInstance->Modules->Attach(eventlist, this, 1);
        }
 
-       void Implements(char* List)
-       {
-               List[I_OnUserPreJoin] = 1;
-       }
 
-       virtual int OnUserPreJoin(userrec* user, chanrec* chan, const char* cname, std::string &privs)
+       virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs)
        {
                if (chan)
                        return 0;