0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-07-03 09:18:19 +02:00

modules/console: Add events__in dispatcher convenience cmd.

This commit is contained in:
Jason Volk 2019-04-16 15:23:12 -07:00
parent d2d987f07f
commit b14c2964b4

View file

@ -5790,6 +5790,31 @@ console_cmd__events__in__origin(opt &out, const string_view &line)
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>
events_dump_buffer_size
{