equal
deleted
inserted
replaced
47 let c = &mut server.clients[client_id]; |
47 let c = &mut server.clients[client_id]; |
48 |
48 |
49 actions = if let Some((_, r)) = room { |
49 actions = if let Some((_, r)) = room { |
50 if c.protocol_number != r.protocol_number { |
50 if c.protocol_number != r.protocol_number { |
51 vec![Warn("Room version incompatible to your Hedgewars version!".to_string())] |
51 vec![Warn("Room version incompatible to your Hedgewars version!".to_string())] |
|
52 } else if r.is_join_restricted() { |
|
53 vec![Warn("Access denied. This room currently doesn't allow joining.".to_string())] |
|
54 } else if r.players_number == u8::max_value() { |
|
55 vec![Warn("This room is already full".to_string())] |
52 } else { |
56 } else { |
53 vec![MoveToRoom(r.id), |
57 vec![MoveToRoom(r.id), |
54 RoomJoined(nicks).send_self().action()] |
58 RoomJoined(nicks).send_self().action()] |
55 } |
59 } |
56 } else { |
60 } else { |