From 70bf013ef0bf6c8ba60e85aacca2ec97848ca0b3 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 19 Apr 2025 16:43:21 +0100 Subject: Allow syntax messages to take a predicate. --- include/commands.h | 4 ++-- include/services.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/commands.h b/include/commands.h index 9692f438c..49a8e2183 100644 --- a/include/commands.h +++ b/include/commands.h @@ -97,7 +97,7 @@ class CoreExport Command : public Service { Anope::string desc; - std::vector syntax; + std::vector>> syntax; /* Allow unregistered users to use this command */ bool allow_unregistered; /* Command requires that a user is executing it */ @@ -129,7 +129,7 @@ protected: void SetDesc(const Anope::string &d); void ClearSyntax(); - void SetSyntax(const Anope::string &s); + void SetSyntax(const Anope::string &s, const std::function &p = nullptr); void SendSyntax(CommandSource &); void AllowUnregistered(bool b); diff --git a/include/services.h b/include/services.h index 7f0752d11..19b837581 100644 --- a/include/services.h +++ b/include/services.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include -- cgit