mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Add stats chat command
This commit is contained in:
@@ -117,6 +117,7 @@ pub enum BuiltInChatOperation {
|
||||
Intercom(IntercomChatOperation),
|
||||
OnlineUsers,
|
||||
TotalUsers,
|
||||
Stats,
|
||||
Version,
|
||||
Help,
|
||||
}
|
||||
|
||||
@@ -29,4 +29,8 @@ impl super::CommonUser for UserData {
|
||||
async fn resolve_config_vehicle(&self, vehicle: &crate::persist::config::VehicleInfo, factory: &dyn oj_rc_factory::VehicleFactoryAdapter, weapon_order: &crate::cubes::WeaponListParser, cpu_counter: &crate::cubes::CpuListParser) -> Result<super::ResolvedVehicle, polariton_server::operations::SimpleOpError> {
|
||||
self.resolve_vehicle(vehicle, factory, weapon_order, cpu_counter).await
|
||||
}
|
||||
|
||||
async fn db_metrics(&self) -> oj_rc_database::DatabaseMetrics {
|
||||
self.db.metrics().await
|
||||
}
|
||||
}
|
||||
|
||||
@@ -376,4 +376,5 @@ pub trait CommonUser: Send + Sync {
|
||||
fn is_dev(&self) -> bool;
|
||||
fn is_royal(&self) -> bool;
|
||||
fn is_banned(&self) -> bool;
|
||||
async fn db_metrics(&self) -> oj_rc_database::DatabaseMetrics;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user