diff options
author | Sadie Powell <sadie@witchery.services> | 2024-08-14 02:40:48 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-08-14 05:47:55 +0100 |
commit | 528b5938ec71abed396248cf5e00f346e685aaea (patch) | |
tree | e923fed32be3fb62f946d44c633cd85ce855550b /modules/chanserv/cs_seen.cpp | |
parent | 03bee1706383d2766923e5d8edbb90d7ad1948b6 (diff) |
Automatically determine SQL column type from the field.
Also add more column types to ensure we are storing data in the
best format in the database.
Diffstat (limited to 'modules/chanserv/cs_seen.cpp')
-rw-r--r-- | modules/chanserv/cs_seen.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/chanserv/cs_seen.cpp b/modules/chanserv/cs_seen.cpp index 1603983f5..97d23ee70 100644 --- a/modules/chanserv/cs_seen.cpp +++ b/modules/chanserv/cs_seen.cpp @@ -46,13 +46,13 @@ struct SeenInfo final void Serialize(Serialize::Data &data) const override { - data["nick"] << nick; - data["vhost"] << vhost; - data["type"] << type; - data["nick2"] << nick2; - data["channel"] << channel; - data["message"] << message; - data.SetType("last", Serialize::Data::DT_INT); data["last"] << last; + data.Store("nick", nick); + data.Store("vhost", vhost); + data.Store("type", type); + data.Store("nick2", nick2); + data.Store("channel", channel); + data.Store("message", message); + data.Store("last", last); } static Serializable *Unserialize(Serializable *obj, Serialize::Data &data) |