ServerInstance->Modules->Detach(i, this);
}
+void Module::ReadConfig(ConfigStatus& status) { }
ModResult Module::OnSendSnotice(char &snomask, std::string &type, const std::string &message) { DetachEvent(I_OnSendSnotice); return MOD_RES_PASSTHRU; }
void Module::OnUserConnect(LocalUser*) { DetachEvent(I_OnUserConnect); }
void Module::OnUserQuit(User*, const std::string&, const std::string&) { DetachEvent(I_OnUserQuit); }
void Module::OnUserPart(Membership*, std::string&, CUList&) { DetachEvent(I_OnUserPart); }
void Module::OnPreRehash(User*, const std::string&) { DetachEvent(I_OnPreRehash); }
void Module::OnModuleRehash(User*, const std::string&) { DetachEvent(I_OnModuleRehash); }
-void Module::OnRehash(User*) { DetachEvent(I_OnRehash); }
ModResult Module::OnUserPreJoin(LocalUser*, Channel*, const std::string&, std::string&, const std::string&) { DetachEvent(I_OnUserPreJoin); return MOD_RES_PASSTHRU; }
void Module::OnMode(User*, User*, Channel*, const std::vector<std::string>&, const std::vector<TranslateType>&) { DetachEvent(I_OnMode); }
void Module::OnOper(User*, const std::string&) { DetachEvent(I_OnOper); }
void FileReader::Load(const std::string& filename)
{
// If the file is stored in the file cache then we used that version instead.
- ConfigFileCache::iterator it = ServerInstance->Config->Files.find(filename);
+ std::string realName = ServerInstance->Config->Paths.PrependConfig(filename);
+ ConfigFileCache::iterator it = ServerInstance->Config->Files.find(realName);
if (it != ServerInstance->Config->Files.end())
{
this->lines = it->second;
{
lines.clear();
- std::ifstream stream(filename.c_str());
+ std::ifstream stream(realName.c_str());
if (!stream.is_open())
throw CoreException(filename + " does not exist or is not readable!");