X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules.cpp;h=73bd2a5e2dd6988476dc8e1b2e0833afdff9fcc7;hb=1efc234a54bd66714f9743ca7d1f3d5c0be3628e;hp=4087a1d62ebc66a3853b235b8d1ec15ed22999bb;hpb=5cf6f65044c27a69e70d795d75e826ce3f0b97a1;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules.cpp b/src/modules.cpp index 4087a1d62..73bd2a5e2 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -1,14 +1,20 @@ /* * InspIRCd -- Internet Relay Chat Daemon * + * Copyright (C) 2019 nia + * Copyright (C) 2019 iwalkalone + * Copyright (C) 2013, 2017-2020 Sadie Powell + * Copyright (C) 2013 Daniel Vassdal + * Copyright (C) 2013 Adam + * Copyright (C) 2012-2016, 2018 Attila Molnar + * Copyright (C) 2012 Robby * Copyright (C) 2009-2010 Daniel De Graaf - * Copyright (C) 2007, 2009 Dennis Friis - * Copyright (C) 2003-2008 Craig Edwards + * Copyright (C) 2009 Uli Schlachter * Copyright (C) 2008 Thomas Stagner - * Copyright (C) 2006-2007 Robin Burchell - * Copyright (C) 2006-2007 Oliver Lupton - * Copyright (C) 2007 Pippijn van Steenhoven - * Copyright (C) 2003 randomdan + * Copyright (C) 2007-2008 Robin Burchell + * Copyright (C) 2007 Oliver Lupton + * Copyright (C) 2007 Dennis Friis + * Copyright (C) 2006-2010 Craig Edwards * * 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 @@ -58,6 +64,8 @@ Module::Module() CullResult Module::cull() { + if (ModuleDLLManager) + ServerInstance->GlobalCulls.AddItem(ModuleDLLManager); return classbase::cull(); } @@ -98,6 +106,7 @@ void Module::OnUnloadModule(Module*) { DetachEvent(I_OnUnloadModule); } void Module::OnBackgroundTimer(time_t) { DetachEvent(I_OnBackgroundTimer); } ModResult Module::OnPreCommand(std::string&, CommandBase::Params&, LocalUser*, bool) { DetachEvent(I_OnPreCommand); return MOD_RES_PASSTHRU; } void Module::OnPostCommand(Command*, const CommandBase::Params&, LocalUser*, CmdResult, bool) { DetachEvent(I_OnPostCommand); } +void Module::OnCommandBlocked(const std::string&, const CommandBase::Params&, LocalUser*) { DetachEvent(I_OnCommandBlocked); } void Module::OnUserInit(LocalUser*) { DetachEvent(I_OnUserInit); } void Module::OnUserPostInit(LocalUser*) { DetachEvent(I_OnUserPostInit); } ModResult Module::OnCheckReady(LocalUser*) { DetachEvent(I_OnCheckReady); return MOD_RES_PASSTHRU; } @@ -141,6 +150,7 @@ void Module::OnServiceAdd(ServiceProvider&) { DetachEvent(I_OnServiceAdd); } void Module::OnServiceDel(ServiceProvider&) { DetachEvent(I_OnServiceDel); } ModResult Module::OnUserWrite(LocalUser*, ClientProtocol::Message&) { DetachEvent(I_OnUserWrite); return MOD_RES_PASSTHRU; } ModResult Module::OnConnectionFail(LocalUser*, BufferedSocketError) { DetachEvent(I_OnConnectionFail); return MOD_RES_PASSTHRU; } +void Module::OnShutdown(const std::string& reason) { DetachEvent(I_OnShutdown); } ServiceProvider::ServiceProvider(Module* Creator, const std::string& Name, ServiceType Type) : creator(Creator), name(Name), service(Type) @@ -442,11 +452,8 @@ namespace UnloadAction(Module* m) : mod(m) {} void Call() CXX11_OVERRIDE { - DLLManager* dll = mod->ModuleDLLManager; ServerInstance->Modules->DoSafeUnload(mod); ServerInstance->GlobalCulls.Apply(); - // In pure static mode this is always NULL - delete dll; ServerInstance->GlobalCulls.AddItem(this); } };