rust/hedgewars-server/src/core/server.rs
changeset 15848 3d05bada4799
parent 15804 747278149393
child 15882 f185e7367dd3
equal deleted inserted replaced
15847:2839b68a3732 15848:3d05bada4799
   254     pub fn is_admin(&self, client_id: ClientId) -> bool {
   254     pub fn is_admin(&self, client_id: ClientId) -> bool {
   255         self.clients
   255         self.clients
   256             .get(client_id)
   256             .get(client_id)
   257             .map(|c| c.is_admin())
   257             .map(|c| c.is_admin())
   258             .unwrap_or(false)
   258             .unwrap_or(false)
       
   259     }
       
   260 
       
   261     #[inline]
       
   262     pub fn is_checker(&self, client_id: ClientId) -> bool {
       
   263         self.checkers.contains(client_id)
   259     }
   264     }
   260 
   265 
   261     pub fn add_client(&mut self, client_id: ClientId, data: HwAnteroomClient) {
   266     pub fn add_client(&mut self, client_id: ClientId, data: HwAnteroomClient) {
   262         if data.is_checker {
   267         if data.is_checker {
   263             self.checkers.insert(client_id, HwChecker::new(client_id));
   268             self.checkers.insert(client_id, HwChecker::new(client_id));