diff options
| author | 2021-03-10 04:53:30 +0000 | |
|---|---|---|
| committer | 2021-03-10 04:53:30 +0000 | |
| commit | ae997d094597251ec0ec9c5931c97b4db49a31d1 (patch) | |
| tree | 8bbf2c9346800da792d442ec7f8b6708274e7e06 /src/modules/m_cloaking.cpp | |
| parent | Merge branch 'insp3' into master. (diff) | |
| parent | Rename `<bind:ssl>` to `<bind:sslprofile>`. (diff) | |
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/m_cloaking.cpp')
| -rw-r--r-- | src/modules/m_cloaking.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/modules/m_cloaking.cpp b/src/modules/m_cloaking.cpp index 46d2a86de..657f05721 100644 --- a/src/modules/m_cloaking.cpp +++ b/src/modules/m_cloaking.cpp @@ -81,20 +81,32 @@ struct CloakInfo typedef std::vector<std::string> CloakList; -/** Handles user mode +x - */ +class CloakExtItem : public SimpleExtItem<CloakList> +{ + public: + CloakExtItem(Module* Creator) + : SimpleExtItem(Creator, "cloaks", ExtensionItem::EXT_USER) + { + } + + std::string ToHuman(const Extensible* container, void* item) const override + { + return stdalgo::string::join(*static_cast<CloakList*>(item), ' '); + } +}; + class CloakUser : public ModeHandler { public: bool active = false; - SimpleExtItem<CloakList> ext; + CloakExtItem 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, "cloaked_host", ExtensionItem::EXT_USER) + , ext(source) { } |
