1
0
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:
Adam
2013-08-07 19:40:05 +00:00
parent 7f1b5552dc
commit c480695369
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -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));