1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Add server-side chat command to grant account permissions in-game

This commit is contained in:
NG (Graham)
2025-12-26 20:46:05 -05:00
parent 7f187dcb98
commit 5e05cbdb59
8 changed files with 368 additions and 177 deletions

View File

@@ -207,6 +207,7 @@ pub trait ChatUser: CommonUser + IntercomUser {
async fn get_sanctions(&self, username: String) -> Result<polariton::operation::Typed<()>, i16>;
async fn set_sanction(&self, sanction: SetSanction) -> Result<(), i16>;
async fn get_total_registered_users(&self) -> Result<u64, polariton_server::operations::SimpleOpError>;
async fn set_permission(&self, username: String, permission: UserRole, value: bool) -> Result<(), polariton_server::operations::SimpleOpError>;
}
pub struct SetSanction {
@@ -238,6 +239,13 @@ impl SanctionType {
}
}
pub enum UserRole {
Moderator,
Administrator,
Developer,
Royalty,
}
#[async_trait::async_trait]
pub trait LobbyUser {
fn user_id(&self) -> i32;