Cleaned up a bunch of the examples.
This commit is contained in:
parent
d6786936fa
commit
af72e57c5f
5 changed files with 29 additions and 44 deletions
|
@ -17,13 +17,10 @@ fn main() {
|
|||
|
||||
server.for_each_incoming(|message| {
|
||||
print!("{}", message);
|
||||
match message.command {
|
||||
Command::PRIVMSG(ref target, ref msg) => {
|
||||
if msg.contains("pickles") {
|
||||
server.send_privmsg(target, "Hi!").unwrap();
|
||||
}
|
||||
if let Command::PRIVMSG(ref target, ref msg) = message.command {
|
||||
if msg.contains("pickles") {
|
||||
server.send_privmsg(target, "Hi!").unwrap();
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
}).unwrap()
|
||||
}).unwrap();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue