Explorar el Código

darkirc: fix a bug caused lines starting with whitespace not be parsed/sent

dasman hace 1 año
padre
commit
461f5cda5a
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      bin/darkirc/src/irc/command.rs

+ 1 - 1
bin/darkirc/src/irc/command.rs

@@ -680,7 +680,7 @@ impl Client {
             ))])
         };
 
-        if !message.starts_with(':') || message.trim() == ":" {
+        if !message.starts_with(':') || (message.trim() == ":" && tokens.next().is_none()) {
             return Ok(vec![ReplyType::Server((
                 ERR_NOTEXTTOSEND,
                 format!("{} :No text to send", nick),