* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd: (C) 2002-2008 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ * See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
* the file COPYING for details.
class ModuleHideChans : public Module
{
bool AffectsOpers;
- HideChans* hm;
+ HideChans hm;
public:
- ModuleHideChans(InspIRCd* Me) : Module(Me)
+ ModuleHideChans(InspIRCd* Me) : Module(Me), hm(Me)
{
-
- hm = new HideChans(ServerInstance);
- if (!ServerInstance->Modes->AddMode(hm))
+ if (!ServerInstance->Modes->AddMode(&hm))
throw ModuleException("Could not add new modes!");
Implementation eventlist[] = { I_OnWhoisLine, I_OnRehash };
ServerInstance->Modules->Attach(eventlist, this, 2);
- OnRehash(NULL, "");
+ OnRehash(NULL);
}
virtual ~ModuleHideChans()
{
- ServerInstance->Modes->DelMode(hm);
- delete hm;
+ ServerInstance->Modes->DelMode(&hm);
}
virtual Version GetVersion()
return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
}
- virtual void OnRehash(User* user, const std::string ¶meter)
+ virtual void OnRehash(User* user)
{
ConfigReader conf(ServerInstance);
AffectsOpers = conf.ReadFlag("hidechans", "affectsopers", 0);