summaryrefslogtreecommitdiff
path: root/modules/chanserv/main/level.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-12-01 09:25:53 -0500
committerAdam <Adam@anope.org>2016-12-01 09:25:53 -0500
commitca28f9cfcbff0fbdb2afe96f1427245f83db7c47 (patch)
treeac5de801a4db01a7cb689ec670537ad74c7c53e6 /modules/chanserv/main/level.h
parent2f512281029fbf4f7ef9832e05804831ad2d9ba2 (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/main/level.h')
-rw-r--r--modules/chanserv/main/level.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/chanserv/main/level.h b/modules/chanserv/main/level.h
index d22dc2831..1da1b26b5 100644
--- a/modules/chanserv/main/level.h
+++ b/modules/chanserv/main/level.h
@@ -21,13 +21,12 @@ class LevelImpl : public ChanServ::Level
{
friend class LevelType;
- ChanServ::Channel *channel = nullptr;
- Anope::string name;
- int level = 0;
+ Serialize::Storage<ChanServ::Channel *> channel;
+ Serialize::Storage<Anope::string> name;
+ Serialize::Storage<int> level;
public:
- LevelImpl(Serialize::TypeBase *type) : ChanServ::Level(type) { }
- LevelImpl(Serialize::TypeBase *type, Serialize::ID id) : ChanServ::Level(type, id) { }
+ using ChanServ::Level::Level;
ChanServ::Channel *GetChannel() override;
void SetChannel(ChanServ::Channel *) override;