* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * Inspire is copyright (C) 2002-2004 ChatSpike-Dev.
+ * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
* E-mail:
* <brain@chatspike.net>
* <Craig@chatspike.net>
public:
- ModuleChanProtect()
+ ModuleChanProtect(Server* Me)
+ : Module::Module(Me)
{
// here we initialise our module. Use new to create new instances of the required
// classes.
- Srv = new Server;
+ Srv = Me;
Conf = new ConfigReader;
// set up our modes. We're using listmodes and not normal extmodes here.
// read our config options (main config file)
FirstInGetsFounder = Conf->ReadFlag("options","noservices",0);
}
+
+ void Implements(char* List)
+ {
+ List[I_On005Numeric] = List[I_OnUserKick] = List[I_OnUserPart] = List[I_OnRehash] = List[I_OnUserJoin] = List[I_OnAccessCheck] = List[I_OnExtendedMode] = List[I_OnSendList] = List[I_OnSyncChannel] = 1;
+ }
virtual void On005Numeric(std::string &output)
{
user->Shrink("cm_protect_"+std::string(chan->name));
}
- virtual void OnUserPart(userrec* user, chanrec* channel)
+ virtual void OnUserPart(userrec* user, chanrec* channel, std::string partreason)
{
// FIX: when someone parts a channel we must remove their Extensibles!
user->Shrink("cm_founder_"+std::string(channel->name));
virtual ~ModuleChanProtect()
{
delete Conf;
- delete Srv;
}
virtual Version GetVersion()
return Version(1,0,0,0,VF_STATIC|VF_VENDOR);
}
- virtual void OnChannelSync(chanrec* chan, Module* proto, void* opaque)
+ virtual void OnSyncChannel(chanrec* chan, Module* proto, void* opaque)
{
// this is called when the server is linking into a net and wants to sync channel data.
// we should send our mode changes for the channel here to ensure that other servers
proto->ProtoSendMode(opaque,TYPE_CHANNEL,chan,"+a "+std::string(cl[i]->nick));
}
}
- return commands;
}
};
{
}
- virtual Module * CreateModule()
+ virtual Module * CreateModule(Server* Me)
{
- return new ModuleChanProtect;
+ return new ModuleChanProtect(Me);
}
};