1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 16:05:42 +02:00

Save unconfirmed status and passcodes in the database.

Fix db_sql_live to not reinsert all records if there are extra columns.
Plexus has no chmode +r
This commit is contained in:
Adam
2013-08-24 22:23:04 -04:00
parent 8be5f53f1f
commit 446b3a910d
4 changed files with 14 additions and 11 deletions
+6 -4
View File
@@ -243,11 +243,13 @@ class DBSQL : public Module, public Pipe
if (obj)
{
/* The Unserialize operation is destructive so rebuild the data for UpdateCache.
* Also the old data may contain columns that we don't use, so we reserialize the
* object to know for sure our cache is consistent
*/
Data data2;
/* The Unserialize operation is destructive so rebuild the data for UpdateCache */
for (std::map<Anope::string, Anope::string>::const_iterator rit = row.begin(), rit_end = row.end(); rit != rit_end; ++rit)
if (rit->first != "id" && rit->first != "timestamp")
data2[rit->first] << rit->second;
obj->Serialize(data2);
obj->UpdateCache(data2); /* We know this is the most up to date copy */
}
}