1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * Inspire is copyright (C) 2002-2004 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 /* $ModDesc: Provides support for unreal-style channel mode +V */
24 class ModuleNoInvite : public Module
33 Srv->AddExtendedMode('V',MT_CHANNEL,false,0,0);
37 virtual int OnUserPreInvite(userrec* user,userrec* dest,chanrec* channel)
39 if (channel->IsCustomModeSet('V'))
41 WriteServ(user->fd,"492 %s %s :Can't invite %s to channel (+V set)",user->nick, channel->name, dest->nick);
47 virtual int OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list ¶ms)
49 // check if this is our mode character...
50 if ((modechar == 'V') && (type == MT_CHANNEL))
60 virtual ~ModuleNoInvite()
65 virtual Version GetVersion()
67 return Version(1,0,0,0);
72 class ModuleNoInviteFactory : public ModuleFactory
75 ModuleNoInviteFactory()
79 ~ModuleNoInviteFactory()
83 virtual Module * CreateModule()
85 return new ModuleNoInvite;
91 extern "C" void * init_module( void )
93 return new ModuleNoInviteFactory;