From af8effe4f0876d6fa934806745712f679bd36278 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 24 Jan 2023 23:41:50 +0000 Subject: Replace getInt/getUInt/getFloat with type safe templated functions. --- src/modules/extra/m_mysql.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/extra/m_mysql.cpp') diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index 0d89e30a5..b2715dba8 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -335,7 +335,7 @@ public: const std::string user = config->getString("user"); const std::string pass = config->getString("pass"); const std::string dbname = config->getString("name"); - unsigned int port = static_cast(config->getUInt("port", 3306, 1, 65535)); + unsigned int port = config->getNum("port", 3306, 1, 65535); if (!mysql_real_connect(connection, host.c_str(), user.c_str(), pass.c_str(), dbname.c_str(), port, nullptr, CLIENT_IGNORE_SIGPIPE)) { ServerInstance->Logs.Error(MODNAME, "Unable to connect to the {} MySQL server: {}", -- cgit v1.3.1-10-gc9f91