0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

modules/console: Move client sync cmd to synchron.

This commit is contained in:
Jason Volk 2019-07-07 18:14:31 -07:00
parent 021823ec6d
commit dfbc6a136f

View file

@ -5406,45 +5406,6 @@ console_cmd__client__spawn(opt &out, const string_view &line)
return true; return true;
} }
bool
console_cmd__client__sync(opt &out, const string_view &line)
{
for(auto *const &data_p : m::sync::data::list)
{
const auto *const &client(data_p->client);
if(client)
out << client->loghead() << " | ";
out << m::sync::loghead(*data_p) << " | ";
out << std::endl;
}
return true;
}
bool
console_cmd__client__sync__item(opt &out, const string_view &line)
{
const params param{line, " ",
{
"prefix"
}};
const auto prefix
{
param.at("prefix", ""_sv)
};
ircd::m::sync::for_each(prefix, [&out]
(const auto &item)
{
out << item.name() << std::endl;
return true;
});
return true;
}
// //
// resource // resource
// //
@ -13384,3 +13345,46 @@ console_cmd__fetch__sync(opt &out, const string_view &line)
out << "done." << std::endl; out << "done." << std::endl;
return true; return true;
} }
//
// synchron
//
bool
console_cmd__synchron(opt &out, const string_view &line)
{
for(auto *const &data_p : m::sync::data::list)
{
const auto *const &client(data_p->client);
if(client)
out << client->loghead() << " | ";
out << m::sync::loghead(*data_p) << " | ";
out << std::endl;
}
return true;
}
bool
console_cmd__synchron__item(opt &out, const string_view &line)
{
const params param{line, " ",
{
"prefix"
}};
const auto prefix
{
param.at("prefix", ""_sv)
};
ircd::m::sync::for_each(prefix, [&out]
(const auto &item)
{
out << item.name() << std::endl;
return true;
});
return true;
}