0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-29 08:54:02 +01:00

modules/console: Improve event info output fmt.

modules/console: Improve room top servers.
This commit is contained in:
Jason Volk 2019-07-21 19:34:47 -07:00
parent b17b508c2a
commit 4c0e7c220b

View file

@ -6610,6 +6610,10 @@ console_cmd__event(opt &out, const string_view &line)
if(m::event::auth::is_power_event(event))
out << "+ POWER EVENT" << std::endl;
const m::event::refs &refs{event_idx};
if(refs.count())
out << "+ REFERENCED BY " << refs.count() << std::endl;
const m::event::prev prev{event};
if(prev.auth_events_count() || prev.prev_events_count())
out << std::endl;
@ -6644,7 +6648,6 @@ console_cmd__event(opt &out, const string_view &line)
<< " " << pretty_oneline(event, false) << std::endl;
}
const m::event::refs &refs{event_idx};
const auto refcnt(refs.count());
if(refcnt)
{
@ -6659,8 +6662,6 @@ console_cmd__event(opt &out, const string_view &line)
return true;
});
}
out << std::endl;
out << "+ REFERENCED BY " << refs.count() << std::endl;
return true;
}
@ -7574,6 +7575,8 @@ console_cmd__room__top(opt &out, const string_view &line)
out << "top event: " << std::get<m::event::id::buf>(top) << std::endl;
out << "joined: " << m::room::members{room_id}.count("join") << std::endl;
out << "servers: " << m::room::origins{room_id}.count() << std::endl;
out << "servers up: " << m::room::origins{room_id}.count_online() << std::endl;
out << "servers err: " << m::room::origins{room_id}.count_error() << std::endl;
out << std::endl;
state.for_each(m::room::state::types{[&out, &state]