Updated docs.

This commit is contained in:
Aaron Weiss 2015-02-24 10:55:08 -05:00
parent e1ab26a4bd
commit 5f8b09cf57
2 changed files with 4 additions and 5 deletions

View file

@ -14,9 +14,8 @@ fn main() {
let server = IrcServer::from_config(config).unwrap();
server.identify().unwrap();
for command in server.iter_cmd() {
// Use of unwrap() on the results of iter_cmd() is currently discouraged on servers where
// the v3 capabilities extension is enabled, and the current lapse in specification
// compliance on that specific command will then cause the program to panic.
// Use of unwrap() on the results of iter_cmd() is discouraged since response codes will be
// received as parsing errors when using this type of iterator.
if let Ok(Command::PRIVMSG(chan, msg)) = command { // Ignore errors.
if msg.contains("pickles") {
server.send_privmsg(&chan, "Hi!").unwrap();

View file

@ -202,8 +202,8 @@ pub enum Command {
MEMOSERV(String),
// Capabilities extension to IRCv3
/// CAP COMMAND :[param]
#[unstable = "This command is not entirely specification compliant."]
/// CAP [*] COMMAND [*] :[param]
#[unstable = "Feature recently changed to hopefully be specification-compliant."]
CAP(Option<String>, CapSubCommand, Option<String>, Option<String>),
}