diff options
Diffstat (limited to 'modules/botserv')
| -rw-r--r-- | modules/botserv/badwords.cpp | 9 | ||||
| -rw-r--r-- | modules/botserv/kick.cpp | 67 |
2 files changed, 37 insertions, 39 deletions
diff --git a/modules/botserv/badwords.cpp b/modules/botserv/badwords.cpp index 914e89ea9..754e202a7 100644 --- a/modules/botserv/badwords.cpp +++ b/modules/botserv/badwords.cpp @@ -24,13 +24,12 @@ class BadWordImpl : public BadWord { friend class BadWordsType; - ChanServ::Channel *channel = nullptr; - Anope::string word; - BadWordType type; + Serialize::Storage<ChanServ::Channel *> channel; + Serialize::Storage<Anope::string> word; + Serialize::Storage<BadWordType> type; public: - BadWordImpl(Serialize::TypeBase *type) : BadWord(type) { } - BadWordImpl(Serialize::TypeBase *type, Serialize::ID id) : BadWord(type, id) { } + using BadWord::BadWord; ChanServ::Channel *GetChannel() override; void SetChannel(ChanServ::Channel *c) override; 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; |
