1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
7 * <brain@chatspike.net>
8 * <Craig@chatspike.net>
10 * Written by Craig Edwards, Craig McLure, and others.
11 * This program is free but copyrighted software; see
12 * the file COPYING for details.
14 * ---------------------------------------------------
22 #include "helperfuncs.h"
24 /* $ModDesc: Sends a numeric on connect which cripples a common type of trojan/spambot */
26 class ModuleAntiBear : public Module
32 ModuleAntiBear(Server* Me) : Module::Module(Me)
37 virtual ~ModuleAntiBear()
41 virtual Version GetVersion()
43 return Version(1,0,0,0,VF_VENDOR);
46 void Implements(char* List)
48 List[I_OnUserRegister] = 1;
51 virtual void OnUserRegister(userrec* user)
53 WriteServ(user->fd,"439 %s :This server has anti-spambot mechanisms enabled.", user->nick);
54 WriteServ(user->fd,"931 %s :Malicious bots, spammers, and other automated systems of", user->nick);
55 WriteServ(user->fd,"437 %s :dubious origin are NOT welcome here.", user->nick);
59 class ModuleAntiBearFactory : public ModuleFactory
62 ModuleAntiBearFactory()
66 ~ModuleAntiBearFactory()
70 virtual Module * CreateModule(Server* Me)
72 return new ModuleAntiBear(Me);
79 // The "C" linkage factory0() function creates the ModuleAntiBearFactory
80 // class for this library
83 extern "C" void * init_module( void )
85 return new ModuleAntiBearFactory;