Browse Source

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

dasman 1 year ago
parent
commit
461f5cda5a
1 changed files with 1 additions and 1 deletions
  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((
             return Ok(vec![ReplyType::Server((
                 ERR_NOTEXTTOSEND,
                 ERR_NOTEXTTOSEND,
                 format!("{} :No text to send", nick),
                 format!("{} :No text to send", nick),