1
0
mirror of https://github.com/anope/anope.git synced 2026-07-02 20:03:12 +02:00

Deduplicate RPC parameter count checks.

This commit is contained in:
Sadie Powell
2025-02-25 23:13:54 +00:00
parent bb3e124bdb
commit 752f5e269e
4 changed files with 29 additions and 30 deletions
+5 -1
View File
@@ -173,10 +173,12 @@ class RPC::Event
{
private:
Anope::string event;
size_t minparams;
protected:
Event(const Anope::string& e)
Event(const Anope::string& e, size_t mp = 0)
: event(e)
, minparams(mp)
{
}
@@ -185,6 +187,8 @@ public:
const auto &GetEvent() const { return event; }
const auto &GetMinParams() const { return minparams; }
virtual bool Run(ServiceInterface *iface, HTTPClient *client, Request &request) = 0;
};