From 985ef046ce82cbfc3e9ce1eab98955fc1b63fc88 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 16 Apr 2022 10:52:34 +0100 Subject: Add a class that wraps a dynamic reference to the extban manager. --- include/modules/extban.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/modules') diff --git a/include/modules/extban.h b/include/modules/extban.h index 635c07557..17c66c031 100644 --- a/include/modules/extban.h +++ b/include/modules/extban.h @@ -26,6 +26,7 @@ namespace ExtBan class EventListener; class MatchingBase; class Manager; + class ManagerRef; /** All possible types of extban. */ enum class Type @@ -103,6 +104,17 @@ public: virtual Base* FindName(const std::string& name) const = 0; }; +/** Dynamic reference to the extban manager class. */ +class ExtBan::ManagerRef final + : public dynamic_reference_nocheck +{ +public: + ManagerRef(Module* Creator) + : dynamic_reference_nocheck(Creator, "extbanmanager") + { + } +}; + /** Base class for types of extban. */ class ExtBan::Base : public ServiceProvider -- cgit v1.3.1-10-gc9f91