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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user