mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 15:00:51 +01:00
modules/console: Add event bad cmd.
This commit is contained in:
parent
96b84e30ef
commit
85db62ff17
1 changed files with 33 additions and 0 deletions
|
@ -1990,6 +1990,39 @@ console_id__event(opt &out,
|
||||||
return console_cmd__event(out, line);
|
return console_cmd__event(out, line);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
console_cmd__event__bad(opt &out, const string_view &line)
|
||||||
|
{
|
||||||
|
const params param{line, " ",
|
||||||
|
{
|
||||||
|
"event_id",
|
||||||
|
}};
|
||||||
|
|
||||||
|
const m::event::id event_id
|
||||||
|
{
|
||||||
|
param.at(0)
|
||||||
|
};
|
||||||
|
|
||||||
|
m::event::idx workaround;
|
||||||
|
const bool b
|
||||||
|
{
|
||||||
|
bad(event_id, workaround)
|
||||||
|
};
|
||||||
|
|
||||||
|
out << event_id << "is"
|
||||||
|
<< (b? " " : " NOT ") << "BAD";
|
||||||
|
|
||||||
|
if(b && workaround != m::event::idx(-1))
|
||||||
|
m::event::fetch::event_id(workaround, std::nothrow, [&out]
|
||||||
|
(const m::event::id &event_id)
|
||||||
|
{
|
||||||
|
out << " and a workaround is " << event_id;
|
||||||
|
});
|
||||||
|
|
||||||
|
out << std::endl;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
console_cmd__event__erase(opt &out, const string_view &line)
|
console_cmd__event__erase(opt &out, const string_view &line)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue