summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-02-18 11:48:43 +0000
committerSadie Powell <sadie@witchery.services>2025-02-18 11:48:43 +0000
commit9f82a960e44c5db3d2e64bdda099823b3078c90d (patch)
tree8890673c0c4e0787359224d6768a7818d31661ae /modules
parent3bba87b655a5c7d5f5721a5a7fc018f30f1390f2 (diff)
Log the version of third-party libraries on load.
Diffstat (limited to 'modules')
-rw-r--r--modules/extra/ldap.cpp2
-rw-r--r--modules/extra/mysql.cpp3
-rw-r--r--modules/extra/regex_pcre2.cpp4
-rw-r--r--modules/extra/regex_tre.cpp2
-rw-r--r--modules/extra/sqlite.cpp1
-rw-r--r--modules/extra/ssl_gnutls.cpp2
-rw-r--r--modules/extra/ssl_openssl.cpp2
7 files changed, 15 insertions, 1 deletions
diff --git a/modules/extra/ldap.cpp b/modules/extra/ldap.cpp
index ec2b88a39..44ed9ed48 100644
--- a/modules/extra/ldap.cpp
+++ b/modules/extra/ldap.cpp
@@ -525,6 +525,8 @@ public:
ModuleLDAP(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR)
{
me = this;
+
+ Log() << "Module was compiled against LDAP (" << LDAP_VENDOR_NAME << ") version " << LDAP_VENDOR_VERSION_MAJOR << "." << LDAP_VENDOR_VERSION_MINOR << "." << LDAP_VENDOR_VERSION_PATCH;
}
~ModuleLDAP()
diff --git a/modules/extra/mysql.cpp b/modules/extra/mysql.cpp
index 027291991..65fe6d5c4 100644
--- a/modules/extra/mysql.cpp
+++ b/modules/extra/mysql.cpp
@@ -242,9 +242,10 @@ public:
{
me = this;
-
DThread = new DispatcherThread();
DThread->Start();
+
+ Log() << "Module was compiled against MySQL version " << (MYSQL_VERSION_ID / 10000) << "." << (MYSQL_VERSION_ID / 100 % 100) << "." << (MYSQL_VERSION_ID % 100) << " and is running against version " << mysql_get_client_info();
}
~ModuleSQL()
diff --git a/modules/extra/regex_pcre2.cpp b/modules/extra/regex_pcre2.cpp
index a99eb9afb..e589846d5 100644
--- a/modules/extra/regex_pcre2.cpp
+++ b/modules/extra/regex_pcre2.cpp
@@ -70,6 +70,10 @@ public:
pcre_regex_provider(this)
{
this->SetPermanent(true);
+
+ std::vector<char> pcre_version(16);
+ if (pcre2_config(PCRE2_CONFIG_VERSION, pcre_version.data()) >= 0)
+ Log() << "Module was compiled against PCRE2 version " << PCRE2_MAJOR << "." << PCRE2_MINOR << " and is running against version " << pcre_version.data();
}
~ModuleRegexPCRE()
diff --git a/modules/extra/regex_tre.cpp b/modules/extra/regex_tre.cpp
index 022dd0d9d..f7f095bb7 100644
--- a/modules/extra/regex_tre.cpp
+++ b/modules/extra/regex_tre.cpp
@@ -62,6 +62,8 @@ public:
tre_regex_provider(this)
{
this->SetPermanent(true);
+
+ Log() << "Module was compiled against TRE version " << TRE_VERSION << " and is running against version " << tre_version();
}
~ModuleRegexTRE()
diff --git a/modules/extra/sqlite.cpp b/modules/extra/sqlite.cpp
index 565c1ee30..d234066a0 100644
--- a/modules/extra/sqlite.cpp
+++ b/modules/extra/sqlite.cpp
@@ -103,6 +103,7 @@ class ModuleSQLite final
public:
ModuleSQLite(const Anope::string &modname, const Anope::string &creator) : Module(modname, creator, EXTRA | VENDOR)
{
+ Log() << "Module was compiled against SQLite version " << SQLITE_VERSION << " and is running against version " << sqlite3_libversion();
}
~ModuleSQLite()
diff --git a/modules/extra/ssl_gnutls.cpp b/modules/extra/ssl_gnutls.cpp
index 338cc91c1..f8ef18f16 100644
--- a/modules/extra/ssl_gnutls.cpp
+++ b/modules/extra/ssl_gnutls.cpp
@@ -299,6 +299,8 @@ public:
{
me = this;
this->SetPermanent(true);
+
+ Log() << "Module was compiled against GnuTLS version " << GNUTLS_VERSION << " and is running against version " << gnutls_check_version(nullptr);
}
~GnuTLSModule()
diff --git a/modules/extra/ssl_openssl.cpp b/modules/extra/ssl_openssl.cpp
index 45ea0714d..28e734e44 100644
--- a/modules/extra/ssl_openssl.cpp
+++ b/modules/extra/ssl_openssl.cpp
@@ -125,6 +125,8 @@ public:
Anope::string context_name = "Anope";
SSL_CTX_set_session_id_context(client_ctx, reinterpret_cast<const unsigned char *>(context_name.c_str()), context_name.length());
SSL_CTX_set_session_id_context(server_ctx, reinterpret_cast<const unsigned char *>(context_name.c_str()), context_name.length());
+
+ Log() << "Module was compiled against OpenSSL version " << OPENSSL_VERSION_STR << " and is running against version " << OpenSSL_version(OPENSSL_VERSION_STRING);
}
~SSLModule()