master
rasul 5 years ago
parent b092807bc1
commit 7a8bbe7890

@ -34,7 +34,7 @@ impl CommandSetRoomDescription {
} }
// remove the line and save // 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)); let _ = try_send_error!(token, db.save_room(&room));
SendQueue::ok(token) SendQueue::ok(token)

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

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

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

Loading…
Cancel
Save