X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_antibear.cpp;h=557d2ca0cf8667d8880a16dfc445f9226a755a4b;hb=3a7dd5b129450b94e0a87b8ad5009da70905b8e5;hp=ea4dcc611b3b173953c228ba33136a9ac23fd7d8;hpb=99c2964bca779f2bae8d6e9e04d4d31ca37ea1e1;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_antibear.cpp b/src/modules/m_antibear.cpp index ea4dcc611..557d2ca0c 100644 --- a/src/modules/m_antibear.cpp +++ b/src/modules/m_antibear.cpp @@ -3,13 +3,13 @@ * +------------------------------------+ * * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev. - * E-mail: - * - * + * E-mail: + * + * * * 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() @@ -46,12 +44,13 @@ class ModuleAntiBear : public Module void Implements(char* List) { - List[I_OnUserConnect] = 1; + List[I_OnUserRegister] = 1; } - virtual void OnUserConnect(userrec* user) + virtual void OnUserRegister(userrec* user) { - WriteServ(user->fd,"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; } -