Browse Source

fix motd ownership

pbs
andy 5 years ago
parent
commit
114061c442
  1. 2
      src/patch/patch.rs

2
src/patch/patch.rs

@ -176,7 +176,7 @@ impl ServerState for PatchServerState {
Box::new(vec![SendPatchPacket::RequestLogin(RequestLogin {})].into_iter().map(move |pkt| (id, pkt)))
},
RecvPatchPacket::LoginReply(_pkt) => {
let mut p = vec![SendPatchPacket::Message(Message::new(self.patch_motd.to_string()))];
let mut p = vec![SendPatchPacket::Message(Message::new(self.patch_motd.clone()))];
p.append(&mut get_file_list_packets(&self.patch_file_tree));
p.push(SendPatchPacket::PatchEndList(PatchEndList {}));
Box::new(p.into_iter().map(move |pkt| (id, pkt)))

Loading…
Cancel
Save