rust/hedgewars-server/src/handlers/common.rs
changeset 15555 0606f89698e7
parent 15553 ede5f4ec48f3
child 15556 bb93e9642b5b
equal deleted inserted replaced
15554:f1205f33bf5b 15555:0606f89698e7
   157 pub fn get_room_join_error(error: JoinRoomError, response: &mut Response) {
   157 pub fn get_room_join_error(error: JoinRoomError, response: &mut Response) {
   158     use super::strings::*;
   158     use super::strings::*;
   159     match error {
   159     match error {
   160         JoinRoomError::DoesntExist => response.warn(NO_ROOM),
   160         JoinRoomError::DoesntExist => response.warn(NO_ROOM),
   161         JoinRoomError::WrongProtocol => response.warn(WRONG_PROTOCOL),
   161         JoinRoomError::WrongProtocol => response.warn(WRONG_PROTOCOL),
       
   162         JoinRoomError::WrongPassword => {
       
   163             response.add(Notice("WrongPassword".to_string()).send_self())
       
   164         }
   162         JoinRoomError::Full => response.warn(ROOM_FULL),
   165         JoinRoomError::Full => response.warn(ROOM_FULL),
   163         JoinRoomError::Restricted => response.warn(ROOM_JOIN_RESTRICTED),
   166         JoinRoomError::Restricted => response.warn(ROOM_JOIN_RESTRICTED),
   164     }
   167     }
   165 }
   168 }
   166 
   169