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

Add some basic commands for sysadmins and permission system for them

This commit is contained in:
NG (Graham)
2025-10-31 21:02:10 -04:00
parent 77b6d8c11f
commit 3ef1aa20d0
13 changed files with 290 additions and 29 deletions

View File

@@ -338,6 +338,7 @@ pub trait IntercomUser {
async fn save_custom_avatar(&self, image: Vec<u8>) -> Result<(), polariton_server::operations::SimpleOpError>;
async fn webservice_listener(&self) -> Result<IntercomListener<super::intercom::IntercomWebServiceUserMessage>, polariton_server::operations::SimpleOpError>;
async fn show_dev_message(&self, msg: super::intercom::IntercomDevMessage, to: Vec<String>);
async fn enter_maintenance(&self, msg: super::intercom::IntercomMaintenanceMessage, to: Vec<String>);
}
pub struct IntercomListener<D: serde::de::DeserializeOwned> {
@@ -373,5 +374,6 @@ pub trait CommonUser: Send + Sync {
fn is_mod(&self) -> bool;
fn is_admin(&self) -> bool;
fn is_dev(&self) -> bool;
fn is_royal(&self) -> bool;
fn is_banned(&self) -> bool;
}