handle_command(...) now calls the user's hook for all messages.
This commit is contained in:
parent
3ee6ec76f1
commit
f174d17e4b
1 changed files with 3 additions and 5 deletions
|
@ -147,7 +147,7 @@ impl<'a, T, U> IrcBot<'a, T, U> where T: IrcWriter, U: IrcReader {
|
||||||
("JOIN", [chan]) => {
|
("JOIN", [chan]) => {
|
||||||
if let Some(vec) = self.chanlists.borrow_mut().find_mut(&String::from_str(chan)) {
|
if let Some(vec) = self.chanlists.borrow_mut().find_mut(&String::from_str(chan)) {
|
||||||
if let Some(i) = source.find('!') {
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue