diff options
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/state.rs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/server/src/state.rs b/server/src/state.rs index 2b112913..54beb3f7 100644 --- a/server/src/state.rs +++ b/server/src/state.rs @@ -210,15 +210,17 @@ impl State { } async fn handle_command_parse(&mut self, player: PlayerID, command: &str) -> Result<()> { - self.handle_command( - player, - Command::try_parse_from( - shlex::split(command) - .ok_or(anyhow!("quoting invalid"))? - .into_iter(), - )?, - ) - .await?; + for line in command.split("\n") { + self.handle_command( + player, + Command::try_parse_from( + shlex::split(line) + .ok_or(anyhow!("quoting invalid"))? + .into_iter(), + )?, + ) + .await?; + } Ok(()) } |