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:
parent
e497fe8506
commit
4fa07b58a7
1 changed files with 30 additions and 0 deletions
|
@ -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
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue