diff options
author | Sadie Powell <sadie@witchery.services> | 2021-05-25 22:06:50 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2024-03-07 18:50:36 +0000 |
commit | 12214bee7228f884918dacff56108604e10bdc46 (patch) | |
tree | fa977d680247d58a01f0664989c429be928eb55c /include | |
parent | 08a35231ef00ee9dd3af80c186a78b740cd8185a (diff) |
Add the initial version of the Atheme database importer.
Diffstat (limited to 'include')
-rw-r--r-- | include/anope.h | 3 | ||||
-rw-r--r-- | include/modules/hs_request.h | 23 | ||||
-rw-r--r-- | include/modules/info.h | 49 |
3 files changed, 75 insertions, 0 deletions
diff --git a/include/anope.h b/include/anope.h index 1a01db189..bafd862e7 100644 --- a/include/anope.h +++ b/include/anope.h @@ -590,6 +590,9 @@ public: */ sepstream(const Anope::string &source, char separator, bool allowempty = false); + /** Retrieves the underlying string. */ + const auto &GetString() const { return tokens; } + /** Fetch the next token from the stream * @param token The next token from the stream is placed here * @return True if tokens still remain, false if there are none left diff --git a/include/modules/hs_request.h b/include/modules/hs_request.h new file mode 100644 index 000000000..43977c01d --- /dev/null +++ b/include/modules/hs_request.h @@ -0,0 +1,23 @@ +/* + * + * (C) 2003-2024 Anope Team + * Contact us at team@anope.org + * + * Please read COPYING and README for further details. + */ + +#pragma once + +class HostRequest +{ +protected: + HostRequest() = default; + +public: + Anope::string nick; + Anope::string ident; + Anope::string host; + time_t time = 0; + + virtual ~HostRequest() = default; +}; 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; +}; |