diff options
author | Adam <Adam@anope.org> | 2012-12-13 06:12:56 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2012-12-13 06:12:56 -0500 |
commit | c1077faa281c5635f85b892e605e23bd6c8fcc3b (patch) | |
tree | 213b5f87a19f182e1efd6110f03ff10d5b10ebf6 /modules/commands/ns_ajoin.cpp | |
parent | 76ba147c22944b67e8522cd2bb7b6e1bae498ced (diff) |
Optimize much of the database code and serialize code.
Diffstat (limited to 'modules/commands/ns_ajoin.cpp')
-rw-r--r-- | modules/commands/ns_ajoin.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/commands/ns_ajoin.cpp b/modules/commands/ns_ajoin.cpp index ce92582f6..3a73772c1 100644 --- a/modules/commands/ns_ajoin.cpp +++ b/modules/commands/ns_ajoin.cpp @@ -28,23 +28,23 @@ struct AJoinEntry : Serializable AJoinEntry() : Serializable("AJoinEntry") { } - Serialize::Data Serialize() const anope_override + void Serialize(Serialize::Data &sd) const anope_override { - Serialize::Data sd; - if (!this->owner) - return sd; + return; sd["owner"] << this->owner->display; sd["channel"] << this->channel; sd["key"] << this->key; - - return sd; } static Serializable* Unserialize(Serializable *obj, Serialize::Data &sd) { - NickCore *nc = NickCore::Find(sd["owner"].astr()); + Anope::string sowner; + + sd["owner"] >> sowner; + + NickCore *nc = NickCore::Find(sowner); if (nc == NULL) return NULL; |