master
rasul 5 years ago
parent b092807bc1
commit 7a8bbe7890

@ -34,7 +34,7 @@ impl CommandSetRoomDescription {
}
// remove the line and save
room.description.remove(line_num-1);
room.description.remove(line_num - 1);
let _ = try_send_error!(token, db.save_room(&room));
SendQueue::ok(token)

@ -23,8 +23,12 @@ impl Default for CommandSetRoomDescription {
impl Parse for CommandSetRoomDescription {
fn help(&self) -> &str {
match self {
Self::Delete => "set room description delete LINE :: Delete line LINE from room description",
Self::Set => "set room description set LINE DESC :: Set room description line LINE to DESC",
Self::Delete => {
"set room description delete LINE :: Delete line LINE from room description"
}
Self::Set => {
"set room description set LINE DESC :: Set room description line LINE to DESC"
}
Self::Default => "",
}
}

@ -34,7 +34,7 @@ impl Parse for CommandSetRoom {
Self::Description(_) => {
let (command, args) = CommandSetRoomDescription::parse(s)?;
Ok((Self::Description(command), args))
},
}
Self::Default => Err(ParserError::Default),
_ => Ok((self.clone(), s)),
}

@ -21,8 +21,6 @@ impl Game {
send_queue.append(&mut queue);
}
// send everything in the send queue
while let Some((token, message, prompt)) = send_queue.pop() {
// get the client

Loading…
Cancel
Save