mirror of
https://github.com/matrix-construct/construct
synced 2024-10-02 21:59:02 +02:00
modules/console: Add events__in dispatcher convenience cmd.
This commit is contained in:
parent
d2d987f07f
commit
b14c2964b4
1 changed files with 25 additions and 0 deletions
|
@ -5790,6 +5790,31 @@ console_cmd__events__in__origin(opt &out, const string_view &line)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
console_cmd__events__in(opt &out, const string_view &line)
|
||||||
|
{
|
||||||
|
const params param{line, " ",
|
||||||
|
{
|
||||||
|
"what"
|
||||||
|
}};
|
||||||
|
|
||||||
|
const string_view &what
|
||||||
|
{
|
||||||
|
param.at("what")
|
||||||
|
};
|
||||||
|
|
||||||
|
if(valid(m::id::USER, what))
|
||||||
|
return console_cmd__events__in__sender(out, line);
|
||||||
|
|
||||||
|
if(rfc3986::valid_host(std::nothrow, what))
|
||||||
|
return console_cmd__events__in__origin(out, line);
|
||||||
|
|
||||||
|
throw error
|
||||||
|
{
|
||||||
|
"Cannot interpret type of argument '%s'", what
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
conf::item<size_t>
|
conf::item<size_t>
|
||||||
events_dump_buffer_size
|
events_dump_buffer_size
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue