diff --git a/src/modules/noemo.rs b/src/modules/noemo.rs index 9b625fd..01f256b 100644 --- a/src/modules/noemo.rs +++ b/src/modules/noemo.rs @@ -1,16 +1,13 @@ use irc::proto::Message; use std::collections::VecDeque; -pub const PATTERN: &str = "^\\$noemo (?P[^\\s]+)"; +pub const PATTERN: &str = "^\\$noemo\\s*$"; pub const NAME: &str = "noemo"; pub const USAGE: &str = "Usage: $noemo \r\nThis tells the user identified by nick to not be emo"; -pub fn no_emo(captures: regex::Captures, message: &Message, _: &VecDeque) -> String { - let emo_person = captures.get(1).unwrap().as_str(); - - let complete_message = format!("{} thinks you shouldn't be so emo, {}. Take a deep breath and lighten up", - message.source_nickname().unwrap_or("unknown_nick").to_string(), - emo_person); +pub fn no_emo(_: regex::Captures, message: &Message, _: &VecDeque) -> String { + let complete_message = format!("{} thinks you shouldn't be so emo. Take a deep breath and lighten up", + message.source_nickname().unwrap_or("unknown_nick").to_string()); complete_message }