diff options
Diffstat (limited to 'include/modules/info.h')
-rw-r--r-- | include/modules/info.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/include/modules/info.h b/include/modules/info.h new file mode 100644 index 000000000..920aacabe --- /dev/null +++ b/include/modules/info.h @@ -0,0 +1,49 @@ +/* + * + * (C) 2003-2024 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + */ + +#pragma once + +class OperInfo +{ +protected: + OperInfo() = default; + + OperInfo(const Anope::string &t, const Anope::string &i, const Anope::string &a, time_t c) + : target(t) + , info(i) + , adder(a) + , created(c) + { + } + +public: + Anope::string target; + Anope::string info; + Anope::string adder; + time_t created = 0; + + virtual ~OperInfo() = default; +}; + +class OperInfoList + : public Serialize::Checker<std::vector<OperInfo *>> +{ +public: + OperInfoList() + : Serialize::Checker<std::vector<OperInfo *>>("OperInfo") + { + } + + virtual ~OperInfoList() + { + for (auto *info : *(*this)) + delete info; + } + + virtual OperInfo *Create() = 0; +}; |