]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules.cpp
Look up the SSL I/O hook properly in spanningtree.
[user/henk/code/inspircd.git] / src / modules.cpp
index 07ded820988b2f436882b823e544dfbf6707414e..bad788fe92fc700a3ccd9a187d0f6ab9a4edec62 100644 (file)
@@ -4,7 +4,7 @@
  *   Copyright (C) 2020 Matt Schatz <genius3000@g3k.solutions>
  *   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) 2013, 2017-2021 Sadie Powell <sadie@witchery.services>
  *   Copyright (C) 2013 Daniel Vassdal <shutter@canternet.org>
  *   Copyright (C) 2013 Adam <Adam@anope.org>
  *   Copyright (C) 2012-2016, 2018 Attila Molnar <attilamolnar@hush.com>
@@ -15,7 +15,7 @@
  *   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) 2006-2010 Craig Edwards <brain@inspircd.org>
+ *   Copyright (C) 2005-2010 Craig Edwards <brain@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
@@ -138,13 +138,13 @@ void              Module::OnChangeIdent(User*, const std::string&) { DetachEvent(I_OnChangeI
 void           Module::OnAddLine(User*, XLine*) { DetachEvent(I_OnAddLine); }
 void           Module::OnDelLine(User*, XLine*) { DetachEvent(I_OnDelLine); }
 void           Module::OnExpireLine(XLine*) { DetachEvent(I_OnExpireLine); }
-void           Module::OnCleanup(ExtensionItem::ExtensibleType, Extensible*) { }
+void           Module::OnCleanup(ExtensionItem::ExtensibleType, Extensible*) { }
 ModResult      Module::OnChannelPreDelete(Channel*) { DetachEvent(I_OnChannelPreDelete); return MOD_RES_PASSTHRU; }
 void           Module::OnChannelDelete(Channel*) { DetachEvent(I_OnChannelDelete); }
 void           Module::OnBuildNeighborList(User*, IncludeChanList&, std::map<User*,bool>&) { DetachEvent(I_OnBuildNeighborList); }
 void           Module::OnGarbageCollect() { DetachEvent(I_OnGarbageCollect); }
 ModResult      Module::OnSetConnectClass(LocalUser* user, ConnectClass* myclass) { DetachEvent(I_OnSetConnectClass); return MOD_RES_PASSTHRU; }
-void           Module::OnUserMessage(User*, const MessageTarget&, const MessageDetails&) { DetachEvent(I_OnUserMessage); }
+void           Module::OnUserMessage(User*, const MessageTarget&, const MessageDetails&) { DetachEvent(I_OnUserMessage); }
 ModResult      Module::OnNumeric(User*, const Numeric::Numeric&) { DetachEvent(I_OnNumeric); return MOD_RES_PASSTHRU; }
 ModResult   Module::OnAcceptConnection(int, ListenSocket*, irc::sockets::sockaddrs*, irc::sockets::sockaddrs*) { DetachEvent(I_OnAcceptConnection); return MOD_RES_PASSTHRU; }
 void           Module::OnSetUserIP(LocalUser*) { DetachEvent(I_OnSetUserIP); }
@@ -442,7 +442,7 @@ void ModuleManager::DoSafeUnload(Module* mod)
        Modules.erase(modfind);
        ServerInstance->GlobalCulls.AddItem(mod);
 
-       ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "Module %s unloaded",mod->ModuleSourceFile.c_str());
+       ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "The %s module was unloaded", mod->ModuleSourceFile.c_str());
        ServerInstance->ISupport.Build();
 }
 
@@ -599,9 +599,10 @@ void ModuleManager::AddService(ServiceProvider& item)
                        std::string::size_type slash = item.name.find('/');
                        if (slash != std::string::npos)
                        {
+                               // Also register foo/bar as foo.
                                DataProviders.insert(std::make_pair(item.name.substr(0, slash), &item));
-                               DataProviders.insert(std::make_pair(item.name.substr(slash + 1), &item));
                        }
+
                        dynamic_reference_base::reset_all();
                        break;
                }