mirror of
https://github.com/matrix-construct/construct
synced 2024-10-02 13:48:53 +02:00
ircd:Ⓜ️🪝 Add call counter.
This commit is contained in:
parent
58ffceec4c
commit
24797bfa22
2 changed files with 2 additions and 0 deletions
|
@ -28,6 +28,7 @@ struct ircd::m::hook
|
|||
m::event matching;
|
||||
std::function<void (const m::event &)> function;
|
||||
bool registered {false};
|
||||
size_t calls {0};
|
||||
|
||||
string_view site_name() const;
|
||||
site *find_site() const;
|
||||
|
|
|
@ -3137,6 +3137,7 @@ ircd::m::hook::site::call(hook &hook,
|
|||
const event &event)
|
||||
try
|
||||
{
|
||||
++hook.calls;
|
||||
hook.function(event);
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
|
|
Loading…
Reference in a new issue