summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_sqlv2.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/modules/extra/m_sqlv2.h b/src/modules/extra/m_sqlv2.h
index 2e0ab2a19..cd3ea0eca 100644
--- a/src/modules/extra/m_sqlv2.h
+++ b/src/modules/extra/m_sqlv2.h
@@ -440,11 +440,12 @@ class SQLhost
bool ssl; /* If we should require SSL */
SQLhost()
+ : id(""), host(""), ip(""), port(0), name(""), user(""), pass(""), ssl(0)
{
}
SQLhost(const std::string& i, const std::string& h, unsigned int p, const std::string& n, const std::string& u, const std::string& pa, bool s)
- : id(i), host(h), port(p), name(n), user(u), pass(pa), ssl(s)
+ : id(i), host(h), ip(""), port(p), name(n), user(u), pass(pa), ssl(s)
{
}
@@ -460,6 +461,12 @@ bool operator== (const SQLhost& l, const SQLhost& r)
{
return (l.id == r.id && l.host == r.host && l.port == r.port && l.name == r.name && l.user == l.user && l.pass == r.pass && l.ssl == r.ssl);
}
+/** Overload operator!= for two SQLhost objects for easy comparison.
+ */
+bool operator!= (const SQLhost& l, const SQLhost& r)
+{
+ return (l.id != r.id || l.host != r.host || l.port != r.port || l.name != r.name || l.user != l.user || l.pass != r.pass || l.ssl != r.ssl);
+}
/** QueryQueue, a queue of queries waiting to be executed.