aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorTill Hoeppner2015-06-28 21:36:21 +0200
committerTill Hoeppner2015-06-28 21:36:21 +0200
commit8537b61f38fd3976d47b153f3548f77896e42eb6 (patch)
tree4de3f192ecddadcf0590c8cf7a79f56f266728d8 /examples
parent37389d9140554235e464eec934ee0d2162858449 (diff)
downloadirsc-8537b61f38fd3976d47b153f3548f77896e42eb6.tar.gz
irsc-8537b61f38fd3976d47b153f3548f77896e42eb6.tar.xz
irsc-8537b61f38fd3976d47b153f3548f77896e42eb6.zip
Fix 01.rs for new API
Diffstat (limited to 'examples')
-rw-r--r--examples/01.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/01.rs b/examples/01.rs
index 2f82839..33c2fcf 100644
--- a/examples/01.rs
+++ b/examples/01.rs
@@ -29,7 +29,7 @@ fn callback(server: &mut Client, msg: &Message, event: Option<Event>) {
}
},
Some(Event::Reply(RPL_WELCOME(_))) => {
- server.join("#botzoo", None);
+ server.join("#meep!", None);
},
_ => ()
}
@@ -37,11 +37,11 @@ fn callback(server: &mut Client, msg: &Message, event: Option<Event>) {
fn main() {
env_logger::init().unwrap();
- let mut s = Client::new();
+ let mut s = OwnedClient::new();
let ssl = Ssl::new(&SslContext::new(SslMethod::Tlsv1).unwrap()).unwrap();
s.connect_ssl("irc.mozilla.org", 6697, ssl);
- s.register(NAME, NAME, DESC);
+ s.register(NAME, NAME, DESC, None);
// Dedicate this thread to listening and event processing
- s.listen(Some(callback));
+ s.listen_with_callback(callback);
}