summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/service.h4
-rw-r--r--modules/database/db_sql.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/include/service.h b/include/service.h
index 34e3c064e..c5c5a5881 100644
--- a/include/service.h
+++ b/include/service.h
@@ -128,6 +128,10 @@ class ServiceReference : public Reference<T>
{
}
+ const Anope::string &GetServiceName() const { return name; }
+
+ const Anope::string &GetServiceType() const { return type; }
+
inline void operator=(const Anope::string &n)
{
this->name = n;
diff --git a/modules/database/db_sql.cpp b/modules/database/db_sql.cpp
index adb83d1e0..1094fb9a9 100644
--- a/modules/database/db_sql.cpp
+++ b/modules/database/db_sql.cpp
@@ -76,7 +76,7 @@ class DBSQL : public Module, public Pipe
if (last_warn + 300 < Anope::CurTime)
{
last_warn = Anope::CurTime;
- Log(this) << "db_sql: Unable to execute query, is SQL configured correctly?";
+ Log(this) << "db_sql: Unable to execute query, is SQL (" << this->sql.GetServiceName() << ") configured correctly?";
}
}
else if (!Anope::Quitting)
@@ -174,7 +174,7 @@ class DBSQL : public Module, public Pipe
{
if (!this->sql)
{
- Log(this) << "Unable to load databases, is SQL configured correctly?";
+ Log(this) << "Unable to load databases, is SQL (" << this->sql.GetServiceName() << ") configured correctly?";
return EVENT_CONTINUE;
}