0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-16 06:51:08 +01:00

ircd:Ⓜ️:user: Add oper()/deoper() grant and revoke to interface.

This commit is contained in:
Jason Volk 2023-02-14 18:25:53 -08:00
parent 84539e3d95
commit fbd5b3f571
2 changed files with 35 additions and 0 deletions

View file

@ -70,6 +70,9 @@ struct ircd::m::user
event::id::buf deactivate(); event::id::buf deactivate();
event::id::buf activate(); event::id::buf activate();
event::id::buf deoper();
event::id::buf oper();
user(const id &user_id) user(const id &user_id)
:user_id{user_id} :user_id{user_id}
{} {}

View file

@ -230,6 +230,38 @@ const
}; };
} }
ircd::m::event::id::buf
ircd::m::user::oper()
{
const m::room::id::buf control_room_id
{
"!control", origin(my())
};
const m::room control_room
{
control_room_id
};
return m::join(control_room, user_id);
}
ircd::m::event::id::buf
ircd::m::user::deoper()
{
const m::room::id::buf control_room_id
{
"!control", origin(my())
};
const m::room control_room
{
control_room_id
};
return m::leave(control_room, user_id);
}
ircd::m::event::id::buf ircd::m::event::id::buf
ircd::m::user::activate() ircd::m::user::activate()
{ {