1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2007 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
19 /* $ModDesc: Sends a numeric on connect which cripples a common type of trojan/spambot */
21 class ModuleAntiBear : public Module
26 ModuleAntiBear(InspIRCd* Me) : Module::Module(Me)
31 virtual ~ModuleAntiBear()
35 virtual Version GetVersion()
37 return Version(1,1,0,0,VF_VENDOR,API_VERSION);
40 void Implements(char* List)
42 List[I_OnUserRegister] = 1;
45 virtual int OnUserRegister(userrec* user)
47 user->WriteServ("439 %s :This server has anti-spambot mechanisms enabled.", user->nick);
48 user->WriteServ("931 %s :Malicious bots, spammers, and other automated systems of dubious origin are NOT welcome here.", user->nick);
53 class ModuleAntiBearFactory : public ModuleFactory
56 ModuleAntiBearFactory()
60 ~ModuleAntiBearFactory()
64 virtual Module * CreateModule(InspIRCd* Me)
66 return new ModuleAntiBear(Me);
73 // The "C" linkage factory0() function creates the ModuleAntiBearFactory
74 // class for this library
77 extern "C" void * init_module( void )
79 return new ModuleAntiBearFactory;