Updated for Rust master.
This commit is contained in:
parent
4e661b47fa
commit
d0b54f8119
14 changed files with 343 additions and 335 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue