mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd:Ⓜ️:room::power: Use conf items to seed all default values.
This commit is contained in:
parent
a8b02549db
commit
84347857c6
2 changed files with 12 additions and 8 deletions
|
@ -46,10 +46,10 @@ struct ircd::m::room::power
|
|||
struct revoke;
|
||||
using closure = std::function<bool (const string_view &, const int64_t &)>;
|
||||
|
||||
static const int64_t default_creator_level;
|
||||
static const int64_t default_power_level;
|
||||
static const int64_t default_event_level;
|
||||
static const int64_t default_user_level;
|
||||
static conf::item<int64_t> default_creator_level;
|
||||
static conf::item<int64_t> default_power_level;
|
||||
static conf::item<int64_t> default_event_level;
|
||||
static conf::item<int64_t> default_user_level;
|
||||
|
||||
m::room room;
|
||||
event::idx power_event_idx {0};
|
||||
|
|
|
@ -148,25 +148,29 @@ ircd::m::room::power::grant::grant(json::stack::object &out,
|
|||
decltype(ircd::m::room::power::default_creator_level)
|
||||
ircd::m::room::power::default_creator_level
|
||||
{
|
||||
100
|
||||
{ "name", "ircd.m.room.power.default.creator_level" },
|
||||
{ "default", 100L },
|
||||
};
|
||||
|
||||
decltype(ircd::m::room::power::default_power_level)
|
||||
ircd::m::room::power::default_power_level
|
||||
{
|
||||
50
|
||||
{ "name", "ircd.m.room.power.default.power_level" },
|
||||
{ "default", 50L },
|
||||
};
|
||||
|
||||
decltype(ircd::m::room::power::default_event_level)
|
||||
ircd::m::room::power::default_event_level
|
||||
{
|
||||
0
|
||||
{ "name", "ircd.m.room.power.default.event_level" },
|
||||
{ "default", 0L },
|
||||
};
|
||||
|
||||
decltype(ircd::m::room::power::default_user_level)
|
||||
ircd::m::room::power::default_user_level
|
||||
{
|
||||
0
|
||||
{ "name", "ircd.m.room.power.default.user_level" },
|
||||
{ "default", 0L },
|
||||
};
|
||||
|
||||
ircd::json::object
|
||||
|
|
Loading…
Reference in a new issue