0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 08:42:34 +01:00

modules/console: Add event refs cmd.

This commit is contained in:
Jason Volk 2019-02-06 16:29:55 -08:00
parent e497fe8506
commit 4fa07b58a7

View file

@ -5804,6 +5804,36 @@ console_cmd__event__visible(opt &out, const string_view &line)
return true;
}
bool
console_cmd__event__refs(opt &out, const string_view &line)
{
const params param{line, " ",
{
"event_id"
}};
const m::event::id &event_id
{
param.at("event_id")
};
const m::event::refs refs
{
index(event_id)
};
refs.for_each([&out](const m::event::idx &idx)
{
out << idx
<< " " << m::event_id(idx)
<< std::endl;
return true;
});
return true;
}
//
// state
//