diff options
author | Adam <Adam@anope.org> | 2012-11-07 22:20:48 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-11-07 22:20:48 -0500 |
commit | 9ec482b7c298e86589a333b856aa5578a3004f6e (patch) | |
tree | 9a82ed8b17326a7eb315b174cd5791807287b5de /modules/database/db_sql_live.cpp | |
parent | 53e8cd18dc013f47b8aeff86d22f5eaad80244ab (diff) |
I haven't a clue why this was here but its not even remotely right.. fixes #1448
Diffstat (limited to 'modules/database/db_sql_live.cpp')
-rw-r--r-- | modules/database/db_sql_live.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/database/db_sql_live.cpp b/modules/database/db_sql_live.cpp index 1b4b7c6cd..3473fc1a9 100644 --- a/modules/database/db_sql_live.cpp +++ b/modules/database/db_sql_live.cpp @@ -106,9 +106,12 @@ class DBMySQL : public Module, public Pipe this->RunQueryResult(create[i]); SQLResult res = this->RunQueryResult(this->SQL->BuildInsert(this->prefix + s_type->GetName(), obj->id, data)); - if (res.GetID() > 0) + if (obj->id != res.GetID()) + { + /* In this case obj is new, so place it into the object map */ obj->id = res.GetID(); - s_type->objects.erase(obj->id); + s_type->objects[obj->id] = obj; + } } } |