diff options
author | Adam <Adam@anope.org> | 2016-12-01 09:25:53 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2016-12-01 09:25:53 -0500 |
commit | ca28f9cfcbff0fbdb2afe96f1427245f83db7c47 (patch) | |
tree | ac5de801a4db01a7cb689ec670537ad74c7c53e6 /modules/chanserv/mode.cpp | |
parent | 2f512281029fbf4f7ef9832e05804831ad2d9ba2 (diff) |
Allow objects to opt out of gc, don't gc accounts with users logged in
Also store cached state with the field by using Serialize::Storage for
field storage
Diffstat (limited to 'modules/chanserv/mode.cpp')
-rw-r--r-- | modules/chanserv/mode.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/modules/chanserv/mode.cpp b/modules/chanserv/mode.cpp index b20558bc0..5a22b4be8 100644 --- a/modules/chanserv/mode.cpp +++ b/modules/chanserv/mode.cpp @@ -25,14 +25,13 @@ class ModeLockImpl : public ModeLock { friend class ModeLockType; - ChanServ::Channel *channel = nullptr; - bool set = false; - Anope::string name, param, setter; - time_t created = 0; + Serialize::Storage<ChanServ::Channel *> channel; + Serialize::Storage<bool> set; + Serialize::Storage<Anope::string> name, param, setter; + Serialize::Storage<time_t> created; public: - ModeLockImpl(Serialize::TypeBase *type) : ModeLock(type) { } - ModeLockImpl(Serialize::TypeBase *type, Serialize::ID id) : ModeLock(type, id) { } + using ModeLock::ModeLock; ChanServ::Channel *GetChannel() override; void SetChannel(ChanServ::Channel *ci) override; |