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/botserv/kick.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/botserv/kick.cpp')
-rw-r--r-- | modules/botserv/kick.cpp | 67 |
1 files changed, 33 insertions, 34 deletions
diff --git a/modules/botserv/kick.cpp b/modules/botserv/kick.cpp index 4411ee4ed..20af77d1c 100644 --- a/modules/botserv/kick.cpp +++ b/modules/botserv/kick.cpp @@ -43,42 +43,41 @@ class KickerDataImpl : public KickerData { friend class KickerDataType; - ChanServ::Channel *channel = nullptr; - - bool amsgs = false, - badwords = false, - bolds = false, - caps = false, - colors = false, - flood = false, - italics = false, - repeat = false, - reverses = false, - underlines = false; - - int16_t ttb_bolds = 0, - ttb_colors = 0, - ttb_reverses = 0, - ttb_underlines = 0, - ttb_badwords = 0, - ttb_caps = 0, - ttb_flood = 0, - ttb_repeat = 0, - ttb_italics = 0, - ttb_amsgs = 0; - - int16_t capsmin = 0, - capspercent = 0, - floodlines = 0, - floodsecs = 0, - repeattimes = 0; - - bool dontkickops = false, - dontkickvoices = false; + Serialize::Storage<ChanServ::Channel *> channel; + + Serialize::Storage<bool> amsgs, + badwords, + bolds, + caps, + colors, + flood, + italics, + repeat, + reverses, + underlines; + + Serialize::Storage<int16_t> ttb_bolds, + ttb_colors, + ttb_reverses, + ttb_underlines, + ttb_badwords, + ttb_caps, + ttb_flood, + ttb_repeat, + ttb_italics, + ttb_amsgs; + + Serialize::Storage<int16_t> capsmin, + capspercent, + floodlines, + floodsecs, + repeattimes; + + Serialize::Storage<bool> dontkickops, + dontkickvoices; public: - KickerDataImpl(Serialize::TypeBase *type) : KickerData(type) { } - KickerDataImpl(Serialize::TypeBase *type, Serialize::ID id) : KickerData(type, id) { } + using KickerData::KickerData; ChanServ::Channel *GetChannel() override; void SetChannel(ChanServ::Channel *) override; |