aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorAndy Wortman <ixineeringeverywhere@gmail.com>2017-10-02 01:27:41 -0700
committerAndy Wortman <ixineeringeverywhere@gmail.com>2017-10-02 02:32:46 -0700
commitfe80b29ca03ed5e4462800804f33ecc00e1f880f (patch)
treeb6dda082bbdbcfabebf426ba3cec41af0cb550f1 /src/main.rs
parentea4e93f01d9e4ef17effae1e9a807bb1977865fe (diff)
store and show reply_to info if present
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index 37082a1..820bcb1 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -319,8 +319,10 @@ fn parse_word_command<'a, 'b>(line: &'b str, commands: &[&'a Command]) -> Option
return Some(("", &cmd));
}
} else if line.starts_with(cmd.keyword) {
- // let inner_twid = u64::from_str(&linestr.split(" ").collect::<Vec<&str>>()[1]).unwrap();
- return Some((line.get((cmd.keyword.len() + 1)..).unwrap().trim(), &cmd));
+ if line.find(" ").map(|x| x == cmd.keyword.len()).unwrap_or(false) {
+ // let inner_twid = u64::from_str(&linestr.split(" ").collect::<Vec<&str>>()[1]).unwrap();
+ return Some((line.get((cmd.keyword.len() + 1)..).unwrap().trim(), &cmd));
+ }
}
}
return None