* Copyright (C) 2019 nia <nia@netbsd.org>
* Copyright (C) 2019 iwalkalone <iwalkalone69@gmail.com>
* Copyright (C) 2013, 2017-2020 Sadie Powell <sadie@witchery.services>
* Copyright (C) 2019 nia <nia@netbsd.org>
* Copyright (C) 2019 iwalkalone <iwalkalone69@gmail.com>
* Copyright (C) 2013, 2017-2020 Sadie Powell <sadie@witchery.services>
* Copyright (C) 2007-2008 Robin Burchell <robin+git@viroteck.net>
* Copyright (C) 2007 Oliver Lupton <om@inspircd.org>
* Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
* Copyright (C) 2007-2008 Robin Burchell <robin+git@viroteck.net>
* Copyright (C) 2007 Oliver Lupton <om@inspircd.org>
* Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
*
* This file is part of InspIRCd. InspIRCd is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public
*
* This file is part of InspIRCd. InspIRCd is free software: you can
* redistribute it and/or modify it under the terms of the GNU General Public
void Module::OnPostTopicChange(User*, Channel*, const std::string&) { DetachEvent(I_OnPostTopicChange); }
void Module::OnDecodeMetaData(Extensible*, const std::string&, const std::string&) { DetachEvent(I_OnDecodeMetaData); }
void Module::OnChangeHost(User*, const std::string&) { DetachEvent(I_OnChangeHost); }
void Module::OnPostTopicChange(User*, Channel*, const std::string&) { DetachEvent(I_OnPostTopicChange); }
void Module::OnDecodeMetaData(Extensible*, const std::string&, const std::string&) { DetachEvent(I_OnDecodeMetaData); }
void Module::OnChangeHost(User*, const std::string&) { DetachEvent(I_OnChangeHost); }
void Module::OnChangeRealName(User*, const std::string&) { DetachEvent(I_OnChangeRealName); }
void Module::OnChangeIdent(User*, const std::string&) { DetachEvent(I_OnChangeIdent); }
void Module::OnAddLine(User*, XLine*) { DetachEvent(I_OnAddLine); }
void Module::OnChangeRealName(User*, const std::string&) { DetachEvent(I_OnChangeRealName); }
void Module::OnChangeIdent(User*, const std::string&) { DetachEvent(I_OnChangeIdent); }
void Module::OnAddLine(User*, XLine*) { DetachEvent(I_OnAddLine); }
bool ModuleManager::PrioritizeHooks()
{
/* We give every module a chance to re-prioritize when we introduce a new one,
bool ModuleManager::PrioritizeHooks()
{
/* We give every module a chance to re-prioritize when we introduce a new one,
++u;
mod->OnCleanup(ExtensionItem::EXT_USER, user);
user->doUnhookExtensions(items);
}
++u;
mod->OnCleanup(ExtensionItem::EXT_USER, user);
user->doUnhookExtensions(items);
}
std::cout << "[" << con_green << "*" << con_reset << "] Loading module:\t" << con_green << name << con_reset << std::endl;
if (!this->Load(name, true))
{
std::cout << "[" << con_green << "*" << con_reset << "] Loading module:\t" << con_green << name << con_reset << std::endl;
if (!this->Load(name, true))
{
+ ServerInstance->Logs->Log("SERVICE", LOG_DEBUG, "Adding %s %s provided by %s", item.name.c_str(),
+ item.GetTypeString(), item.creator ? item.creator->ModuleSourceFile.c_str() : "the core");
+ ServerInstance->Logs->Log("SERVICE", LOG_DEBUG, "Deleting %s %s provided by %s", item.name.c_str(),
+ item.GetTypeString(), item.creator ? item.creator->ModuleSourceFile.c_str() : "the core");
{
// Because find() may return any element with a matching key in case count(key) > 1 use lower_bound()
// to ensure a dynref with the same name as another one resolves to the same object
{
// Because find() may return any element with a matching key in case count(key) > 1 use lower_bound()
// to ensure a dynref with the same name as another one resolves to the same object
if ((i != ServerInstance->Modules.DataProviders.end()) && (i->first == this->name))
{
ServiceProvider* newvalue = i->second;
if ((i != ServerInstance->Modules.DataProviders.end()) && (i->first == this->name))
{
ServiceProvider* newvalue = i->second;