diff options
author | Adam <Adam@anope.org> | 2012-01-15 01:47:31 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-01-15 01:47:31 -0500 |
commit | 964d63cdacdbc3769b269ae0e6e616f58f0256bc (patch) | |
tree | 7398a51b5bc15e054fb6640b226b26c1e2793eda /src/nickcore.cpp | |
parent | f38faedbdad404983c0d291b8e0e233a6b0fb70d (diff) |
Improve on db_sql_live_read
Diffstat (limited to 'src/nickcore.cpp')
-rw-r--r-- | src/nickcore.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/nickcore.cpp b/src/nickcore.cpp index 836ffdda4..370d6b705 100644 --- a/src/nickcore.cpp +++ b/src/nickcore.cpp @@ -73,7 +73,9 @@ Serializable::serialized_data NickCore::serialize() void NickCore::unserialize(serialized_data &data) { - NickCore *nc = new NickCore(data["display"].astr()); + NickCore *nc = findcore(data["display"].astr()); + if (nc == NULL) + nc = new NickCore(data["display"].astr()); data["pass"] >> nc->pass; data["email"] >> nc->email; data["greet"] >> nc->greet; @@ -83,6 +85,7 @@ void NickCore::unserialize(serialized_data &data) Anope::string buf; data["access"] >> buf; spacesepstream sep(buf); + nc->access.clear(); while (sep.GetToken(buf)) nc->access.push_back(buf); } @@ -90,6 +93,7 @@ void NickCore::unserialize(serialized_data &data) Anope::string buf; data["cert"] >> buf; spacesepstream sep(buf); + nc->cert.clear(); while (sep.GetToken(buf)) nc->cert.push_back(buf); } @@ -98,6 +102,7 @@ void NickCore::unserialize(serialized_data &data) Anope::string buf; data["memoignores"] >> buf; spacesepstream sep(buf); + nc->memos.ignores.clear(); while (sep.GetToken(buf)) nc->memos.ignores.push_back(buf); } |