summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2024-01-06 13:39:03 +0000
committerSadie Powell <sadie@witchery.services>2024-01-06 13:39:03 +0000
commitc0453cfec106b33ba9974e5ebe707ff82a476dac (patch)
treeeb9844cb81d354378355d15aee2a655b9b91c8ed
parenta9ab0c72a69cacc597e91870f50622de0334f9a7 (diff)
Fix a sign conversion issue in the mysql module.
-rw-r--r--modules/extra/m_mysql.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/modules/extra/m_mysql.cpp b/modules/extra/m_mysql.cpp
index 393085a41..f2c4c6285 100644
--- a/modules/extra/m_mysql.cpp
+++ b/modules/extra/m_mysql.cpp
@@ -115,7 +115,7 @@ class MySQLService : public Provider
Anope::string server;
Anope::string user;
Anope::string password;
- int port;
+ unsigned int port;
MYSQL *sql = nullptr;
@@ -235,7 +235,7 @@ public:
const Anope::string &server = block->Get<const Anope::string>("server", "127.0.0.1");
const Anope::string &user = block->Get<const Anope::string>("username", "anope");
const Anope::string &password = block->Get<const Anope::string>("password");
- int port = block->Get<int>("port", "3306");
+ unsigned int port = block->Get<unsigned int>("port", "3306");
try
{
@@ -297,8 +297,13 @@ public:
}
};
-MySQLService::MySQLService(Module *o, const Anope::string &n, const Anope::string &d, const Anope::string &s, const Anope::string &u, const Anope::string &p, int po)
-: Provider(o, n), database(d), server(s), user(u), password(p), port(po)
+MySQLService::MySQLService(Module *o, const Anope::string &n, const Anope::string &d, const Anope::string &s, const Anope::string &u, const Anope::string &p, unsigned int po)
+ : Provider(o, n)
+ , database(d)
+ , server(s)
+ , user(u)
+ , password(p)
+ , port(po)
{
Connect();
}