]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_antibear.cpp
Fix these too!
[user/henk/code/inspircd.git] / src / modules / m_antibear.cpp
index ee595a767a7c603c465aa7449ce6a46c88feb7c6..513f357f90516b57ae4f52ab65cf064a05591144 100644 (file)
@@ -3,13 +3,13 @@
  *       +------------------------------------+
  *
  *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *                       E-mail:
- *                <brain@chatspike.net>
- *               <Craig@chatspike.net>
+ *                    E-mail:
+ *             <brain@chatspike.net>
+ *               <Craig@chatspike.net>
  *     
  * Written by Craig Edwards, Craig McLure, and others.
  * This program is free but copyrighted software; see
- *            the file COPYING for details.
+ *         the file COPYING for details.
  *
  * ---------------------------------------------------
  */
@@ -19,20 +19,18 @@ using namespace std;
 #include "users.h"
 #include "channels.h"
 #include "modules.h"
-#include "helperfuncs.h"
+
 
 /* $ModDesc: Sends a numeric on connect which cripples a common type of trojan/spambot */
 
 class ModuleAntiBear : public Module
 {
  private:
-        
-        Server *Srv;
+
  public:
-       ModuleAntiBear(Server* Me)
-               : Module::Module(Me)
+       ModuleAntiBear(InspIRCd* Me) : Module::Module(Me)
        {
-               Srv = Me;
+               
        }
        
        virtual ~ModuleAntiBear()
@@ -41,17 +39,18 @@ class ModuleAntiBear : public Module
        
        virtual Version GetVersion()
        {
-               return Version(1,0,0,0,VF_VENDOR);
+               return Version(1,1,0,0,VF_VENDOR,API_VERSION);
        }
 
        void Implements(char* List)
        {
-               List[I_OnUserConnect] = 1;
+               List[I_OnUserRegister] = 1;
        }
        
-       virtual void OnUserConnect(userrec* user)
+       virtual void OnUserRegister(userrec* user)
        {
-               WriteServ(user,"439 %s :This server has anti-spambot mechanisms enabled.", user->nick);
+               user->WriteServ("439 %s :This server has anti-spambot mechanisms enabled.", user->nick);
+               user->WriteServ("931 %s :Malicious bots, spammers, and other automated systems of dubious origin are NOT welcome here.", user->nick);
        }
 };
 
@@ -66,7 +65,7 @@ class ModuleAntiBearFactory : public ModuleFactory
        {
        }
        
-       virtual Module * CreateModule(Server* Me)
+       virtual Module * CreateModule(InspIRCd* Me)
        {
                return new ModuleAntiBear(Me);
        }
@@ -83,4 +82,3 @@ extern "C" void * init_module( void )
 {
        return new ModuleAntiBearFactory;
 }
-