0
0
Fork 0
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:
Jason Volk 2018-05-12 19:43:57 -07:00
parent 58ffceec4c
commit 24797bfa22
2 changed files with 2 additions and 0 deletions

View file

@ -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;

View file

@ -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)