]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modulemanager.cpp
Add a human-readable version of the cloak list.
[user/henk/code/inspircd.git] / src / modulemanager.cpp
index 8cb7a040175bdef246bcfe57a94e693e0de44ab1..cac1263581ce2c8e4d03c04e13512ff71beac67c 100644 (file)
@@ -1,6 +1,12 @@
 /*
  * InspIRCd -- Internet Relay Chat Daemon
  *
+ *   Copyright (C) 2013, 2015, 2019-2020 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2013 Adam <Adam@anope.org>
+ *   Copyright (C) 2012-2013, 2015 Attila Molnar <attilamolnar@hush.com>
+ *   Copyright (C) 2012 Robby <robby@chatbelgie.be>
+ *   Copyright (C) 2012 ChrisTX <xpipe@hotmail.de>
+ *   Copyright (C) 2010 Craig Edwards <brain@inspircd.org>
  *   Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
  *
  * This file is part of InspIRCd.  InspIRCd is free software: you can
@@ -63,13 +69,13 @@ bool ModuleManager::Load(const std::string& modname, bool defer)
                        newmod->ModuleSourceFile = filename;
                        newmod->ModuleDLLManager = newhandle;
                        Modules[filename] = newmod;
-                       std::string version = newhandle->GetVersion();
-                       if (version.empty())
-                               version.assign("unknown");
+                       const char* version = newhandle->GetVersion();
+                       if (!version)
+                               version = "unknown";
                        if (defer)
                        {
                                ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "New module introduced: %s (Module version %s)",
-                                       filename.c_str(), version.c_str());
+                                       filename.c_str(), version);
                        }
                        else
                        {
@@ -82,7 +88,7 @@ bool ModuleManager::Load(const std::string& modname, bool defer)
 
                                Version v = newmod->GetVersion();
                                ServerInstance->Logs->Log("MODULE", LOG_DEFAULT, "New module introduced: %s (Module version %s)%s",
-                                       filename.c_str(), version.c_str(), (!(v.Flags & VF_VENDOR) ? " [3rd Party]" : " [Vendor]"));
+                                       filename.c_str(), version, (!(v.Flags & VF_VENDOR) ? " [3rd Party]" : " [Vendor]"));
                        }
                }
                else