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/os_session.h | |
| parent | 76ba147c22944b67e8522cd2bb7b6e1bae498ced (diff) | |
Optimize much of the database code and serialize code.
Diffstat (limited to 'modules/commands/os_session.h')
| -rw-r--r-- | modules/commands/os_session.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/modules/commands/os_session.h b/modules/commands/os_session.h index 7304b21ae..6d1dd917d 100644 --- a/modules/commands/os_session.h +++ b/modules/commands/os_session.h @@ -20,7 +20,7 @@ struct Exception : Serializable time_t expires; /* Time when it expires. 0 == no expiry */ Exception() : Serializable("Exception") { } - Serialize::Data Serialize() const anope_override; + void Serialize(Serialize::Data &data) const anope_override; static Serializable* Unserialize(Serializable *obj, Serialize::Data &data); }; @@ -53,18 +53,14 @@ class SessionService : public Service static ServiceReference<SessionService> session_service("SessionService", "session"); -Serialize::Data Exception::Serialize() const +void Exception::Serialize(Serialize::Data &data) const { - Serialize::Data data; - data["mask"] << this->mask; data["limit"] << this->limit; data["who"] << this->who; data["reason"] << this->reason; data["time"] << this->time; data["expires"] << this->expires; - - return data; } Serializable* Exception::Unserialize(Serializable *obj, Serialize::Data &data) |
