* | Inspire Internet Relay Chat Daemon |
* +------------------------------------+
*
- * InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- * E-mail:
- * <brain@chatspike.net>
- * <Craig@chatspike.net>
- *
- * Written by Craig Edwards, Craig McLure, and others.
+ * InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
+ *
* This program is free but copyrighted software; see
* the file COPYING for details.
*
ModuleCloaking(InspIRCd* Me)
: Module::Module(Me)
{
- /* Attempt to locate the Hash service provider, bail if we can't find it */
+ ServerInstance->UseInterface("HashRequest");
+
+ /* Attempt to locate the md5 service provider, bail if we can't find it */
HashModule = ServerInstance->FindModule("m_md5.so");
if (!HashModule)
throw ModuleException("Can't find m_md5.so. Please load m_md5.so before m_cloaking.so.");
cu = new CloakUser(ServerInstance, this, HashModule);
/* Register it with the core */
- ServerInstance->AddMode(cu, 'x');
+ if (!ServerInstance->AddMode(cu, 'x'))
+ throw ModuleException("Could not add new modes!");
- OnRehash("");
+ OnRehash(NULL,"");
}
virtual ~ModuleCloaking()
{
ServerInstance->Modes->DelMode(cu);
DELETE(cu);
+ ServerInstance->DoneWithInterface("HashRequest");
}
virtual Version GetVersion()
return Version(1,1,0,2,VF_COMMON|VF_VENDOR,API_VERSION);
}
- virtual void OnRehash(const std::string ¶meter)
+ virtual void OnRehash(userrec* user, const std::string ¶meter)
{
cu->DoRehash();
}