]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_regonlycreate.cpp
Add method for writing server notices.
[user/henk/code/inspircd.git] / src / modules / m_regonlycreate.cpp
index 93f88fe30c4af6413ee3af7baba6ff2d2e45049a..9605ed563948ca952fc49e64717926d8991302fe 100644 (file)
@@ -21,7 +21,7 @@
 
 
 #include "inspircd.h"
-#include "account.h"
+#include "modules/account.h"
 
 /* $ModDesc: Prevents users whose nicks are not registered from creating new channels */
 
@@ -34,12 +34,12 @@ class ModuleRegOnlyCreate : public Module
                ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
        }
 
-       ModResult OnUserPreJoin(User* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
+       ModResult OnUserPreJoin(LocalUser* user, Channel* chan, const std::string& cname, std::string& privs, const std::string& keygiven)
        {
                if (chan)
                        return MOD_RES_PASSTHRU;
 
-               if (IS_OPER(user))
+               if (user->IsOper())
                        return MOD_RES_PASSTHRU;
 
                if (user->IsModeSet('r'))
@@ -54,10 +54,6 @@ class ModuleRegOnlyCreate : public Module
                return MOD_RES_DENY;
        }
 
-       ~ModuleRegOnlyCreate()
-       {
-       }
-
        Version GetVersion()
        {
                return Version("Prevents users whose nicks are not registered from creating new channels", VF_VENDOR);