rust/hedgewars-server/src/server/handlers/common.rs
changeset 14804 b3adc030104b
parent 14803 50fcef24003f
child 14805 8390d5e4e39c
equal deleted inserted replaced
14803:50fcef24003f 14804:b3adc030104b
    45     let everyone_msg = LobbyJoined(vec![server.clients[client_id].nick.clone()]);
    45     let everyone_msg = LobbyJoined(vec![server.clients[client_id].nick.clone()]);
    46     let flags_msg = ClientFlags(
    46     let flags_msg = ClientFlags(
    47         add_flags(&[Flags::InRoom]),
    47         add_flags(&[Flags::InRoom]),
    48         server.collect_nicks(|(_, c)| c.room_id.is_some()),
    48         server.collect_nicks(|(_, c)| c.room_id.is_some()),
    49     );
    49     );
    50     let server_msg = ServerMessage("\u{1f994} is watching".to_string());
    50     let server_msg = ServerMessage(server.get_greetings(client_id).to_string());
    51 
    51 
    52     let rooms_msg = Rooms(
    52     let rooms_msg = Rooms(
    53         server
    53         server
    54             .rooms
    54             .rooms
    55             .iter()
    55             .iter()
   136         }
   136         }
   137 
   137 
   138         if client.is_master() && !room.is_fixed() {
   138         if client.is_master() && !room.is_fixed() {
   139             client.set_is_master(false);
   139             client.set_is_master(false);
   140             response.add(
   140             response.add(
   141                 ClientFlags(remove_flags(&[Flags::RoomMaster]), vec![client.nick.clone()])
   141                 ClientFlags(
   142                     .send_all()
   142                     remove_flags(&[Flags::RoomMaster]),
   143                     .in_room(room.id),
   143                     vec![client.nick.clone()],
       
   144                 )
       
   145                 .send_all()
       
   146                 .in_room(room.id),
   144             );
   147             );
   145             room.master_id = None;
   148             room.master_id = None;
   146         }
   149         }
   147     }
   150     }
   148 
   151