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/cs_suspend.cpp | |
parent | 76ba147c22944b67e8522cd2bb7b6e1bae498ced (diff) |
Optimize much of the database code and serialize code.
Diffstat (limited to 'modules/commands/cs_suspend.cpp')
-rw-r--r-- | modules/commands/cs_suspend.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/commands/cs_suspend.cpp b/modules/commands/cs_suspend.cpp index b380d4c97..097de1823 100644 --- a/modules/commands/cs_suspend.cpp +++ b/modules/commands/cs_suspend.cpp @@ -22,19 +22,19 @@ struct ChanSuspend : ExtensibleItem, Serializable { } - Serialize::Data Serialize() const anope_override + void Serialize(Serialize::Data &sd) const anope_override { - Serialize::Data sd; - sd["chan"] << this->chan; sd["when"] << this->when; - - return sd; } static Serializable* Unserialize(Serializable *obj, Serialize::Data &sd) { - ChannelInfo *ci = ChannelInfo::Find(sd["chan"].astr()); + Anope::string schan; + + sd["chan"] >> schan; + + ChannelInfo *ci = ChannelInfo::Find(schan); if (ci == NULL) return NULL; |