* +------------------------------------+
*
* InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
* the file COPYING for details.
class ModulePrivacyMode : public Module
{
- PrivacyMode* pm;
+ PrivacyMode pm;
public:
- ModulePrivacyMode(InspIRCd* Me) : Module(Me)
+ ModulePrivacyMode(InspIRCd* Me) : Module(Me), pm(Me)
{
- pm = new PrivacyMode(ServerInstance);
- if (!ServerInstance->Modes->AddMode(pm))
+ if (!ServerInstance->Modes->AddMode(&pm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice };
ServerInstance->Modules->Attach(eventlist, this, 2);
virtual ~ModulePrivacyMode()
{
- ServerInstance->Modes->DelMode(pm);
- delete pm;
+ ServerInstance->Modes->DelMode(&pm);
}
virtual Version GetVersion()