aboutsummaryrefslogtreecommitdiff
path: root/examples/02.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/02.rs')
-rw-r--r--examples/02.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/02.rs b/examples/02.rs
index a562249..c70f905 100644
--- a/examples/02.rs
+++ b/examples/02.rs
@@ -15,6 +15,7 @@ use openssl::ssl::{ Ssl, SslContext, SslMethod };
fn main() {
// If the environment variable RUST_LOG is set to "info",
// irsc will log incoming and outgoing data in raw form.
+ // Documentation: http://rust-lang.github.io/log/env_logger/#enabling-logging
env_logger::init().ok().expect("Failed to initialise env_logger");
let mut s = OwnedClient::new();
@@ -25,8 +26,9 @@ fn main() {
// Connect using the newly constructed Ssl configuration.
// If Ssl is not desired, use .connect(...) without the ssl argument.
s.connect_ssl("irc.mozilla.org", 6697, ssl);
- // Send the USER and NICK message in one go,
- // <nick> <user> <description> <optional password>
+
+ // Send the USER and NICK message in one go:
+ // register(nick, user, description, [password])
s.register("irsc02", "irsc", "Example bot 02", None);
// The client must be accessible from anywh when using the Event API.