summaryrefslogtreecommitdiff
path: root/modules/database/db_sql_live.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-03-18 11:46:14 -0500
committerAdam <Adam@anope.org>2013-03-18 12:16:51 -0500
commit731912f01eb14d811575c492dc64b60084bd412c (patch)
treed7d0219aa03bfa6187599a4d380ec701099fd827 /modules/database/db_sql_live.cpp
parent51963915ba17dc4e8e13d7430f1dcbddcebe9e3d (diff)
Add db_sql:import config option so we can know for sure whether or not we want a database import
Diffstat (limited to 'modules/database/db_sql_live.cpp')
-rw-r--r--modules/database/db_sql_live.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/database/db_sql_live.cpp b/modules/database/db_sql_live.cpp
index 62f1c0ca4..c7c48937a 100644
--- a/modules/database/db_sql_live.cpp
+++ b/modules/database/db_sql_live.cpp
@@ -76,6 +76,9 @@ class DBMySQL : public Module, public Pipe
ModuleManager::Attach(i, this, sizeof(i) / sizeof(Implementation));
OnReload();
+
+ if (ModuleManager::FindFirstOf(DATABASE) != this)
+ throw ModuleException("If db_sql_live is loaded it must be the first database module loaded.");
}
void OnNotify() anope_override