diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/commands.h | 4 | ||||
-rw-r--r-- | include/services.h | 1 |
2 files changed, 3 insertions, 2 deletions
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<Anope::string> syntax; + std::vector<std::pair<Anope::string, std::function<bool(CommandSource&)>>> 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<bool(CommandSource&)> &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 <deque> #include <exception> #include <fstream> +#include <functional> #include <iostream> #include <list> #include <map> |