diff --git a/modules/database/db_sql.cpp b/modules/database/db_sql.cpp index b575d3fd1..f6af798b4 100644 --- a/modules/database/db_sql.cpp +++ b/modules/database/db_sql.cpp @@ -197,6 +197,8 @@ class DBSQL : public Module, public Pipe void OnSerializableDestruct(Serializable *obj) anope_override { + if (this->shutting_down) + return; Serialize::Type *s_type = obj->GetSerializableType(); if (s_type && obj->id > 0) this->RunBackground("DELETE FROM `" + this->prefix + s_type->GetName() + "` WHERE `id` = " + stringify(obj->id)); diff --git a/modules/database/db_sql_live.cpp b/modules/database/db_sql_live.cpp index 02e8a355f..7ef0528a8 100644 --- a/modules/database/db_sql_live.cpp +++ b/modules/database/db_sql_live.cpp @@ -126,6 +126,11 @@ class DBMySQL : public Module, public Pipe init = false; } + void OnRestart() anope_override + { + init = false; + } + void OnReload(Configuration::Conf *conf) anope_override { Configuration::Block *block = conf->GetModule(this);