]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_foobar.cpp
Make User:: nick/ident/dhost/fullname and some other things std::string instead of...
[user/henk/code/inspircd.git] / src / modules / m_foobar.cpp
index bffdd7730b190178db6ea8c14004a8829e160455..667a739a5bfdd51f4603ae3f17f35863cc669ebc 100644 (file)
@@ -35,8 +35,8 @@ class ModuleFoobar : public Module
                // The constructor just makes a copy of the server class
        
                
-               Implementation eventlist[] = { I_OnUserConnect, I_OnUserQuit, I_OnUserJoin, I_OnUserPart };
-               ServerInstance->Modules->Attach(eventlist, this, 4);
+               Implementation eventlist[] = { I_OnUserConnect, I_OnUserQuit, I_OnUserJoin, I_OnUserPart, I_OnUserPreJoin };
+               ServerInstance->Modules->Attach(eventlist, this, 5);
        }
        
        virtual ~ModuleFoobar()
@@ -48,7 +48,7 @@ class ModuleFoobar : public Module
                // this method instantiates a class of type Version, and returns
                // the modules version information using it.
        
-               return Version(1,1,0,1,VF_VENDOR,API_VERSION);
+               return Version(1,2,0,1,VF_VENDOR,API_VERSION);
        }
 
        
@@ -86,6 +86,10 @@ class ModuleFoobar : public Module
                ServerInstance->Logs->Log("m_foobar",DEBUG,"Foobar: User "+b+" parted "+c);
        }
 
+       virtual int OnUserPreJoin(User* user, Channel* chan, const char* cname, std::string &privs, const std::string &keygiven)
+       {
+               return 0;
+       }
 };