diff options
| author | 2023-01-24 23:41:50 +0000 | |
|---|---|---|
| committer | 2023-01-25 00:39:27 +0000 | |
| commit | af8effe4f0876d6fa934806745712f679bd36278 (patch) | |
| tree | b0d6de94d60dc5e116faa5e14b6029fb1c527886 /src/modules/extra/m_mysql.cpp | |
| parent | Fix using (unsigned) long instead of (s)size_t. (diff) | |
Replace getInt/getUInt/getFloat with type safe templated functions.
Diffstat (limited to 'src/modules/extra/m_mysql.cpp')
| -rw-r--r-- | src/modules/extra/m_mysql.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<unsigned int>(config->getUInt("port", 3306, 1, 65535)); + unsigned int port = config->getNum<unsigned int>("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: {}", |
