From f174d17e4bd07d8ca0f04cba1f1e824086ade44f Mon Sep 17 00:00:00 2001 From: Aaron Weiss Date: Wed, 29 Oct 2014 17:02:06 -0400 Subject: [PATCH] handle_command(...) now calls the user's hook for all messages. --- src/bot.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/bot.rs b/src/bot.rs index ff16d60..877e931 100644 --- a/src/bot.rs +++ b/src/bot.rs @@ -147,7 +147,7 @@ impl<'a, T, U> IrcBot<'a, T, U> where T: IrcWriter, U: IrcReader { ("JOIN", [chan]) => { if let Some(vec) = self.chanlists.borrow_mut().find_mut(&String::from_str(chan)) { if let Some(i) = source.find('!') { - vec.push(User::new(source[..i])) + vec.push(User::new(source[..i])); } } }, @@ -160,11 +160,9 @@ impl<'a, T, U> IrcBot<'a, T, U> where T: IrcWriter, U: IrcReader { } } }, - _ => { - try!((*self.process.borrow_mut().deref_mut())(self, source, command, args)); - }, + _ => (), }; - Ok(()) + (*self.process.borrow_mut().deref_mut())(self, source, command, args) } }