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:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user