aboutsummaryrefslogtreecommitdiffstats
path: root/include/modules
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-04-16 10:52:34 +0100
committerGravatar Sadie Powell2022-04-16 10:52:34 +0100
commit985ef046ce82cbfc3e9ce1eab98955fc1b63fc88 (patch)
tree1875ea4e8fc6a4e31ed66978d9b579f5363bc282 /include/modules
parentMove most channel mode constructors to their own source file. (diff)
Add a class that wraps a dynamic reference to the extban manager.
Diffstat (limited to 'include/modules')
-rw-r--r--include/modules/extban.h12
1 files changed, 12 insertions, 0 deletions
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<ExtBan::Manager>
+{
+public:
+ ManagerRef(Module* Creator)
+ : dynamic_reference_nocheck<ExtBan::Manager>(Creator, "extbanmanager")
+ {
+ }
+};
+
/** Base class for types of extban. */
class ExtBan::Base
: public ServiceProvider