Updated for Rust master.

This commit is contained in:
Aaron Weiss 2015-01-09 17:38:46 -05:00
parent 4e661b47fa
commit d0b54f8119
14 changed files with 343 additions and 335 deletions

View file

@ -1,3 +1,4 @@
#![allow(unstable)]
#![feature(slicing_syntax)]
extern crate irc;
@ -22,10 +23,10 @@ fn main() {
for message in server.iter() {
let message = message.unwrap(); // We'll just panic if there's an error.
print!("{}", message.into_string());
if message.command[] == "PRIVMSG" {
if &message.command[] == "PRIVMSG" {
if let Some(msg) = message.suffix {
if msg.contains("pickles") {
server.send_privmsg(message.args[0][], "Hi!").unwrap();
server.send_privmsg(&message.args[0][], "Hi!").unwrap();
}
}
}