diff options
| author | 2022-12-27 17:57:54 +0000 | |
|---|---|---|
| committer | 2022-12-27 18:19:10 +0000 | |
| commit | 75de6e0d5c28d0a4f798a02be024e45f148bc52c (patch) | |
| tree | 1e4b18a50051b3950716f79c0818a0cf5e7a5bcb /src/modules/m_cloaking.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
Add the ListExtItem extension type.
Diffstat (limited to 'src/modules/m_cloaking.cpp')
| -rw-r--r-- | src/modules/m_cloaking.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 0cb209ea7..d70979972 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -84,34 +84,19 @@ struct CloakInfo final typedef std::vector<std::string> CloakList; -class CloakExtItem final - : public SimpleExtItem<CloakList> -{ -public: - CloakExtItem(Module* Creator) - : SimpleExtItem(Creator, "cloaks", ExtensionType::USER) - { - } - - std::string ToHuman(const Extensible* container, void* item) const noexcept override - { - return stdalgo::string::join(*static_cast<CloakList*>(item), ' '); - } -}; - class CloakUser final : public ModeHandler { public: bool active = false; - CloakExtItem ext; + ListExtItem<CloakList> ext; std::string debounce_uid; time_t debounce_ts = 0; int debounce_count = 0; CloakUser(Module* source) : ModeHandler(source, "cloak", 'x', PARAM_NONE, MODETYPE_USER) - , ext(source) + , ext(source, "cloaks", ExtensionType::USER) { } |
