/*
* InspIRCd -- Internet Relay Chat Daemon
*
- * Copyright (C) 2017-2019 Sadie Powell <sadie@witchery.services>
+ * Copyright (C) 2020 Matt Schatz <genius3000@g3k.solutions>
+ * Copyright (C) 2017-2020 Sadie Powell <sadie@witchery.services>
* Copyright (C) 2014 Attila Molnar <attilamolnar@hush.com>
* Copyright (C) 2012 Robby <robby@chatbelgie.be>
* Copyright (C) 2012 ChrisTX <xpipe@hotmail.de>
* Copyright (C) 2009 Uli Schlachter <psychon@inspircd.org>
* Copyright (C) 2007 Robin Burchell <robin+git@viroteck.net>
* Copyright (C) 2007 Dennis Friis <peavey@inspircd.org>
- * Copyright (C) 2006, 2010 Craig Edwards <brain@inspircd.org>
+ * Copyright (C) 2003, 2006, 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
return;
#ifdef _WIN32
- FreeLibrary(lib)
+ FreeLibrary(lib);
#else
dlclose(lib);
#endif
Module* DLLManager::CallInit()
{
- const uint32_t* abi = GetSymbol<const uint32_t>(MODULE_STR_ABI);
+ if (!lib)
+ return NULL;
+
+ const unsigned long* abi = GetSymbol<const unsigned long>(MODULE_STR_ABI);
if (!abi)
{
err.assign(libname + " is not a module (no ABI symbol)");
else if (*abi != MODULE_ABI)
{
const char* version = GetVersion();
- err.assign(InspIRCd::Format("%s was built against %s which is too %s to use with %s",
- libname.c_str(), version ? version : "an unknown version",
- *abi < MODULE_ABI ? "old" : "new", INSPIRCD_VERSION));
+ err.assign(InspIRCd::Format("%s was built against %s (%lu) which is too %s to use with %s (%lu).",
+ libname.c_str(), version ? version : "an unknown version", *abi,
+ *abi < MODULE_ABI ? "old" : "new", INSPIRCD_VERSION, MODULE_ABI));
return NULL;
}