1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * Inspire is copyright (C) 2002-2005 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 * ---------------------------------------------------
23 #include "helperfuncs.h"
25 /* $ModDesc: Gives /cban, aka C:lines. Think Q:lines, for channels. */
29 class cmd_cban : public command_t
32 cmd_cban () : command_t("CBAN",'o',2)
34 this->source = "m_cban.so";
37 void Handle(char **parameters, int pcnt, userrec *user)
39 /* Handle CBAN here. */
43 class ModuleCBan : public Module
47 ModuleCBan(Server* Me) : Module::Module(Me)
50 mycommand = new cmd_cban();
51 Srv->AddCommand(mycommand);
54 virtual int OnUserPreJoin (userrec *user, chanrec *chan, const char *cname)
56 /* check cbans in here, and apply as necessary. */
58 /* Allow the change. */
66 virtual Version GetVersion()
68 return Version(1,0,0,0,VF_VENDOR);
73 class ModuleCBanFactory : public ModuleFactory
84 virtual Module * CreateModule(Server* Me)
86 return new ModuleCBan(Me);
92 extern "C" void * init_module( void )
94 return new ModuleCBanFactory;