mirror of
https://github.com/anope/anope.git
synced 2026-06-28 10:46:38 +02:00
Fix db_sql to not remove objects when shutting down, as some modules that unload before it when shutting down remove their items then
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user